[JS] constructFromObject from enum should return value#4613
Merged
wing328 merged 1 commit intoswagger-api:masterfrom Jan 23, 2017
Merged
[JS] constructFromObject from enum should return value#4613wing328 merged 1 commit intoswagger-api:masterfrom
wing328 merged 1 commit intoswagger-api:masterfrom
Conversation
When constructing an enum through constructFromObject the original value provided by the API response should be returned rather than extracting the value from the enum name. This resolves an issue where the constructed value is undefined when the name and value are not equivalent.
acramatte
added a commit
to comerge/swagger-codegen
that referenced
this pull request
Mar 7, 2017
* upstream/master: (261 commits) tests, fix for swagger-api#4647. Proper escaping project name per npmjs (swagger-api#4648) Add support for read-only values in spring model (swagger-api#4629) new batch file to exec all JS petstore batch files update JS petstore client Fix the `rm` to remove the correct file in two spring generation bash scripts (swagger-api#4630) fix for allowable values, swagger-api#4645 (swagger-api#4646) Issue 4637 Fix for ci build (swagger-api#4643) Added single quotes -- fixes bug where generated client throws an 'Uncaught Reference Error'. add https://pagertree.com/ add https://neverfail.com/ Removed pet variable from Javascript api_test Mustache file, which was undefined and is not necessary here. This should fix issue swagger-api#4608. (swagger-api#4624) Removed pet variable from Javascript api_test Mustache file, which was undefined and is not necessary here. This should fix issue swagger-api#4608. update ts angular2 petstore samples Enum constructFromObject should return value (swagger-api#4613) update js promise petstore sample Fix Issue 4554 - handle 204 server response in javascript (swagger-api#4604) Fix model prefix/suffix with incorrect camelization (swagger-api#4621) better handling of reserved words in models, operationId (swagger-api#4620) [java] Improve pom.xml to qualify for publishing to Maven central (swagger-api#4616) rebuilt samples ...
davidgri
pushed a commit
to davidgri/swagger-codegen
that referenced
this pull request
May 11, 2017
When constructing an enum through constructFromObject the original value provided by the API response should be returned rather than extracting the value from the enum name. This resolves an issue where the constructed value is undefined when the name and value are not equivalent.
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.
When constructing an enum through constructFromObject the original value provided by the API response should be returned rather than extracting the value from the enum name. This resolves an issue where the constructed value is undefined when the name and value are not equivalent.