## 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" />
52 lines
1.4 KiB
JSON
52 lines
1.4 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2019-09/schema",
|
|
"$id": "https://github.com/agama-project/agama/blob/master/rust/agama-lib/share/iscsi.schema.json",
|
|
"title": "Config",
|
|
"description": "iSCSI config.",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"initiator": {
|
|
"description": "Initiator name.",
|
|
"type": "string"
|
|
},
|
|
"targets": {
|
|
"description": "List of targets.",
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/target" }
|
|
}
|
|
},
|
|
"$defs": {
|
|
"target": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["address", "port", "name", "interface"],
|
|
"properties": {
|
|
"address": {
|
|
"description": "IP address.",
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"name": { "type": "string" },
|
|
"interface": { "type": "string" },
|
|
"startup": {
|
|
"enum": ["onboot", "manual", "automatic"]
|
|
},
|
|
"authByTarget": { "$ref": "#/$defs/authentication" },
|
|
"authByInitiator": { "$ref": "#/$defs/authentication" }
|
|
}
|
|
},
|
|
"authentication": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["username", "password"],
|
|
"properties": {
|
|
"username": { "type": "string" },
|
|
"password": { "type": "string" }
|
|
}
|
|
}
|
|
}
|
|
}
|