Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Model java class generated with @JsonPropertyOrder - wrong order #39

Open
edson-19 opened this issue Feb 8, 2019 · 0 comments
Open

Comments

@edson-19
Copy link

edson-19 commented Feb 8, 2019

Describe the bug
The model java class generated contains wrong fields order in @JsonPropertyOrder

To Reproduce
Steps to reproduce the behavior:

  1. include the api.raml attached

  2. include the attached schema file
    raml-codegen-issue.zip

  3. include the attached example json request file

  4. run the mvn clean install to generate the java client model class

  5. verify the @JsonPropertyOrder in the generated java model class -- fields are not in the expected/required order to work properly when send the body request.

Expected behavior
the @JsonPropertyOrder in the generated java model class -- fields must be in the expected/required order to work properly when send the body request.

Party.java model generated with @JsonPropertyOrder
expected:
@JsonPropertyOrder({
"@id",
"PartyTypeCode",
"FullName",
"GovtID",
"GovtIDTC",
"GovtIDCertificationDate",
"ResidenceCountry",
"Person",
"Organization",
"Address",
"Phone",
"Producer",
"EMailAddress",
"OLifEExtension"
})

current:
@JsonPropertyOrder({
"@id",
"PartyTypeCode",
"FullName",
"GovtID",
"GovtIDTC",
"GovtIDCertificationDate",
"ResidenceCountry",
"Person",
"Address",
"Phone",
"EMailAddress",
"Producer",
"Organization",

"OLifEExtension"
})

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant