Skip to content
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

$ref attribute containing forward slashes #43

Closed
msbsh opened this issue Jul 27, 2017 · 0 comments
Closed

$ref attribute containing forward slashes #43

msbsh opened this issue Jul 27, 2017 · 0 comments

Comments

@msbsh
Copy link

msbsh commented Jul 27, 2017

When trying to $ref an element, that contains '/' in it's name the pointer cannot be found.
I found the specification for escaping '/' characters here: https://tools.ietf.org/html/rfc6901#page-3

I'm trying to reference the following element:

paths:
  /airport/HAM:
    get:
      ...

of a YML file and reference it from another YML by using:

$ref: "#/paths/~1aircraft~1HAM/get"

yet, I cannot get it to stay escaped properly, as the second '~1' gets evaluated too early giving me the error message:

Token \"/aircraft/HAM\" does not exist.",
  "stack": "SyntaxError: Error resolving $ref pointer \"/Users/someUser/airport.yaml#/paths/~1aircraft~HAM/get\".

I would appreciate any hints or help!

@msbsh msbsh closed this as completed Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant