OpenAPITools / OpenAPITools/openapi-generator

[REQ][java][jackson] Add JsonPropertyOrder annotation for Spring Boot generator

Open
#23,933 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Jackson 3 now by default sorts properties properties alphabetically instead of following the logical order of the generated classes.
This seems to be only fixable by adding the JsonPropertyOrder annotation (disabling the alphabetical sort in Jackson does nothing).

In the pull request related to issue 3629, this was done for the JAX-RS server, but not for any other Java generators.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading pull request 3778 and issue 3629 to understand the existing JAX-RS implementation, then inspect the Spring Boot generator templates and generation path. The work is complete when generated Spring Boot Java classes include the requested JsonPropertyOrder annotation and preserve the logical property order.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.