OpenAPITools / OpenAPITools/openapi-generator

[REQ] Option to preserve/specify order of paths

Open
#8,026 0 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

Is your feature request related to a problem? Please describe.

I am trying to present my paths in a certain order (in my case, the most frequently used ones should come first). They are in the desired order in my OpenAPI JSON document. But when I generate documentation from it, the generator puts them in a different order.

Describe the solution you'd like

I think there are two good solutions possible:

  1. A flag to preserve the order of paths as given in the JSON
  2. A flag to respect the "x-order" attribute (see https://goswagger.io/use/models/schemas.html under "Custom Extensions")

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

No implementation file, entry point, or test is identified in the issue. Reproduce generation from the referenced OpenAPI JSON, inspect where path order changes, and clarify whether completion means preserving document order, honoring x-order, or supporting both with tests for the selected behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi
Domain
api, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.