Skip to content

Conversation

@tharders
Copy link
Contributor

Updated javascript ApiClient template to handle 204 server responses and handle exceptions in the deserialize method to ensure there are no uncaught exceptions.

This fixes the following issue
#4554

Note: I also updated the javascript-petstore.bat to use the petstore-with-fake-endpoints-models-for-testing.yaml like it is now in the shell script.

@wing328
Copy link
Contributor

wing328 commented Jan 20, 2017

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/swagger-api/swagger-codegen/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/swagger-api/swagger-codegen/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@wing328
Copy link
Contributor

wing328 commented Jan 20, 2017

@tharders your first PR looks very good 👍

I'll merge it after you fix the commit authorship.

Have a nice weekend!

@wing328 wing328 added this to the v2.2.2 milestone Jan 20, 2017
@wing328 wing328 merged commit 30315c8 into swagger-api:master Jan 23, 2017
@wing328 wing328 changed the title Fix Issue 4554 - handle 204 server response in javascript [JS] Add proper handle of 204 server response Feb 20, 2017
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
…i#4604)

* issues 4554: Handle 204 response and handle deserialize exceptions

* issue-4554: generate javascript client updated template

Used petstore-with-fake-endpoints-models-for-testing.yaml

* use petstore-with-fake-endpoints-models-for-testing.yaml like sh script
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.

2 participants