-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Better handling of Inline schema #13498
Conversation
This PR does not resolve the following: openapi: 3.0.1
components:
schemas:
Language:
type: object
properties:
name:
type: string
readOnly: true
Clan:
type: object
properties:
chatLanguage:
# nullable: true
allOf:
- $ref: '#/components/schemas/Language'
|
* removed all of class * reverting commented test * create method to set isInherited
@@ -75,12 +73,10 @@ part 'serializers.g.dart'; | |||
ArrayTest, | |||
Capitalization, | |||
Cat, | |||
CatAllOf,$CatAllOf, |
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.
looking at the dart samples in
https://github.com/OpenAPITools/openapi-generator/tree/inline-schema-improve3/samples/openapi3/client/petstore/dart-dio
I see that the inline model files still remain but their reference is removed here
what might be causing this ?
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.
https://github.com/OpenAPITools/openapi-generator/blob/inline-schema-improve3/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart is left over from previous code generation.
I can confirm manually removing https://github.com/OpenAPITools/openapi-generator/blob/inline-schema-improve3/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/lib/src/model/cat_all_of.dart and regenerating dart samples will recreate this file, which is the expected behaviour as part of this change.
UPDATE: started a new PR (#15682) using a different approach |
UPDAT: #15682 has been merged. |
Better handling of Inline schema based on feedback from the users.
allOf inline schemas (children) are not created by default.
PR checklist
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*
.For Windows users, please run the script in Git BASH.
master
(6.1.0) (minor release - breaking changes with fallbacks),7.0.x
(breaking changes without fallbacks)