Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Import OpenAPI v2.0 command #76
Import OpenAPI v2.0 command #76
Changes from 19 commits
9937f0b
e7d32ca
1f48898
724c25a
5300c31
b4e119f
2b2b46b
bd4ea44
02fb39c
49112dc
3989fb8
d337a7c
f84782c
ab7f285
eb12e6a
ea3a8ca
895ec2d
4f3c0d9
bcadd67
d93f0d6
7da6ebb
1cacde2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the pattern compatible with what mapping rules support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
haven't checked that. Is it documented what mapping rules support in
pattern
field? Send link please.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation: https://github.com/3scale/porta/blob/8022f744c58a8a64f6fcfb8d2f2129fd9eaad74d/config/locales/en.yml#L530-L557
The implementation: https://github.com/3scale/apicast/blob/c3e431df20f65686798d1e67d8c4e9f568ef9c08/gateway/src/apicast/mapping_rule.lua#L30-L35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mapping rules accepted expression set includes openapi 2.0 path expressions.
The field name MUST begin with a slash and Path Templating is allowed.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#patterned-fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it works.
Defining a path
/pets
would match/pets/{id}
too. Is that desired? Our expressions are not the exact match to the whole string, just matching the beginning.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cannot find path matching spec in OAS 2.0 spec. I just found clarifications on path overlapping issues
From common sense, I would expect OAS 2.0 spec to do exact match. Just a guess.
Since apicast does just prefix matching, I guess we need to specify somehow end of string when creating mapping rule in 3scale. That only if my assumption about exact match on OAS 2.0 is correct. Is there a way to do that? Adding '/' in the end would not work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eguzki it is described in the documentation mentioned in #76 (comment) (using $ at the end)