redoc icon indicating copy to clipboard operation
redoc copied to clipboard

Ordering of endpoints is random with the use of yaml library : switch to oyaml

Open rompom opened this issue 4 years ago • 1 comments

If you want an embedded openapi in the page, the order of the endpoints is not kept. The issue stem from there : https://github.com/sphinx-contrib/redoc/blob/master/sphinxcontrib/redoc.py#L94

The yaml library does not keep the order of the keys in dict structure.

I 've made a test with oyaml (https://github.com/wimglenn/oyaml), in this case the order is kept.

rompom avatar Mar 05 '20 12:03 rompom

Hey @rompom,

Thanks for reporting that. Honestly, I have no capacity to maintain this library. If you come up with a PR, I'll gladly accept it. However, I'd recommend another solution: simply use python3.6 or higher to build you Sphinx docs and you will face no issues with ordering.

ikalnytskyi avatar Mar 28 '20 16:03 ikalnytskyi