[REQ] Allow sorting Parameters by occurence in spec
Is your feature request related to a problem? Please describe.
There are some ways to influence the parameter order. Unfortunately the (legacy?) order of defaulting to the order in the OpenAPI manifest is not among them.
Describe the solution you'd like
I'd propose a parameter to specify preserveParameterOrder: true, defaulting to false, mutually exclusive to prependFormOrBodyParameters: true that does not reorder allParams.
Describe alternatives you've considered
I'd like to add my support for this feature request. In our project, we've noticed that the OpenAPI Generator rearranges the keys in our YAML file in a non-intuitive way, making it difficult for us to maintain and understand the structure of our API definitions.
For example, it moves the "title" key for an object further down, whereas we would prefer it to remain at the top. This simple but disruptive issue is preventing us from adopting openapi-generator, and we find that swagger-codegen is much more polite in this regard.
I agree with the proposed solution of having a preserveParameterOrder option, which would allow us to maintain the order of parameters as they appear in our OpenAPI manifest. This would greatly improve our experience using the OpenAPI Generator and encourage wider adoption of the tool.