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

[Java] Fix serialized name of discriminator in JSON.mustache #4672

Merged
merged 3 commits into from
Dec 26, 2019

Conversation

sebastien-rosset
Copy link
Contributor

@sebastien-rosset sebastien-rosset commented Dec 2, 2019

This PR has a fix for #4671. The JSON.mustache template should use "propertyBaseName" tag instead of "propertyName". The "propertyBaseName" tag is the name of the serialized property, whereas "propertyName" is the Java variable name.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@sebastien-rosset
Copy link
Contributor Author

sebastien-rosset commented Dec 2, 2019

Question: in this PR, should I augment the test OAS spec to include "unusual" discriminator property names, similar to https://gist.github.com/sebastien-rosset/f32f0abea11416bf82175577b48c251e#file-vehicles-yaml-L116? If so, which OAS file should I update? Or which OAS file should I create?

This problem could potentially apply to any programming language, so it might be a good idea to create a test OAS file which is used across all languages.

@sebastien-rosset
Copy link
Contributor Author

@sebastien-rosset

This comment has been minimized.

@sebastien-rosset
Copy link
Contributor Author

Also, independent of the PR, I see the following message in the UT logs:

found 33 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

@wing328
Copy link
Member

wing328 commented Dec 26, 2019

Also, independent of the PR, I see the following message in the UT logs:

Good catch. Can you please open an issue to track it?

@wing328
Copy link
Member

wing328 commented Dec 26, 2019

@sebastien-rosset thanks for the fix, which has been merged into master.

@sebastien-rosset
Copy link
Contributor Author

Also, independent of the PR, I see the following message in the UT logs:

Good catch. Can you please open an issue to track it?

sure, will do

@sebastien-rosset
Copy link
Contributor Author

Also, independent of the PR, I see the following message in the UT logs:

Good catch. Can you please open an issue to track it?

I have opened #4868. Unfortunately I can't find the location in the circleCI output where this message is printed. I am looking for a way to download all output in a single file.

@sebastien-rosset sebastien-rosset deleted the bugfix/issue4671 branch May 23, 2020 19:23
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