Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bibiwan opened this issue Apr 18, 2018 · 3 comments
Open

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

bibiwan opened this issue Apr 18, 2018 · 3 comments

Comments

@bibiwan
Copy link

bibiwan commented Apr 18, 2018

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 ?

@bibiwan bibiwan changed the title Swagger file rendering - Elements sorted alphabetically [1.5.18] Swagger file rendering - Elements sorted alphabetically Apr 19, 2018
@webron
Copy link
Contributor

webron commented Apr 21, 2018

Where does the CSV come to play here? The use case is a bit unclear.

@bibiwan
Copy link
Author

bibiwan commented Apr 21, 2018 via email

@bibiwan
Copy link
Author

bibiwan commented Sep 12, 2018

Hi,

I'm back about my request. Could we just forget the CSV part ? Let's focus about this : is it possible that elements added to a Swagger instance are not sorted alphabetically when calling the method Yaml.pretty().writeValueAsString(factory); ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants