You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make sure to fork this template and run yarn generate in the terminal.
Please make sure Mesh package versions under package.json matches yours.
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
When parsing certain OpenAPI specs, the schema options in OpenAPI/omnigraph assume all elements of a Path Item Object are API methods (i.e. GET/POST/UPDATE/DELETE) and does not account for the possibility of the summary and description fields that may be included in this group. This leads to the an attempt to parse these fields as a method and introduces breaking behavior.
summary and description are allowable fields in the Path Item Object in accordance with OpenAPI standards, see docs here: https://swagger.io/specification/
Expected behavior
The library should not attempt to parse the summary and description fields as method routes and instead should ignore them.
Environment:
OS: macOS Monterey 12.6.1
@graphql-mesh/openapi:
NodeJS: 14.19.0
Additional context
Extending the ignore method check to also include summary and description fixes the issue: if (method === 'parameters' || method === 'summary' || method === 'description') { continue; }
The text was updated successfully, but these errors were encountered:
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
When parsing certain OpenAPI specs, the schema options in OpenAPI/omnigraph assume all elements of a Path Item Object are API methods (i.e. GET/POST/UPDATE/DELETE) and does not account for the possibility of the summary and description fields that may be included in this group. This leads to the an attempt to parse these fields as a method and introduces breaking behavior.
To Reproduce
Steps to reproduce the behavior:
Use any OpenAPI spec json/yaml that includes additional fields in the Path Item Object, such as this:
https://github.com/PagerDuty/api-schema/blob/main/reference/REST/openapiv3.json
summary and description are allowable fields in the Path Item Object in accordance with OpenAPI standards, see docs here: https://swagger.io/specification/
Expected behavior
The library should not attempt to parse the summary and description fields as method routes and instead should ignore them.
Environment:
@graphql-mesh/openapi
:Additional context
Extending the ignore method check to also include summary and description fixes the issue:
if (method === 'parameters' || method === 'summary' || method === 'description') { continue; }
The text was updated successfully, but these errors were encountered: