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

reference-components-regex incomplete #222

Closed
1 task done
stevenj opened this issue Apr 13, 2020 · 1 comment
Closed
1 task done

reference-components-regex incomplete #222

stevenj opened this issue Apr 13, 2020 · 1 comment

Comments

@stevenj
Copy link

stevenj commented Apr 13, 2020

Checklist

  • Linting issue

The linter fails if there are ~1 or ~2 tokens in a ref path, which are used as replacements for / if the / appears in the reference.

example:

paths:
  /v1/auth/newcustomer: # Causes a new customer email to be sent
    $ref: "v1/auth/newcustomer.yml#/paths/~1auth~1newcustomer"

is a valid reference to:

paths:
    /auth/newcustomer

in the v1/auth/newcustomer.ym file.

however such a construct will yield a reference components should all match spec. regex error from the linter.

@MikeRalphson
Copy link
Contributor

Should be fixed in:

  • oas-linter@3.1.2
  • oas-validator@4.0.3
  • swagger2openapi@6.0.3

by only applying this rule to $refs which start with #/components/

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

2 participants