-
-
Notifications
You must be signed in to change notification settings - Fork 227
Support inline object schemas #236
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
Conversation
…uired and nullable. Model to_dict methods now have parameters to alter what fields are included/excluded
Co-authored-by: Dylan Anthony <43723790+dbanty@users.noreply.github.com>
…support_inline_object_schemas
Co-authored-by: Dylan Anthony <43723790+dbanty@users.noreply.github.com>
…d but nullable properties no longer have a default value
…support_inline_object_schemas
Codecov Report
@@ Coverage Diff @@
## main #236 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 41 46 +5
Lines 1332 1302 -30
=========================================
- Hits 1332 1302 -30
Continue to review full report at Codecov.
|
@emannguitar there is something weird going on here with Unset and json body params. Not sure why it's doing what it's doing. Looks to me like the param is required? I've been staring at this too long and could use a second set of eyes. The problem child is in golden-record/api/tests/test_inline_objects/_get_kwargs if you get a moment and can poke at it. I think that's the last bit of failing tests before I can move on to implementing the new features for responses too. |
Nevermind I fixed it! Was reassigning a variable in a loop 🤦🏻♂️ |
Because naming fixes are actually required to get this feature across the finish line, I'm going to close #191 with this too. |
d58d0fa
to
f3672a1
Compare
98ce9b1
to
0cbbcd4
Compare
0cbbcd4
to
fbdbd21
Compare
I generated a prox trace client and read through some of it, it all looked good. Probably should generate inv/frt clients and test them in FST just to make sure nothing subtle is broken. After merge I'm going to release main as 0.7.0-alpha.0 so any adventurous souls can try out all the breaking changes before we call it done. @emannguitar will hopefully be one of those people. |
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.
Breaking change with File stuffs needs to be documented + a suggestion for possible improvement on converting defaults, but other than that looks good!
...o_end_tests/golden-record-custom/custom_e2e/api/tests/octet_stream_tests_octet_stream_get.py
Show resolved
Hide resolved
@emannguitar I believe this is ready for approval now? Double check my new changelog note makes sense. |
Requested by a whole host of people, this will close #162 by generating classes for object-type schemas declared "inline" instead of just for those included in references. Today, depending on where there declared, those types of schemas are either converted to generic dictionaries or thrown out altogether.
In order to achieve this, this PR also includes some major refactoring of the way Models (classes to be generated from schemas) and Enums are handled.
TODO: