-
Notifications
You must be signed in to change notification settings - Fork 527
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
Schema.json is not stable #759
Comments
Yeah that's an understandably annoying problem. Fundamentally it comes down to the JSON library though since that's really where the order is lost, which is of course perfectly legal from the JSON spec. |
Hi @benwilson512, that's what I thought at first as well, but the list order is not the same for the same schema (and lists are ordered in JSON). |
Reproduce by:
If you do that for two generated schema.json files and diff them they are not the same. |
I think it will be resolved by sorting the list of types (by for instance type name) |
Would this lib be useful to you? |
Ah great! Seems like somebody had the exact same problem, and solved it with a custom encoder. Thanks! |
This worked great. @benwilson512: You might want to consider adopting these few lines of code to stabilize the lists in the |
This is great @benwilson512 !! Thanks a lot for the work! |
The
schema.json
is not stable at the moment. Even if I order the object keys in the json file, it's not stable with the same schema. This means that arrays are not generated in the same order. Would be nice to have this for git checkins and docker cache busting.The text was updated successfully, but these errors were encountered: