Skip to content

Add openapi3.Schema.OrderedPropertyKeys#1002

Closed
diamondburned wants to merge 1 commit into
getkin:masterfrom
diamondburned:ordmap-0.80.0
Closed

Add openapi3.Schema.OrderedPropertyKeys#1002
diamondburned wants to merge 1 commit into
getkin:masterfrom
diamondburned:ordmap-0.80.0

Conversation

@diamondburned
Copy link
Copy Markdown

This commit adds the OrderedPropertyKeys method to the
openapi3.Schema:

OrderedPropertyKeys returns the keys of the properties in the order
they were defined. This is useful for generating code that needs to
iterate over the properties in a consistent order. If the keys could
not be extracted for some reason, then this method automatically
sorts the keys to be deterministic.

This is done via a temporary fork of the YAML-to-JSON transformation library.
It will not be ready until these PRs are merged in this order:

- https://github.com/silasdavis/yaml/pull/1
- https://github.com/ghodss/yaml/pull/62

This commit adds the `OrderedPropertyKeys` method to the
`openapi3.Schema`:

    OrderedPropertyKeys returns the keys of the properties in the order
    they were defined. This is useful for generating code that needs to
    iterate over the properties in a consistent order. If the keys could
    not be extracted for some reason, then this method automatically
    sorts the keys to be deterministic.

This is done via a temporary fork of the YAML-to-JSON transformation library.
It will not be ready until these PRs are merged in this order:

    - silasdavis/yaml#1
    - ghodss/yaml#62
@diamondburned
Copy link
Copy Markdown
Author

Replaced by #1003.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant