agama/rust/agama-lib/share
Ladislav Slezák 4b7e7b789f
Autoinstallation schema improvements (#2773)
## Small improvements for the autoinstallation schema

- Added product name examples (so they are used in autocompletion)
- Allow using "$schema" key for linking the schema definition, some
editors like VSCode use that for validating the JSON file automatically
when pointed to the schema location
- Use "agama-project" in the GitHub URLs

## Testing

Tested in local VSCode and the online [VSCode for
web](https://vscode.dev/):

<img width="1042" height="945" alt="vscode-agama-profile-products"
src="https://github.com/user-attachments/assets/ebdf27c7-d99c-44cb-bb56-8fe5ccd97600"
/>
2025-10-01 16:53:34 +02:00
..
examples Fix the variable field in JSonnet example 2025-08-17 18:33:08 -05:00
.gitignore Fix the JSON schema and validate it in CI (#2635) 2025-08-04 12:35:34 +02:00
examples space test fixtures: do not make an infinite directory loop with symlinks 2025-04-02 10:49:38 +02:00
examples%20percent test fixtures: do not make an infinite directory loop with symlinks 2025-04-02 10:49:38 +02:00
iscsi.schema.json Autoinstallation schema improvements (#2773) 2025-10-01 16:53:34 +02:00
package-lock.json Fix the JSON schema and validate it in CI (#2635) 2025-08-04 12:35:34 +02:00
package.json Fix the JSON schema and validate it in CI (#2635) 2025-08-04 12:35:34 +02:00
profile.schema.json Autoinstallation schema improvements (#2773) 2025-10-01 16:53:34 +02:00
README-weird-filenames.md agama profile validate: integration tests 2025-03-21 14:12:44 +01:00
README.md Fix the JSON schema and validate it in CI (#2635) 2025-08-04 12:35:34 +02:00
storage.model.schema.json schema: use separate definition for mdRaid 2025-05-16 12:57:42 +01:00
storage.schema.json Autoinstallation schema improvements (#2773) 2025-10-01 16:53:34 +02:00

JSON schema definition

See the JSON schema documentation for more details. The Agama schemas uses the Draft 2019-09 version.

Autoinstallation profile

The Agama autoinstallation profile JSON schema is defined in these files:

Agama REST API

The storage.model.schema.json file describes the structure of the storage data passed via the internal REST API. This is important only for Agama developers, it is not intended to be used by end users.

Validation

To verify that the definitions are correct run these commands:

# install needed NPM packages
npm ci

# verify the schema
npm run validate

These commands are run in the CI automatically whenever a schema file is modified.