-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[python-experimental] generate model if type != object if enums/validations exist #2757
Changes from all commits
941edac
b5e3443
1577f9b
b27b40e
35386ef
8a206f6
2eed5da
762bc06
d080f0f
543b483
a4dcce4
c366230
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -490,10 +490,9 @@ private Model getParent(Model model) { | |
|
||
// TODO revise below as we've already performed unaliasing so that the isAlias check may be removed | ||
Map<String, Object> modelTemplate = (Map<String, Object>) ((List<Object>) models.get("models")).get(0); | ||
// Special handling of aliases only applies to Java | ||
if (modelTemplate != null && modelTemplate.containsKey("model")) { | ||
CodegenModel m = (CodegenModel) modelTemplate.get("model"); | ||
if (m.isAlias) { | ||
if (m.isAlias && !ModelUtils.isGenerateAliasAsModel()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @spacether without There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's right There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI. I've filed #3951 as |
||
continue; // Don't create user-defined classes for aliases | ||
} | ||
} | ||
|
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.
All of this code was moved and not changed in any way
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.
Yup, noticed that too.