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

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

@edson-19

Description

@edson-19

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions