Last active
November 22, 2024 19:37
-
-
Save marvingreenberg/06636ecb8f8f65f73c61b3bbdf67996f to your computer and use it in GitHub Desktop.
Test yaml schema
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"required": ["name", "version", "repositories"], | |
"properties": { | |
"name": { "type": "string" }, | |
"version": { "type": "string" }, | |
"repositories": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"required": ["kind", "name", "required_access"], | |
"properties": { | |
"kind": { | |
"type": "string", | |
"enum": ["generic", "docker", "python", "maven", "npm"] | |
}, | |
"name": { "type": "string" }, | |
"required_access": { | |
"type": "string", | |
"enum": ["read", "write"] | |
} | |
} | |
} | |
}, | |
"prerequisites": { | |
"type": "array", | |
"items": { | |
"oneOf": [ | |
{ | |
"type": "object", | |
"required": ["check"], | |
"properties": { | |
"check": { "type": "string" }, | |
"path": { "type": "string" }, | |
"condition": { "type": "string" }, | |
"pattern": { "type": "string" }, | |
"command": { "type": "string" }, | |
"version": { "type": "string" } | |
} | |
}, | |
{ | |
"type": "object", | |
"required": ["any_of"], | |
"properties": { | |
"any_of": { | |
"type": "array", | |
"items": { "type": "object" } | |
} | |
} | |
} | |
] | |
} | |
} | |
}, | |
"patternProperties": { | |
"^[A-Z_]+$": { "type": "string" } | |
}, | |
"additionalProperties": false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment