Commit Graph

3 Commits

Author SHA1 Message Date
Jamie Tanna a36331e62a chore(tools/schema): upgrade internal schemas to JSON Schema draft-07 (#38752)
As noted in #38749, we need to upgrade to draft-07 of JSON Schema to
upgrade our dependency on AJV.

To do so, we "just" need to update the `$schema`, as we're not using
anything that's been deprecated/removed/changed as part of draft-07.

This doesn't impact anything user-facing (as these are schemas for
internal data files), and the schema doesn't change.

This appears to be supported by `vscode-json-languageservice`, which is
used by several IDEs (including VSCode) and editors to perform JSON
Schema validation in-editor.
2025-10-21 09:06:19 +00:00
Jamie Tanna e0ed4e8f23 ci(tools/json-schema): validate data files against their JSON schemas (#38740)
To ensure that our `lib/data` files match the JSON schemas that we have
defined, we can also introduce these into the `tools/validate-schema.ts`
file.

This loops through the known files and the JSON Schema that defines
them, then validates them with AJV.

Note that this also requires the following schema changes:

- using draft-04 everywhere (for ease, as we're not using draft-07
  functionality)
- using a consistent `$schema` identifier, to match the document `$id`
- make sure that the top-level `all` key doesn't get matched by
  `patternProperties`

The core of this - as little code as it is - was generated via GPT-4.1,
based on existing code in this file.

Co-authored-by: gpt-4.1 <jamie.tanna+github-copilot@mend.io>
2025-10-20 16:11:49 +00:00
Sergei Zharinov 2197818aa4 feat(presets): Package abandonment preset (#36210) 2025-06-16 10:26:25 +00:00