-
Notifications
You must be signed in to change notification settings - Fork 6k
Conditional copy properties from parent #1015
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
Conditional copy properties from parent #1015
Conversation
Pull request swagger-api#946 broke the TypeScript generation with inheritance where a superclass defined an enum. This makes it up to each language to decide the behavior appropriate for the language.
@wing328 Sure, assume you have this model:
In the code by @mhardorf the enum values are represented as an enum for each field. Since there's no notion in the swagger spec of shared enums. If the generated code does not use inheritance we will end up with a var x = Cat.huntingSkillEnum.lazy
x = Dog.huntingSkillEnum.clueless With inheritance we would only end up with one enum. |
@tandrup looks good |
…copy-from-parent # Conflicts: # modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/TypeScriptNodeClientCodegen.java
Conditional copy properties from parent
as per swagger-api#1015 (and swagger-api#946) this is now optional and disabled by default. this results in extra unnecessary code, masking fields in some cases, and breaks code generated for jax-rs in certain cases (enums with inheritance). (not having inheritance
as per swagger-api#1015 (and swagger-api#946) this is now optional and disabled by default. this results in extra unnecessary code, masking fields in some cases, and breaks code generated for jax-rs in certain cases (enums with inheritance). (not having inheritance
as per swagger-api#1015 (and swagger-api#946) this is now optional and disabled by default. this results in extra unnecessary code, masking fields in some cases, and breaks code generated for jax-rs in certain cases (enums with inheritance).
as per swagger-api#1015 (and swagger-api#946) this is now optional and disabled by default. this results in extra unnecessary code, masking fields in some cases, and breaks code generated for jax-rs in certain cases (enums with inheritance).
as per swagger-api#1015 (and swagger-api#946) this is now optional and disabled by default. this results in extra unnecessary code, masking fields in some cases, and breaks code generated for jax-rs in certain cases (enums with inheritance).
Pull request #946 broke the TypeScript generation with inheritance where a superclass defined an enum. This pull request makes it up to each language to decide the behavior appropriate for the language.