[TypeScript] Make OpenAPI Generator serialize subclasses properly#102
Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom May 28, 2018
Merged
[TypeScript] Make OpenAPI Generator serialize subclasses properly#102wing328 merged 2 commits intoOpenAPITools:masterfrom
wing328 merged 2 commits intoOpenAPITools:masterfrom
Conversation
Motivation ---- Previously, when serializing as subclass of a property, generated swagger clients would only serialize properties of the parent class causing some values to not be pass through Modifications ---- Before serializing attributes of a given type, we check to see if there is a specific type to be serialized so that we don't miss any properties.
wing328
reviewed
May 18, 2018
| return data; | ||
| } | ||
|
|
||
| // Get the actual type of this object |
Member
There was a problem hiding this comment.
@gbrown-ce Can we use 4-space instead of tab for indentation here?
Motivation ---- OpenAPI Generator upstream requested whitespace fixes (from tabs to 4 spaces) Modifications ---- Fixed whitespace
Contributor
|
I think this does not fix the underlying issue and is merely a convenient workaround: I think a proper fix for this would need to rewrite the serializer to support those 3 constraints. e.g.
|
Contributor
|
Ignore my comment above. I misunderstood the issue initially and gbrown-ce helped clear it up in #100. |
Contributor
Author
Member
|
If no one has further feedback on this PR, I"ll merge it tomorrow (Fri). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\.master.Description of the PR
Motivation
Previously, when serializing as subclass of a property, generated swagger clients would only serialize properties of the parent class causing some values to not be pass through
Modifications
Before serializing attributes of a given type, we check to see if there is a specific type to be serialized so that we don't miss any properties.
Issue: #100
@TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @wing328