-
-
Notifications
You must be signed in to change notification settings - Fork 229
feat: Adds support for parameter components and parameter references. #615
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: Adds support for parameter components and parameter references. #615
Conversation
@dbanty friendly ping This PR should add a couple new regression tests as well but wanted to get your feedback first. |
ping again @dbanty |
Sorry for the delays @jsanchez7SC, I don't have very much time to work on this project right now 😬. I've skimmed your PR (though not reviewed it in depth) and if I understand it correctly then it looks pretty good. You're collecting all the references to parameters and processing them so they can be consumed later by any referrers, right? Basically, the same way we handle other sorts of references (schemas) already. I've approved CI so that you can follow up on any issues that pop up there. Hopefully, I'll get the time to do a more in-depth review soon. |
I've been OOO for the last couple of weeks. Will get back to the PR this week. |
Mind allowing the workflows to run @dbanty? Is there any way to allowlist this PR so I can finish developing and trigger CI by myself with shorter roundtrips? Thanks :-) |
Codecov Report
@@ Coverage Diff @@
## main #615 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 49 49
Lines 1713 1783 +70
=========================================
+ Hits 1713 1783 +70
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Done!
I don't know of a way to do that 😕. You should be able to run the checks in your fork though, since there's nothing special about the tests variable-wise. I think the only ones you wouldn't be able to run in your fork are the release-related ones. |
Got it. So purely |
Adds missing tests for a number of parameter-related methods.
Code coverage should be fixed now. Ready for a review |
Friendly ping for a review when you have time @dbanty |
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.
Looks good! The only changes are the couple of things I pointed out in the review, and could you add an e2e test? All you have to do is add some schemas you expect to work into end_to_end_tests/openapi.json
(just nab a real-life use-case if you have one), then run poetry run task re
to regenerate the "golden record" code.
Then we just check that the generated code looks right for the new endpoints & references. It's sort of a last-minute sanity check that the new feature does the thing we expect it to do when run on valid schema.
Thanks so much for implementing this and sorry for all the delays on reviews!
Removes a nonexisting parameter from update_parameters_with_data's docstring. Adds an end-to-end test for parameters passed by reference.
…m/jsanchez7SC/openapi-python-client into add_components_parameters_support
Thanks for all your work on this @jsanchez7SC! I'm just going to update a few tests and then merge via #653. |
…. Thanks @jsanchez7SC! Closes #288. Co-authored-by: Jordi Sanchez <[email protected]>
This PR partially resolves #288