Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Elixir] Allow Elixir deserialization whenever the response is success #2344

Conversation

yknx4
Copy link
Contributor

@yknx4 yknx4 commented Mar 9, 2019

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, ./bin/openapi3/{LANG}-petstore.sh, ./bin/security/{LANG}-petstore.sh and ./bin/openapi3/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: master, 3.4.x, 4.0.x. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

  • Define macro that return true when response is success (Status Code 2xx)
  • Guard functions that are hardcoded to status 200

closes #2334
cc @mrmstn

@wing328
Copy link
Member

wing328 commented Mar 23, 2019

@yknx4 the CI job failed with the following error messages:


warning: found quoted atom "id" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:23

warning: found quoted atom "username" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:24

warning: found quoted atom "firstName" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:25

warning: found quoted atom "lastName" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:26

warning: found quoted atom "email" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:27

warning: found quoted atom "password" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:28

warning: found quoted atom "phone" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:29

warning: found quoted atom "userStatus" but the quotes are not required. Atoms made exclusively of Unicode letters, numbers, underscore, and @ do not require quotes
  lib/openapi_petstore/model/user.ex:30


== Compilation error in file lib/openapi_petstore/request_builder.ex ==
** (CompileError) lib/openapi_petstore/request_builder.ex:122: cannot find or invoke local is_success/1 inside guard. Only macros can be invoked in a guard and they must be defined before their invocation. Called as: is_success(status)

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (compile) on project ElixirPetstoreClientTests: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

Please take a look when you've time.

Please also resolve the merge conflicts. Let us know if you need help on that.

@wing328 wing328 added this to the 4.0.0 milestone Mar 23, 2019
@wing328
Copy link
Member

wing328 commented Mar 23, 2019

I think this PR is longer needed as #2355 has been merged into master

@wing328 wing328 closed this Mar 23, 2019
@wing328 wing328 removed this from the 4.0.0 milestone Mar 23, 2019
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.

[BUG][ELIXIR] deserialisation only happens when response has status 200
2 participants