Skip to content

[JS] Add constructFromObject to Javascript enum generation.#4120

Merged
wing328 merged 2 commits intoswagger-api:masterfrom
keysolutions:master
Nov 5, 2016
Merged

[JS] Add constructFromObject to Javascript enum generation.#4120
wing328 merged 2 commits intoswagger-api:masterfrom
keysolutions:master

Conversation

@keysolutions
Copy link
Copy Markdown
Contributor

Generated code calls constructFromObject on enum types, but enum did not define the necessary function. Returns the value of the enum.

Generated code calls constructFromObject on enum types, but enum did not define the necessary function. Returns the value of the enum.
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Nov 4, 2016

@keysolutions please run ./bin/javascript-petstore-all.sh to update the Petstore JS API clients so that CIs can verify the change

@wing328 wing328 merged commit ab9ea5b into swagger-api:master Nov 5, 2016
@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Nov 5, 2016

@keysolutions thanks for the PR, which has been merged into master.

acramatte added a commit to comerge/swagger-codegen that referenced this pull request Nov 9, 2016
* upstream/master: (42 commits)
  add vendor extension to handle void response in jaxrs-cxf
  better handling of */*
  Select application/json content-type in python generated client, if */* is in the list of content-types
  update mxf4j sample
  [ObjC] Fix deprecated JSONModel API usage (swagger-api#4133)
  [aspnet5] Fix broken template directory for deprecated lang (swagger-api#4142)
  Add constructFromObject to Javascript enum generation. (swagger-api#4120)
  [Obj-c] Generated code documentation fixes (swagger-api#4130)
  Added QAdept to companies list
  added clarification for swagger-api#4138
  Default added sourceFolder to src/main/java
  Update pojo.mustache
  [feign] Use feign-form (swagger-api#4124)
  DART: Removed the 'justIgnoreThisFlag' flag (swagger-api#4116)
  fix[dart]: multi-word class names work properly now
  [ruby] Validate array correctly It never throws error with any values in array. Every element should be validated against the enum.
  remove glassfish dependencies and use MSF4J internal implementation for the simplicity and reduce dependencies
  updated to next development version
  Added isEmtyString check to avoid IndexOutOfBoundException
  Nancy fx work (swagger-api#4107)
  ...
@wing328 wing328 changed the title Add constructFromObject to Javascript enum generation. [Javascript] Add constructFromObject to Javascript enum generation. Feb 20, 2017
@wing328 wing328 changed the title [Javascript] Add constructFromObject to Javascript enum generation. [JS] Add constructFromObject to Javascript enum generation. Feb 20, 2017
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
)

* Add constructFromObject to Javascript enum generation.

Generated code calls constructFromObject on enum types, but enum did not define the necessary function. Returns the value of the enum.

* Update Petstore JS API client
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants