Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Order of properties #4

Open
handrews opened this issue Apr 30, 2018 · 0 comments
Open

Order of properties #4

handrews opened this issue Apr 30, 2018 · 0 comments

Comments

@handrews
Copy link
Contributor

JavaScript does not reliably preserve object field ordering, and it is not trivial to hook JSON.parse() to produce a data structure that does. There are several possible solutions.

The JSON Schema UI vocabulary, if it gets off the ground, is likely to have keywords for managing display order. But there may be other options to explore. This issue tracks ideas for solving this problem.

The new implementation here tries to minimize changes to the parsed objects, so the problem may not be as bad, particularly when allOf is not heavily used to combine property sets.

The forthcoming UI should respect the required array for ordering those fields, but there is no corresponding way to order non-required fields. Also, if allOf and required are used together, the results may not be as expected.

Also paging @tajo @zackproser @Relequestual @Codelica
This replaces cloudflare/doca#28

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

No branches or pull requests

1 participant