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
This appears to be a bug in the resolve function.
As per the docs here: https://swagger.io/docs/specification/using-ref/
the only 2 things that should be escaped in a $ref are "~" and "/". When I execute a resolve paths that include path params escape the curly braces as well and I end up with refs that looks like :
- $ref: "#/paths/1blah1%7BblahId%7D/put/parameters/1"
- $ref: "#/paths/1blah1%7BblahId%7D/put/parameters/2"
Note the %7B and %7D in the paths which should still be "{" and "}" respectively
Context
Why is this change important to you? How would you use it?
This is a bug and causes imports into other utilities of the fully resolved yaml to fail (postman specifically)
How can it benefit other users?
Possible implementation
N/A
Your environment
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
Node Version:
Operating system and version (e.g. Ubuntu 16.04, Windows 7):
Link to your project:
...
...
The text was updated successfully, but these errors were encountered:
Thanks for the update @MikeRalphson. It looks like Postman does not handle this correctly and I have opened an issue with them referencing OAI/OpenAPI-Specification#1677. Based on what you point to here this can probably be closed out as speccy is functioning consistent with the spec.
Detailed description
This appears to be a bug in the resolve function.
As per the docs here:
https://swagger.io/docs/specification/using-ref/
the only 2 things that should be escaped in a $ref are "~" and "/". When I execute a resolve paths that include path params escape the curly braces as well and I end up with refs that looks like :
- $ref: "#/paths/
1blah1%7BblahId%7D/put/parameters/1"- $ref: "#/paths/
1blah1%7BblahId%7D/put/parameters/2"Note the %7B and %7D in the paths which should still be "{" and "}" respectively
Context
Why is this change important to you? How would you use it?
This is a bug and causes imports into other utilities of the fully resolved yaml to fail (postman specifically)
How can it benefit other users?
Possible implementation
N/A
Your environment
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
The text was updated successfully, but these errors were encountered: