Skip to content

Conversation

@velzevur
Copy link
Contributor

@velzevur velzevur commented Dec 7, 2017

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if 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\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Fixes #7128
If the decoding of the JSON fails - the error is caught and propagated

@wing328
Copy link
Contributor

wing328 commented Dec 9, 2017

cc @galaxie @tsloughter

@wing328 wing328 added this to the v2.3.0 milestone Dec 9, 2017
@wing328 wing328 merged commit b4f7074 into swagger-api:master Dec 9, 2017
@wing328 wing328 changed the title GH-7128 [Erlang server] handle broken JSON [Erlang server] handle broken JSON Dec 9, 2017
@tsloughter
Copy link
Contributor

@velzevur why does this change the samples/server/petstore/erlang-server/priv/swagger.json file?

And this is good, but ultimately we need to move the json decoding out of the api.mustache, partly since it isn't always going to even be json but have to be based on the content type.

So what I'd like to see is a library that can be used to handle all that and the api.mustache functions simply pass everything it builds up and currently passes to hackney to pass to it (which ultimately will also use hackney).

Just letting you know in case you or someone you know looks to work on this more :) Thanks!

@velzevur
Copy link
Contributor Author

velzevur commented Dec 9, 2017

@tsloughter I was wondering the same, I guess the samples/server/petstore/erlang-server/priv/swagger.json wasn't up to date for some reason.
Same holds true for the VERSION, too

Gingonic pushed a commit to wirelane/swagger-codegen that referenced this pull request Dec 9, 2017
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