Closed martininigo closed 3 years ago
Hi @martininigo I tested the specs, and I think the issue is that the ref /exceptions.yml#/components/responses/...
has a slash at the begining, I removed ir or place a .
before the slash and the resolving was ok.
Please let us know if this helped solved your issue. Please review the test I commited, so we are sure we are talking of the same scenario.
'400':
$ref: >-
exceptions.yml#/components/responses/400
'404':
$ref: >-
exceptions.yml#/components/responses/404
'500':
$ref: >-
exceptions.yml#/components/responses/500
Hi @martininigo you can find now in the components section the responses that were in the relative file. thanks for reporting this issue.
I have a main yaml file with the specification of the service and an other yaml with schemas and responses. When I use OpenAPIParser ().readContents method, the schemes are correctly parsed and added to openAPI.components.shcemas map but the responses aren't added to openAPI.components.responses map.
My main yml is:
exceptions.yml
If I copy the responses from the external file and add them to the main file it works fine. So apparently the problem is precisely when the responses are defined in an external file. The strange thing is that the rest of the components defined in the external file processes them correctly.