-
Notifications
You must be signed in to change notification settings - Fork 70
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
OpenAPI Common Parameters #479
OpenAPI Common Parameters #479
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #479 +/- ##
==========================================
+ Coverage 83.75% 83.96% +0.21%
==========================================
Files 217 228 +11
Lines 12593 12899 +306
==========================================
+ Hits 10547 10831 +284
- Misses 1668 1688 +20
- Partials 378 380 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Improve handling of Common Parameters
Common Parameters definition in OpenAPI spec:
Common Parameters for All Methods of a Path
Parameters shared by all operations of a path can be defined on the path level instead of the operation level. Path-level parameters are inherited by all operations of that path. A typical use case are the GET/PUT/PATCH/DELETE operations that manipulate a resource accessed via a path parameter.
This PR improves the results of: diff, breaking changes, and changelog with regards to common parameters.
Prior to the PR, common parameters were considered separately from the operation parameters.
After this PR, common parameters will be moved from the path and combined with operation parameters before running the diff.
As a result, the existing logic for operation parameters (diff, breaking changes, changelog etc.) will also be applied to common parameters.
New
--flatten-params
can be used with diff, breaking, changelog, delta and summary commands:For conformance, I'm also renaming the
flatten
flag asflatten-allof
.The old
flatten
flag will still be supported but will be hidden.