Release v0.7.12

This commit is contained in:
RedocBot 2016-04-13 12:52:05 +00:00 committed by travis@localhost
parent d211aaec6b
commit 0a6e336d7e
4 changed files with 25 additions and 12 deletions

25
dist/redoc.js vendored
View File

@ -34828,7 +34828,11 @@ $__System.register('21', ['9', '11', '35', '160', '174', 'a', 'ba', 'f', 'c3'],
});
if (idx < 0) continue;
res.push({ name: defName, $ref: '#/definitions/' + defName });
var empty = false;
if (subTypes.length === 1) {
empty = true;
}
res.push({ name: defName, $ref: '#/definitions/' + defName, empty: empty });
}
} catch (err) {
_didIteratorError6 = true;
@ -56834,6 +56838,8 @@ $__System.register('d', ['5', '7', '8', '9', '11', '12', '16', '95', 'a', 'f'],
subSchema.active = false;
});
subClass.active = true;
this.derivedEmtpy = false;
if (subClass.empty) this.derivedEmtpy = true;
}
}, {
key: 'unwrapArray',
@ -56862,13 +56868,13 @@ $__System.register('d', ['5', '7', '8', '9', '11', '12', '16', '95', 'a', 'f'],
runInjectors(schema, schema, schema._pointer || this.pointer);
schema.derived = schema.derived || [];
if (schema.derived.length) schema.derived[0].active = true;
if (!schema.isTrivial) {
this.prepareObjectPropertiesData(schema);
}
this.schema = schema;
if (schema.derived.length) this.selectDerived(schema.derived[0]);
}
}, {
key: 'prepareObjectPropertiesData',
@ -56887,9 +56893,16 @@ $__System.register('d', ['5', '7', '8', '9', '11', '12', '16', '95', 'a', 'f'],
var propertySchema = schema.properties[prop];
var propPointer = JsonPointer.join(schema._pointer || _this.pointer, ['properties', prop]);
propertySchema = JsonSchema.injectPropertyData(propertySchema, prop, propPointer);
// stop endless discriminator recursion
if (propertySchema._pointer === _this.childFor) {
propertySchema._pointer = null;
}
propertySchema.required = !!requiredMap[prop];
propertySchema.isDiscriminator = schema.discriminator === prop;
if (propertySchema.isDiscriminator) discriminatorFieldIdx = idx;
if (propertySchema.isDiscriminator) {
discriminatorFieldIdx = idx;
propertySchema['enum'] = null;
}
return propertySchema;
});
// Move discriminator field to the end of properties list
@ -56915,10 +56928,10 @@ $__System.register('d', ['5', '7', '8', '9', '11', '12', '16', '95', 'a', 'f'],
JsonSchema = Reflect.metadata('parameters', [[SchemaManager], [ElementRef]])(JsonSchema) || JsonSchema;
JsonSchema = RedocComponent({
selector: 'json-schema',
template: '\n <span *ngIf="schema.isTrivial" class="param-wrap">\n <span class="param-type param-type-trivial {{schema.type}}"\n [ngClass]="{\'with-hint\': schema._displayTypeHint}"\n title="{{schema._displayTypeHint}}">{{schema._displayType}} {{schema._displayFormat}}\n <span class="param-range" *ngIf="schema._range"> {{schema._range}} </span>\n </span>\n <div *ngIf="schema.enum" class="param-enum">\n <span *ngFor="#enumItem of schema.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>\n </div>\n </span>\n <table *ngIf="!schema.isTrivial" class="params-wrap" [ngClass]="{\'params-array\': schema._isArray}">\n <!-- <caption> {{_displayType}} </caption> -->\n <template ngFor [ngForOf]="schema.properties" #prop="$implicit" #last="last">\n <tr class="param" [ngClass]="{\'last\': last, \'discriminator\': prop.isDiscriminator, \'complex\': prop._pointer}">\n <td class="param-name">\n <span class="param-name-content">{{prop._name}}</span>\n </td>\n <td class="param-info">\n <div>\n <span class="param-type {{prop.type}}" [ngClass]="{\'with-hint\': prop._displayTypeHint}"\n title="{{prop._displayTypeHint}}"> {{prop._displayType}} {{prop._displayFormat}}\n <span class="param-range" *ngIf="prop._range"> {{prop._range}} </span>\n </span>\n <span *ngIf="prop.required" class="param-required">Required</span>\n <div *ngIf="prop.enum" class="param-enum">\n <span *ngFor="#enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>\n </div>\n </div>\n <div class="param-description" innerHtml="{{prop.description | marked}}"></div>\n <div class="discriminator-info" *ngIf="prop.isDiscriminator">\n This field value determines the exact schema:\n <ul>\n <li *ngFor="#derived of schema.derived"\n (click)="selectDerived(derived)" [ngClass]="{active: derived.active}"> {{derived.name}} </li>\n </ul>\n </div>\n </td>\n </tr>\n <tr class="param-schema" [ngClass]="{\'param-array\': prop._isArray, \'last\': last}" *ngIf="prop._pointer">\n <td colspan="2">\n <json-schema pointer="{{prop._pointer}}" [isArray]=\'prop._isArray\'\n class="nested-schema" [nestOdd]="!nestOdd" [attr.nesteven]="!nestOdd">\n </json-schema>\n </td>\n </tr>\n </template>\n <tr *ngIf="schema.derived.length" class="param-wrap discriminator-wrap">\n <td colspan="2">\n <div class="derived-schema" *ngFor="#derived of schema.derived" [ngClass]="{active: derived.active}">\n <json-schema pointer="{{derived.$ref}}" [final]="derived.final" class="discriminator-part">\n </json-schema>\n </div>\n </td>\n </tr>\n </table>\n ',
styles: ['\n .param-name{font-size:0.929em;padding:10px 0 10px 0;font-weight:400;box-sizing:border-box;line-height:20px;border-left:1px solid rgba(0,51,160,0.5);white-space:nowrap;position:relative;vertical-align:top}.param-name-content{padding-right:25px;display:inline-block;font-family:Montserrat,sans-serif}.param-info{padding:10px 0;box-sizing:border-box;border-bottom:1px solid #ccc;width:75%}.param-range{color:rgba(0,51,160,0.7);position:relative;top:1px;padding:0 4px;border-radius:2px;background-color:rgba(0,51,160,0.1);margin-left:6px}.param-description{font-size:13px}.param-required{color:red;font-weight:bold;font-size:12px;line-height:20px;vertical-align:middle}.param-type{color:#263238;font-size:0.929em;line-height:20px;vertical-align:middle;font-weight:normal}.param-type.array:before{content:"Array of ";color:#263238;font-weight:300}.param-type{color:rgba(38,50,56,0.4)}.param-type.with-hint{display:inline-block;margin-bottom:0.4em;border-bottom:1px dotted rgba(38,50,56,0.4);padding:0;cursor:help}.param-type-trivial{margin:10px 10px 0;display:inline-block}.param-name>span:before{content:"";display:inline-block;width:1px;height:7px;background-color:#0033a0;margin:0 10px;vertical-align:middle}.param-name>span:after{content:"";position:absolute;border-top:1px solid rgba(0,51,160,0.5);width:10px;left:0;top:21px}.param:first-of-type>.param-name:before{content:"";display:block;position:absolute;left:-1px;top:0;border-left:2px solid #fff;height:21px}.param:last-of-type>.param-name,.param.last>.param-name{position:relative}.param:last-of-type>.param-name:after,.param.last>.param-name:after{content:"";display:block;position:absolute;left:-2px;border-left:2px solid #fff;top:22px;background-color:white;bottom:0}.param-wrap:last-of-type>.param-schema{border-left-color:transparent}.param-schema .param-wrap:first-of-type .param-name:before{display:none !important}.param-schema.last>td{border-left:0}.param-enum{color:#263238;font-size:13px}.param-enum:before{content:"Values: {"}.param-enum:after{content:"}"}.param-enum>.enum-value:after{content:", "}.param-enum>.enum-value:last-of-type:after{content:none}:host{display:block}.param-schema>td{border-left:1px solid rgba(0,51,160,0.5);padding:0 10px}.derived-schema{display:none}.derived-schema.active{display:block}json-schema.nested-schema{background-color:white;padding:10px 20px;position:relative;border-radius:2px}json-schema.nested-schema:before,json-schema.nested-schema:after{content:"";width:0;height:0;position:absolute;top:0;border-style:solid;border-color:transparent;border-width:10px 15px 0;margin-left:-7.5px;border-top-color:#f0f0f0}json-schema.nested-schema:before{left:10%}json-schema.nested-schema:after{right:10%}json-schema.nested-schema .param:first-of-type>.param-name:before,json-schema.nested-schema .param:last-of-type>.param-name:after{border-color:white}json-schema[nesteven="true"]{background-color:#f0f0f0;border-radius:2px}json-schema[nesteven="true"]:before,json-schema[nesteven="true"]:after{border-top-color:white}json-schema[nesteven="true"]>.params-wrap>.param:first-of-type>.param-name:before,json-schema[nesteven="true"]>.params-wrap>.param:last-of-type>.param-name:after{border-color:#f0f0f0}.param.complex>.param-info{border-bottom:0}.params-wrap{border-collapse:collapse;width:100%}.params-wrap.params-array:before,.params-wrap.params-array:after{display:block;font-weight:300;color:#263238;font-size:13px;line-height:1.5}.params-wrap.params-array:after{content:"]"}.params-wrap.params-array:before{content:"Array [";padding-top:1em}.params-wrap.params-array{padding-left:10px}.param-schema.param-array:before{bottom:9.75px;width:10px;border-left-style:dashed;border-bottom:1px dashed rgba(0,51,160,0.5)}.params-wrap.params-array>.param-wrap:first-of-type>.param>.param-name:after{content:"";display:block;position:absolute;left:-1px;top:0;border-left:2px solid #fff;height:20px}.params-wrap>.param>.param-schema.param-array{border-left-color:transparent}.param.discriminator>.param-info{padding-bottom:0;border-bottom:0}.param.discriminator>.param-name:after{display:none}.discriminator-info{font-weight:400;margin-bottom:10px}.discriminator-wrap>td{padding:0;position:relative}.discriminator-wrap>td:before{content:"";display:block;position:absolute;left:0;top:0;border-left:1px solid rgba(0,51,160,0.5);height:21px;z-index:1}ul{text-align:left;margin:0;padding:0;display:block}li{margin:0.5em 0.3em 0.2em 0;font-family:Montserrat,sans-serif;font-size:.929em;line-height:.929em;border:0;color:white;padding:2px 8px 4px 8px;border-radius:2px;background-color:rgba(38,50,56,0.3);display:inline-block;cursor:pointer}li:last-of-type{margin-right:0}li.active{background-color:#0033a0}\n '],
template: '\n <span *ngIf="schema.isTrivial" class="param-wrap">\n <span class="param-type param-type-trivial {{schema.type}}"\n [ngClass]="{\'with-hint\': schema._displayTypeHint}"\n title="{{schema._displayTypeHint}}">{{schema._displayType}} {{schema._displayFormat}}\n <span class="param-range" *ngIf="schema._range"> {{schema._range}} </span>\n </span>\n <div *ngIf="schema.enum" class="param-enum">\n <span *ngFor="#enumItem of schema.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>\n </div>\n </span>\n <table *ngIf="!schema.isTrivial" class="params-wrap" [ngClass]="{\'params-array\': schema._isArray}">\n <!-- <caption> {{_displayType}} </caption> -->\n <template ngFor [ngForOf]="schema.properties" #prop="$implicit" #last="last">\n <tr class="param" [ngClass]="{\'last\': last, \'discriminator\': prop.isDiscriminator && !derivedEmtpy, \'complex\': prop._pointer}">\n <td class="param-name">\n <span class="param-name-content">{{prop._name}}</span>\n </td>\n <td class="param-info">\n <div>\n <span class="param-type {{prop.type}}" [ngClass]="{\'with-hint\': prop._displayTypeHint}"\n title="{{prop._displayTypeHint}}"> {{prop._displayType}} {{prop._displayFormat}}\n <span class="param-range" *ngIf="prop._range"> {{prop._range}} </span>\n </span>\n <span *ngIf="prop.required" class="param-required">Required</span>\n <div *ngIf="prop.enum" class="param-enum">\n <span *ngFor="#enumItem of prop.enum" class="enum-value {{enumItem.type}}"> {{enumItem.val | json}} </span>\n </div>\n </div>\n <div class="param-description" innerHtml="{{prop.description | marked}}"></div>\n <div class="discriminator-info" *ngIf="prop.isDiscriminator">\n <span>This field value determines the exact schema:</span>\n <ul>\n <li *ngFor="#derived of schema.derived"\n (click)="selectDerived(derived)" [ngClass]="{active: derived.active}"> {{derived.name}} </li>\n </ul>\n </div>\n </td>\n </tr>\n <tr class="param-schema" [ngClass]="{\'param-array\': prop._isArray, \'last\': last}" *ngIf="prop._pointer">\n <td colspan="2">\n <json-schema pointer="{{prop._pointer}}" [isArray]=\'prop._isArray\'\n class="nested-schema" [nestOdd]="!nestOdd" [attr.nesteven]="!nestOdd">\n </json-schema>\n </td>\n </tr>\n </template>\n <tr *ngIf="schema.derived.length" class="param-wrap discriminator-wrap" [ngClass]="{\'empty\': derivedEmtpy}">\n <td colspan="2">\n <div class="derived-schema" *ngFor="#derived of schema.derived" [ngClass]="{active: derived.active}">\n <json-schema *ngIf="!derived.empty" [childFor]="pointer" pointer="{{derived.$ref}}" [final]="derived.final" class="discriminator-part">\n </json-schema>\n </div>\n </td>\n </tr>\n </table>\n ',
styles: ['\n .param-name{font-size:0.929em;padding:10px 0 10px 0;font-weight:400;box-sizing:border-box;line-height:20px;border-left:1px solid rgba(0,51,160,0.5);white-space:nowrap;position:relative;vertical-align:top}.param-name-content{padding-right:25px;display:inline-block;font-family:Montserrat,sans-serif}.param-info{padding:10px 0;box-sizing:border-box;border-bottom:1px solid #ccc;width:75%}.param-range{color:rgba(0,51,160,0.7);position:relative;top:1px;padding:0 4px;border-radius:2px;background-color:rgba(0,51,160,0.1);margin-left:6px}.param-description{font-size:13px}.param-required{color:red;font-weight:bold;font-size:12px;line-height:20px;vertical-align:middle}.param-type{color:#263238;font-size:0.929em;line-height:20px;vertical-align:middle;font-weight:normal}.param-type.array:before{content:"Array of ";color:#263238;font-weight:300}.param-type{color:rgba(38,50,56,0.4)}.param-type.with-hint{display:inline-block;margin-bottom:0.4em;border-bottom:1px dotted rgba(38,50,56,0.4);padding:0;cursor:help}.param-type-trivial{margin:10px 10px 0;display:inline-block}.param-name>span:before{content:"";display:inline-block;width:1px;height:7px;background-color:#0033a0;margin:0 10px;vertical-align:middle}.param-name>span:after{content:"";position:absolute;border-top:1px solid rgba(0,51,160,0.5);width:10px;left:0;top:21px}.param:first-of-type>.param-name:before{content:"";display:block;position:absolute;left:-1px;top:0;border-left:2px solid #fff;height:21px}.param:last-of-type>.param-name,.param.last>.param-name{position:relative}.param:last-of-type>.param-name:after,.param.last>.param-name:after{content:"";display:block;position:absolute;left:-2px;border-left:2px solid #fff;top:22px;background-color:white;bottom:0}.param-wrap:last-of-type>.param-schema{border-left-color:transparent}.param-schema .param-wrap:first-of-type .param-name:before{display:none !important}.param-schema.last>td{border-left:0}.param-enum{color:#263238;font-size:13px}.param-enum:before{content:"Values: {"}.param-enum:after{content:"}"}.param-enum>.enum-value:after{content:", "}.param-enum>.enum-value:last-of-type:after{content:none}:host{display:block}.param-schema>td{border-left:1px solid rgba(0,51,160,0.5);padding:0 10px}.derived-schema{display:none}.derived-schema.active{display:block}json-schema.nested-schema{background-color:white;padding:10px 20px;position:relative;border-radius:2px}json-schema.nested-schema:before,json-schema.nested-schema:after{content:"";width:0;height:0;position:absolute;top:0;border-style:solid;border-color:transparent;border-width:10px 15px 0;margin-left:-7.5px;border-top-color:#f0f0f0}json-schema.nested-schema:before{left:10%}json-schema.nested-schema:after{right:10%}json-schema.nested-schema .param:first-of-type>.param-name:before,json-schema.nested-schema .param:last-of-type>.param-name:after{border-color:white}json-schema[nesteven="true"]{background-color:#f0f0f0;border-radius:2px}json-schema[nesteven="true"]:before,json-schema[nesteven="true"]:after{border-top-color:white}json-schema[nesteven="true"]>.params-wrap>.param:first-of-type>.param-name:before,json-schema[nesteven="true"]>.params-wrap>.param:last-of-type>.param-name:after{border-color:#f0f0f0}json-schema[nesteven="true"]>.params-wrap>.param:last-of-type>.param-name:after,json-schema[nesteven="true"]>.params-wrap>.param.last>.param-name:after{border-color:#f0f0f0}.param.complex>.param-info{border-bottom:0}.params-wrap{border-collapse:collapse;width:100%}.params-wrap.params-array:before,.params-wrap.params-array:after{display:block;font-weight:300;color:#263238;font-size:13px;line-height:1.5}.params-wrap.params-array:after{content:"]"}.params-wrap.params-array:before{content:"Array [";padding-top:1em}.params-wrap.params-array{padding-left:10px}.param-schema.param-array:before{bottom:9.75px;width:10px;border-left-style:dashed;border-bottom:1px dashed rgba(0,51,160,0.5)}.params-wrap.params-array>.param-wrap:first-of-type>.param>.param-name:after{content:"";display:block;position:absolute;left:-1px;top:0;border-left:2px solid #fff;height:20px}.params-wrap>.param>.param-schema.param-array{border-left-color:transparent}.param.discriminator>.param-info{padding-bottom:0;border-bottom:0}.param.discriminator>.param-name:after{display:none}.discriminator-info{font-weight:400;margin-bottom:10px}.discriminator-info>span{font-size:0.9em;font-weight:300}.discriminator-wrap:not(.empty)>td{padding:0;position:relative}.discriminator-wrap:not(.empty)>td:before{content:"";display:block;position:absolute;left:0;top:0;border-left:1px solid rgba(0,51,160,0.5);height:21px;z-index:1}ul{text-align:left;margin:0;padding:0;display:block}li{margin:0.5em 0.3em 0.2em 0;font-family:Montserrat,sans-serif;font-size:.929em;line-height:.929em;border:0;color:white;padding:2px 8px 4px 8px;border-radius:2px;background-color:rgba(38,50,56,0.3);display:inline-block;cursor:pointer}li:last-of-type{margin-right:0}li.active{background-color:#0033a0}\n '],
directives: [JsonSchema, Tabs, Tab],
inputs: ['isArray', 'final', 'nestOdd']
inputs: ['isArray', 'final', 'nestOdd', 'childFor']
})(JsonSchema) || JsonSchema;
return JsonSchema;
})(BaseComponent);

2
dist/redoc.js.map vendored

File diff suppressed because one or more lines are too long

8
dist/redoc.min.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long