mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
parent
9d0dd25f30
commit
accd01659d
|
@ -24,7 +24,7 @@ export class ApiInfo extends BaseComponent implements OnInit {
|
||||||
init() {
|
init() {
|
||||||
this.info = this.componentSchema.info;
|
this.info = this.componentSchema.info;
|
||||||
this.specUrl = this.optionsService.options.specUrl;
|
this.specUrl = this.optionsService.options.specUrl;
|
||||||
if (!isNaN(parseInt(this.info.version.substring(0, 1)))) {
|
if (!isNaN(parseInt(this.info.version.toString().substring(0, 1)))) {
|
||||||
this.info.version = 'v' + this.info.version;
|
this.info.version = 'v' + this.info.version;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ export class SpecManager {
|
||||||
preprocess() {
|
preprocess() {
|
||||||
let mdRender = new MdRenderer();
|
let mdRender = new MdRenderer();
|
||||||
if (!this._schema.info) {
|
if (!this._schema.info) {
|
||||||
throw 'Required field "info" is not specified at the spec top level';
|
throw Error('Specification Error: Required field "info" is not specified at the top level of the specification');
|
||||||
}
|
}
|
||||||
if (!this._schema.info.description) this._schema.info.description = '';
|
if (!this._schema.info.description) this._schema.info.description = '';
|
||||||
if (this._schema.securityDefinitions) {
|
if (this._schema.securityDefinitions) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user