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

Consider generating releases-index.json schema with .NET 9 #9418

Open
richlander opened this issue Jul 18, 2024 · 2 comments
Open

Consider generating releases-index.json schema with .NET 9 #9418

richlander opened this issue Jul 18, 2024 · 2 comments

Comments

@richlander
Copy link
Member

I read about the new JsonSchemaExporter feature. Sounds great.

I also noticed that our JSON schema was generated with different tools and is perhaps out of date.

I took a quick stab at generating a schema using this new feature. It works and I think I was able to do a decent job at replicating much of the original schema.

Should we switch to using our own tools to generate all of our JSON schemas?

My eventual plan is to share all of this code in a more central place, particularly the DotnetRelease project. For many users, I think this project would satisfy pretty much all their needs. Perhaps we could include that in this repo.

@leecow @joeloff @Falco20019 @eiriktsarpalis @nagilson

@richlander
Copy link
Member Author

I updated the schema.

I propose:

I'm happy to do all of this, but want to give someone else first right of refusal to do the first two steps since I'm not the author of the original schema.

@richlander richlander changed the title Consider generating release-index.json schema with .NET 9 Consider generating releases-index.json schema with .NET 9 Jul 21, 2024
@Falco20019
Copy link
Contributor

Sounds good to me and should help keep the one in the store updated. We just need to make sure the generated one stays compatible and is not breaking anything.

I did a semantic comparison and it has at least those changes:

  • Missing $schema with added $comment and id (not sure if required)
  • Missing additionalProperties set to false on root and items (should be there to avoid additional/unknown parameters on validation)
  • definitions were removed (could lead to issues if someone was referencing them externally)
  • eol-date is not nullable anymore (strings are not nullable by default in JSON Schema; was it removed intentionally?)

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

No branches or pull requests

3 participants