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
I have a single definition for error messages in the shared/schemas/error.yaml file.
For the resources books and pets I'd like to reuse that when describing error responses as you can see in /v1/books/index.yaml and /v1/pets/index.yaml files.
When I render the output file, the first occurence of the $ref to the shared/schemas/error.yaml is merged correctly, but the following references don't.
They get merged, for all other reference toshared/schemas/error.yaml like this:
Where, the path is /v1/pets, but the $ref for the 500 status code is referencing the /v1/books path and the 401 status code when it should have merged the content of the referenced file instead.
Your environment
Node: 10.18.0
Speccy: 0.11.0
Node Version: 10.18.0
Operating system and version (e.g. Ubuntu 16.04, Windows 7): MacOS Catalina, 10.15.1
No progress so far. Won't be able to work on this issue any soon. If you're using Redoc as well, you might want to look at the bundle command. In our case, it was a good replacement.
$refs are not being rendered correctly when generating the output file. It looks like a bug.
Detailed description
Descriptions below are based on this example: https://github.com/jcfausto/speccy-ref-path-rendering-issue
Command used to output the file:
Expected outcome
That every $ref will have its content rendered to the output.yaml file.
Details
I have a single definition for error messages in the
shared/schemas/error.yaml
file.For the resources
books
andpets
I'd like to reuse that when describing error responses as you can see in/v1/books/index.yaml
and/v1/pets/index.yaml
files.When I render the output file, the first occurence of the $ref to the
shared/schemas/error.yaml
is merged correctly, but the following references don't.They get merged, for all other reference to
shared/schemas/error.yaml
like this:The base path
#/paths/~1v1~1books
, methodget
and status code401
are all comming from the first $ref that was rendered correctly.That creates outputs like this:
Where, the path is
/v1/pets
, but the$ref
for the500
status code is referencing the/v1/books
path and the401
status code when it should have merged the content of the referenced file instead.Your environment
Node: 10.18.0
Speccy: 0.11.0
The text was updated successfully, but these errors were encountered: