redoc
redoc copied to clipboard
Ordering of endpoints is random with the use of yaml library : switch to oyaml
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.
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.