oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

x-order not retaining the order mentioned in spec

Open suppula-apptio opened this issue 1 year ago • 3 comments

https://github.com/deepmap/oapi-codegen/issues/1607 x-order is given as a solution for the above issue. But even after giving x-order still the order of the props coming in alphabetic order instead of what mentioned in spec.

suppula-apptio avatar May 14 '24 10:05 suppula-apptio

Are you sure you are running the latest v2.1.0? Because x-order was only introduced in these latest and recent release. I had the same issue but after updating to v2.1.0 it works. Also note as explained in the README that x-order is starting with the value 1, not 0.

bjarnemagnussen avatar May 15 '24 09:05 bjarnemagnussen

@bjarnemagnussen is this v2.1.0 openapi version, which will be given in spec? Can you specify where I have to change this.?

suppula-apptio avatar May 15 '24 18:05 suppula-apptio

@suppula-apptio sorry, not the version of the spec but the version of oapi-codegen

jamietanna avatar May 16 '24 07:05 jamietanna