don't sort YAML keys by n2ygk · Pull Request #6680 · encode/django-rest-framework (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation4 Commits2 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

n2ygk

Description

This adds a new PyYAML >= 5.1 feature to suppress sorting the dict when dumping to yaml.
This makes the openapi.yaml file more human-readable with keys appearing in the order they were added.

@carltongibson another candidate for 3.10?

@tomchristie

Oh that sounds like a neat one!

rpkilby

carltongibson

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, super yes. Thanks. 👍

@n2ygk n2ygk deleted the openapi_unsorted_yaml branch

June 9, 2019 14:17

pchiquet pushed a commit to pchiquet/django-rest-framework that referenced this pull request

Nov 17, 2020

@n2ygk

sigvef pushed a commit to sigvef/django-rest-framework that referenced this pull request

Dec 3, 2022

@n2ygk @sigvef