Open karolkania opened 4 years ago
I'm revisiting this old issue. I think one issue is this implies there is a components object with x-some-ref
which doesn't seem like a valid property of components.
$ref: './components.openapi.yml#/components/x-some-ref/whatever'
https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsObject
But I reviewed it again, and it is indeed a specification extension (starts with x-
so it is legal). Seems like we should go ahead and resolve it and place it into components.
As specified in OpenAPI Specification / Components Object - This object MAY be extended with Specification Extensions
I'm having issues with those Specification Extensions, it's always best to use an example to present what is wrong - I have two files and I'm trying to create a bundle using the main file as a root document.
Main OAS3 file (main.openapi.yml):
Components / Responses OAS3 file (components.openapi.yml):
When I'm creating a bundle with:
openapi bundle --output bundled.openapi.yml --ext yml main.openapi.yml
it parses perfectly the OAS3 fixed fields like
components/responses
references but fails parsing specification extensions (x-some-ref
) references - it is just copied as-is.The output file (bundled.openapi.yml):
First of all, as specified in the OAS3 specs:
So these are optional, but It'd be extremely nice to have it parsed and supported.
Not an issue, more like a feature request.