-
Notifications
You must be signed in to change notification settings - Fork 32
Model java class generated with @JsonPropertyOrder - wrong order #39
Description
Describe the bug
The model java class generated contains wrong fields order in @JsonPropertyOrder
To Reproduce
Steps to reproduce the behavior:
-
include the api.raml attached
-
include the attached schema file
raml-codegen-issue.zip -
include the attached example json request file
-
run the mvn clean install to generate the java client model class
-
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.