Skip to content

fix: Added a flag to generate header based routes only when needed#292

Merged
shivaygupta-dotcom merged 2 commits intomainfrom
fix/openapi2kong-skip-header-routes
Apr 30, 2026
Merged

fix: Added a flag to generate header based routes only when needed#292
shivaygupta-dotcom merged 2 commits intomainfrom
fix/openapi2kong-skip-header-routes

Conversation

@shivaygupta-dotcom
Copy link
Copy Markdown
Contributor

@shivaygupta-dotcom shivaygupta-dotcom commented Apr 29, 2026

GH: Kong/deck#2037
FTI: https://konghq.atlassian.net/browse/FTI-7492

Summary:
We had added a feature in decK version v1.52.0, where If user has declared header parameters, and their values (in an enum) in the OAS - we started including those in the generated routes.
Recently we got above FTI, where one of the customer, don't want headers to be included in the generated routes.
So we have introduced a new cli flag skip-header-routes, to skip headers in the routes.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.98%. Comparing base (96899b9) to head (7a9518c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #292   +/-   ##
=======================================
  Coverage   64.98%   64.98%           
=======================================
  Files          25       25           
  Lines        3119     3119           
=======================================
  Hits         2027     2027           
  Misses        881      881           
  Partials      211      211           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shivaygupta-dotcom shivaygupta-dotcom marked this pull request as ready for review April 29, 2026 08:27
@shivaygupta-dotcom shivaygupta-dotcom force-pushed the fix/openapi2kong-skip-header-routes branch from a046fc8 to 144cdb9 Compare April 29, 2026 08:29
@shivaygupta-dotcom shivaygupta-dotcom force-pushed the fix/openapi2kong-skip-header-routes branch from 144cdb9 to 4608a61 Compare April 29, 2026 08:31
Comment thread openapi2kong/openapi2kong.go Outdated
// Generate separate routes for each header enum even if required: false
TreatAllHeadersAsRequired bool
// Skip generation of separate routes for header parameter enums
SkipHeaderRoutes bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we call this SkipRouteByHeader instead? This will need to be added as a CLI flag in deck as well - --skip-route-by-header

@shivaygupta-dotcom shivaygupta-dotcom merged commit d157bf3 into main Apr 30, 2026
5 checks passed
@shivaygupta-dotcom shivaygupta-dotcom deleted the fix/openapi2kong-skip-header-routes branch April 30, 2026 06:13
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.

3 participants