Closed raiyankamal closed 5 years ago
The validate field is accepted in options: https://github.com/APIDevTools/swagger-parser/blob/master/lib/index.js#L123
validate
options
But this is not included in the type definition for Options: https://github.com/APIDevTools/swagger-parser/blob/master/lib/index.d.ts#L215
As a result, typescript cannot transpile when the validate field exists.
const api = await SwaggerParser.validate(swaggerApiSource, { validate: { spec: true } });
error TS2345: Argument of type '{ validate: { spec: boolean; }; }' is not assignable to parameter of type 'Options'.```
The
validate
field is accepted inoptions
: https://github.com/APIDevTools/swagger-parser/blob/master/lib/index.js#L123But this is not included in the type definition for Options: https://github.com/APIDevTools/swagger-parser/blob/master/lib/index.d.ts#L215
As a result, typescript cannot transpile when the
validate
field exists.