smallrye / smallrye-open-api

SmallRye implementation of Eclipse MicroProfile OpenAPI
Apache License 2.0
117 stars 89 forks source link

Response code map is not sorted, which makes review hard #1811

Closed HerrDerb closed 5 months ago

HerrDerb commented 5 months ago

The response map of an api seems currently not sorted. The keys (response codes) of the object responses have a toggeling order which make a review really hard, up to impossible.

      responses:
        "201":
          description: Created
        "401":
          description: Not Authorized
        "403":
          description: Not Allowed

can toggle on the next generation run to:

      responses:
        "201":
          description: Created
        "403":
          description: Not Allowed
        "401":
          description: Not Authorized

Having a large api, any important change will be lost in the massiv diff.

I would expect, that I get a deterministic output.

MikeEdgar commented 5 months ago

@HerrDerb are you using Quarkus with auto-security in the OpenAPI? If so, this may have already been fixed there: https://github.com/quarkusio/quarkus/issues/40222

HerrDerb commented 5 months ago

Exactly this 👍 😀 Cheers