Created
October 10, 2023 19:11
-
-
Save Satak/e7cddd1095ca3c18d494e869d77e53f2 to your computer and use it in GitHub Desktop.
json 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
my-data-123: | |
is_enabled: true | |
amount: 100 | |
tier: premium | |
subnets: | |
- item | |
tags: | |
test: test-tag |
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
{ | |
"type": "object", | |
"propertyNames": { | |
"pattern": "^[a-z0-9-]+$" | |
}, | |
"patternProperties": { | |
"^[a-z0-9-]+$": { | |
"type": "object", | |
"properties": { | |
"is_enabled": { | |
"type": "boolean", | |
"default": true | |
}, | |
"description": { | |
"type": "string", | |
"maxLength": 50 | |
}, | |
"amount": { | |
"type": "integer", | |
"minimum": 0, | |
"maximum": 100, | |
"default": 25 | |
}, | |
"tier": { | |
"type": "string", | |
"default": "standard", | |
"enum": [ | |
"standard", | |
"premium" | |
] | |
}, | |
"subnets": { | |
"oneOf": [ | |
{ | |
"type": "null" | |
}, | |
{ | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"minItems": 1, | |
"uniqueItems": true | |
} | |
] | |
}, | |
"tags": { | |
"type": "object", | |
"propertyNames": { | |
"pattern": "^[a-z0-9-]+$" | |
}, | |
"patternProperties": { | |
"^[a-z0-9-]+$": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"is_enabled", | |
"amount", | |
"tier" | |
], | |
"additionalProperties": false | |
} | |
} | |
} |
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
{ | |
"yaml.schemas": { | |
"./schemas/schema.json": [ | |
"/tf/config/**/*.yaml" | |
], | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment