APIDevTools / swagger-parser

Swagger 2.0 and OpenAPI 3.0 parser/validator
https://apitools.dev/swagger-parser
MIT License
1.08k stars 153 forks source link

Unable to access requestBody after dereferencing my contract yaml #244

Open souryabharath opened 1 year ago

souryabharath commented 1 year ago

API contract is in 3.0.0 openapi version and the version of npm package being used is ^10.1.0.

Below is the exception when I try to access requestBody from my dereferenced reponse.

Property 'requestBody' does not exist on type '{ tags?: string[]; summary?: string; description?: string; externalDocs?: ExternalDocumentationObject; operationId?: string; parameters?: (ReferenceObject | ParameterObject)[]; ... 5 more ...; servers?: ServerObject[]; } | { ...; } | ({ ...; } & ... 1 more ... & { ...; })'. Property 'requestBody' does not exist on type '{ tags?: string[]; summary?: string; description?: string; externalDocs?: ExternalDocumentationObject; operationId?: string; consumes?: MimeTypes; produces?: MimeTypes; ... 4 more ...; security?: SecurityRequirementObject[]; }'.ts(2339) any