-
-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Validator does not resolve ref's with / in key names #25
Comments
I've implemented a similar JSON ref parser in python in this project & code. This may help as a reference example. |
Seems that the when resolving external references here and here it falls back to Cursory search shows jptr implements ~1 parsing properly. |
In trying to develop a simple test case for this I also found that the e.g.
Resulting in:
|
/ is not valid in a component name. "All the fixed fields declared above are objects that MUST use keys that match the regular expression: Sorry for being terse, on my phone. |
Re: the first point, did you install v2.7.0 from npm, or update a git clone? If the latter, you may need to |
@MikeRalphson you're spot on here. Turns out it's not the pointer but the external resolution. I'll open a separate issue w/ details and a partial solution. |
JSON Reference RFC defines an order for resolving & encoding key values in a reference. e.g.
a/b
should be addressed asa~1b
. The validator fails to resolve these edge cases, preventing/some/path
from being a valuid $ref.Checklist
Detailed Description
The validator fails to resolve
~1
in references correctly, such that the following example fails:openapi.yml
endpoints/foo.yml:
In the above example, the validator incorrectly fails with:
Background:
RFC 6901 defines a JSON Reference. Specifically (from section 5.):
The text was updated successfully, but these errors were encountered: