-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: added support for path-params outside methods for request-validation #216
Conversation
…ation. This change allows the deck file openapi2kong command to create request validation configuration for path parameters directly under a route, not nested under an operation/method. Till now, we supported path parameters nested under a method. Fixes: #207
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #216 +/- ##
==========================================
+ Coverage 68.15% 69.08% +0.93%
==========================================
Files 24 24
Lines 2553 3290 +737
==========================================
+ Hits 1740 2273 +533
- Misses 644 848 +204
Partials 169 169 ☔ View full report in Codecov by Sentry. |
openapi2kong/oas3_testfiles/18-request-validator-plugin-path-params-outside-ops.yaml
Show resolved
Hide resolved
openapi2kong/oas3_testfiles/18-request-validator-plugin-path-params-outside-ops.yaml
Show resolved
Hide resolved
prioritise operation param
openapi2kong/oas3_testfiles/19-request-validator-plugin-op-params-override-path-params.yaml
Outdated
Show resolved
Hide resolved
], | ||
"name": "example_test-common-param-common-param_get", | ||
"paths": [ | ||
"~/test/common-param/(?\u003ccommon_param\u003e[^#?/]+)$" |
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.
at some point the output switched to escaping the curly braces here, after I updated the underlying lib version. This script: https://github.com/Kong/go-apiops/blob/main/openapi2kong/oas3_testfiles/_fixup_expected.sh can be used to fix those.
This change allows the deck file openapi2kong command to create request validation configuration for path parameters directly under a route, not nested under an operation/method. Till now, we supported path parameters nested under a method.
Fixes: #207