chore: remove info.version validation

This commit is contained in:
Roman Hotsiy 2019-01-17 18:43:02 +02:00
parent 8c9e3bdbe4
commit 801fea0474
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -63,12 +63,6 @@ export class OpenAPIParser {
if (spec.openapi === undefined) {
throw new Error('Document must be valid OpenAPI 3.0.0 definition');
}
if (spec.info === undefined) {
throw new Error('OpenAPI 3.0.0 requires an `info` section');
}
if (spec.info.version === undefined) {
console.warn('OpenAPI 3.0.0 requires setting a `info.version` field, ignoring.');
}
}
preprocess(spec: OpenAPISpec) {