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

feat: added support for path-params outside methods for request-validation #216

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

Prashansa-K
Copy link
Contributor

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

…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-commenter
Copy link

codecov-commenter commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 69.08%. Comparing base (475b3aa) to head (1e46cdb).

Files with missing lines Patch % Lines
openapi2kong/validator.go 95.83% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

],
"name": "example_test-common-param-common-param_get",
"paths": [
"~/test/common-param/(?\u003ccommon_param\u003e[^#?/]+)$"
Copy link
Member

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.

@Prashansa-K Prashansa-K merged commit b9e8b45 into main Oct 29, 2024
3 checks passed
@Prashansa-K Prashansa-K deleted the feat/path-param-support-req-validator branch October 29, 2024 09:29
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

Successfully merging this pull request may close these issues.

Path parameters in Request Validator generation
3 participants