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

Fix stale schema #6286

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ulidtko
Copy link

@ulidtko ulidtko commented Nov 23, 2024

Hi!

Two brief commits here, fixing issues in product-schema.json for validating the frontmatters.

See commit messages 👀

See https://json-schema.org/understanding-json-schema/reference/string#dates-and-times

Pretty much all products specify already YYYY-MM-DD a.k.a. json-schema format: 'date'.

Not 'date-time'.

Additionally, the releaseDate key is specified as #/$defs/boolOrDate, which besides the
bool variant, accepts json-schema string format: 'date'.
After commit 1312fab, the actual
schema has changed; but product-schema.json was left stale.

Fix that by factoring out the auto.methods enum into $defs, and
repairing the nesting structure in the schema.
Copy link

welcome bot commented Nov 23, 2024

Thank you for opening this pull request 👍. If you are not familiar with the project, please check out our Contributing Guidelines and our Guiding Principles. Also take a look at our Hacking Guide if you intend to work on site internals.

@BiNZGi BiNZGi added the product-updates Product content updates that are not fixes nor releases updates label Dec 9, 2024
@@ -472,7 +488,7 @@
"title": "Latest release date",
"description": "The date of the latest release.",
"type": "string",
"format": "date-time"
"format": "date"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit d28c0b2 👀

Comment on lines +74 to +87
"type": "object",
"required": ["methods"],
"properties": {
"cumulative": {
"title": "Mark auto-update as being cumulative (optional, default = false)",
"description": "When true, data won't be deleted before fetching new data.\nActivating cumulative updates is not recommended for most products, but could be useful for products that:\n - have a long history of releases that is long to fetch,\n - have a history of releases that is not available anymore.",
"type": "boolean"
},
"methods": {
"title": "Auto-update configs",
"description": "See https://github.com/endoflife-date/endoflife.date/wiki/Automation",
"type": "array",
"items": {
"$ref": "#/$defs/automethod"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit 4961fb8 👀

repairs product-schema.json staleness introduced in 1312fab — the actual schema has changed [method1, method2]{"cumulative": bool, "methods": [method1, method2]}.

the large oneOf switch was factored out into $defs below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product-updates Product content updates that are not fixes nor releases updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants