mirror of
https://github.com/Redocly/redoc.git
synced 2025-01-31 10:04:08 +03:00
parent
9d0dd25f30
commit
accd01659d
|
@ -24,7 +24,7 @@ export class ApiInfo extends BaseComponent implements OnInit {
|
|||
init() {
|
||||
this.info = this.componentSchema.info;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ export class SpecManager {
|
|||
preprocess() {
|
||||
let mdRender = new MdRenderer();
|
||||
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.securityDefinitions) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user