Skip to content

Commit

Permalink
Do not sort YAML keys in examples (#139)
Browse files Browse the repository at this point in the history
* Do not sort YAML keys
  • Loading branch information
miarodri committed Jun 21, 2022
1 parent e3628e7 commit 8e55b58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion json_schema_for_humans/jinja_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def highlight_json_example(example_text: str) -> str:

def yaml_example(example_text: str) -> str:
"""Filter. Return a YAML version of the provided JSON text"""
yaml_text = yaml.dump(json.loads(example_text), allow_unicode=True)
yaml_text = yaml.dump(json.loads(example_text), allow_unicode=True, sort_keys=False)
return yaml_text


Expand Down

0 comments on commit 8e55b58

Please sign in to comment.