Skip to content

Slashes in path parameters #266

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

Closed
zefciu opened this issue Sep 22, 2020 · 1 comment
Closed

Slashes in path parameters #266

zefciu opened this issue Sep 22, 2020 · 1 comment

Comments

@zefciu
Copy link

zefciu commented Sep 22, 2020

Currently openapi-core allows anything inside path parameters, as it uses the format parser to create regexes. This way the pattern
/foo/{arg1} will match /foo/bar/baz. This is contrary to the openapi3 spec which disallows matches like this (as discussed e.g. OAI/OpenAPI-Specification#502)

What’s more troublesome, if we have two paths defined:

  • foo/{arg1}
  • foo/{arg1}/baz

Then whether the path foo/bar/baz matches the first one or the other depends on the order in which dictionary is iterated.

Is there any good reason we do this like that?

@zefciu
Copy link
Author

zefciu commented Sep 22, 2020

No i see, this is fixed in master, sorry for this.

@zefciu zefciu closed this as completed Sep 22, 2020
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