Skip to content

[1.5.18] Swagger file rendering - Elements sorted alphabetically  #2775

Description

@bibiwan

I need to render swagger files using POJO classes which reads description of an API from CSV files, and I use your API to get this done.

CSV files describes elements from a business point of view and are not sorted alphbetically.

Example :
Property 1 :
sub-property B
sub-property C
sub-property A

When I use your lib to generate swagger, here is what I get :
Property 1 :
sub-property A
sub-property B
sub-property C

As you can see, sub-properties are sorted.

Here is my method's code to get yaml string :
return Yaml.pretty().writeValueAsString(factory);
where factory is a io.swagger.models.Swagger instance.

Would it be possible not to sort the properties when rendering Yaml ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions