Open aliaksei-taliuk opened 2 years ago
Hey @aliaksei-taliuk ,
yes, afaik the supported spec formats don't require any property order nor imply semantics with the ordering.
Spring Restdocs values the order in which fields are documented for the generated HTML docs, so maybe we should do the same. The current "shuffleing" probably stems from use of HashMaps/HashSets (over insertion-order-stable LinkedHashMaps, LinkedHashSets) or the Kotlin equivalents.
Thanks for the reply! This enhancement would be much appreciated!
I am also experiencing the same issue and I don't understand how to solve it. The latest version is 1.9.0.
The yaml is not created in the order of FieldDescriptor entered in requestFields of the test code.
I am not using Map or Set. What should I do?
I also attach the code and result screen.
< Test Code >
< Result >
Hi!
I have the next documentation section in my test:
while OpenAPI Spec has the next relevant section:
which doesn't match the order in my test.
I do understand that from the structural point of view this is not a problem at all, but it is important when you trying to generate some static web pages based on Open API Spec. And there you may see fields in some non-logical order.
I do appreciate any feedback and your thoughts in this regard!
Thanks in advance!