-
-
Notifications
You must be signed in to change notification settings - Fork 392
Allow including path parameters in generated models #2445
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
Allow including path parameters in generated models #2445
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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.
CodSpeed Performance ReportMerging #2445 will not alter performanceComparing Summary
|
@gaborbernat thanks for reviewing and approving. I fixed the black formatting issues in the tests and verified that they are passing locally, can you approve the CI runs and merge if they pass. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2445 +/- ##
=======================================
Coverage 98.09% 98.10%
=======================================
Files 66 66
Lines 8307 8324 +17
Branches 837 838 +1
=======================================
+ Hits 8149 8166 +17
Misses 115 115
Partials 43 43
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
You need to add tests 👍 |
@gaborbernat I added a test for the uncovered lines and updated the readme and docs with the script |
You need to fix the linter errors now 😊 |
b2b78ff
to
5512fe1
Compare
@gaborbernat Sorry for missing that, still getting used to the setup here. The linter error is fixed in the same way as in other tests now. |
This PR adds a new
--include-path-parameters
CLI flag that enables the generation of parameter models containing both path and query parameters when using--openapi-scopes parameters
.Changes
--include-path-parameters
flag to CLI argumentsParametersQuery
toParameters
when path parameters are includedRationale
I need this to validate the complete parameter set for an endpoint (e.g.,
GET /users/{user_id}?include=profile&format=json
generates a singleParameters
model containinguser_id
,include
, andformat
fields) for use in SDKs.The flag is opt-in to maintain backward compatibility.