-
-
Notifications
You must be signed in to change notification settings - Fork 263
fix logic for merging object schemas within a property#1159
fix logic for merging object schemas within a property #1159eli-bl wants to merge 6 commits intoopenapi-generators:main from
Conversation
10cae28 to
e6cdf95
Compare
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.
We need parent_name and config now because it might be necessary to generate a new inline schema.
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.
This is similar to the _PropertyData class that previously existed just to be a return type for _process_properties. Since they were so close already, and ModelProperty also had all of these properties, I figured it made sense to encapsulate them and have ModelProperty just own an instance of this class. I added accessor methods so that model.required_properties still works as an alias for model.details.required_properties.
fccd382 to
c363974
Compare
Uh oh!
There was an error while loading. Please reload this page.
Fixes #1123.
Details are as described in the changeset.
This is a breaking change only in cases where the previous logic was producing an unambiguously wrong result. That is, in the example shown in the changeset, any code that had previously relied on
ModelB.resultbeing an instance ofBaseResultrather thanExtendedResultwould now fail.