Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 68 additions & 77 deletions src/schemas/json/aws-cdk-appconfig-featureflags-1.0.0.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://json.schemastore.org/aws-cdk-appconfig-featureflags-1.0.0.json",
"allOf": [
{
"$ref": "#/definitions/flagSetDefinition"
}
],
"$ref": "#/definitions/flagSetDefinition",
"definitions": {
"flagSetDefinition": {
"type": "object",
Expand All @@ -20,17 +16,16 @@
"$ref": "#/definitions/flagValues"
}
},
"required": ["version", "flags", "values"],
"required": ["version"],
"additionalProperties": false
},
"flagDefinitions": {
"type": "object",
"patternProperties": {
"^[^\\n]{1,64}$": {
"^[a-z][a-zA-Z\\d_-]{0,63}$": {
"$ref": "#/definitions/flagDefinition"
}
},
"maxProperties": 25,
"additionalProperties": false
},
"flagDefinition": {
Expand All @@ -52,7 +47,8 @@
"type": "object",
"properties": {
"status": {
"const": "planned"
"type": "string",
"enum": ["planned"]
},
"date": {
"type": "string",
Expand All @@ -65,13 +61,12 @@
"$ref": "#/definitions/attributeDefinitions"
}
},
"required": ["attributes"],
"additionalProperties": false
},
"attributeDefinitions": {
"type": "object",
"patternProperties": {
"^[^\\n]{1,64}$": {
"^[a-z][a-zA-Z\\d_-]{0,63}$": {
"$ref": "#/definitions/attributeDefinition"
}
},
Expand All @@ -86,32 +81,22 @@
},
"constraints": {
"oneOf": [
{
"$ref": "#/definitions/numberConstraints"
},
{
"$ref": "#/definitions/stringConstraints"
},
{
"$ref": "#/definitions/arrayConstraints"
},
{
"$ref": "#/definitions/boolConstraints"
}
{ "$ref": "#/definitions/numberConstraints" },
{ "$ref": "#/definitions/stringConstraints" },
{ "$ref": "#/definitions/arrayConstraints" },
{ "$ref": "#/definitions/boolConstraints" }
]
}
},
"required": ["constraints"],
"additionalProperties": false
},
"flagValues": {
"type": "object",
"patternProperties": {
"^[^\\n]{1,64}$": {
"^[a-z][a-zA-Z\\d_-]{0,63}$": {
"$ref": "#/definitions/flagValue"
}
},
"maxProperties": 25,
"additionalProperties": false
},
"flagValue": {
Expand All @@ -128,21 +113,50 @@
},
"_variants": {
"type": "array",
"uniqueItems": true,
"maxItems": 32,
"maxLength": 32,
"items": {
"$ref": "#/definitions/variant"
}
}
},
"required": ["enabled", "_variants"],
"patternProperties": {
"^[a-z][a-zA-Z\\d_-]{0,63}$": {
"$ref": "#/definitions/attributeValue",
"maxProperties": 25
}
},
"additionalProperties": false
},
"attributeValue": {
"oneOf": [
{ "type": "string", "maxLength": 1024 },
{ "type": "number" },
{ "type": "boolean" },
{
"type": "array",
"oneOf": [
{
"items": {
"type": "string",
"maxLength": 1024
}
},
{
"items": {
"type": "number"
}
}
]
}
],
"additionalProperties": false
},
"stringConstraints": {
"type": "object",
"properties": {
"type": {
"const": "string"
"type": "string",
"enum": ["string"]
},
"required": {
"type": "boolean"
Expand All @@ -153,7 +167,7 @@
},
"enum": {
"type": "array",
"maxItems": 100,
"maxLength": 100,
"items": {
"oneOf": [
{
Expand All @@ -169,19 +183,16 @@
},
"required": ["type"],
"not": {
"required": ["pattern", "enum"],
"properties": {
"pattern": true,
"enum": true
}
"required": ["pattern", "enum"]
},
"additionalProperties": false
},
"numberConstraints": {
"type": "object",
"properties": {
"type": {
"const": "number"
"type": "string",
"enum": ["number"]
},
"required": {
"type": "boolean"
Expand All @@ -200,7 +211,8 @@
"type": "object",
"properties": {
"type": {
"const": "array"
"type": "string",
"enum": ["array"]
},
"required": {
"type": "boolean"
Expand All @@ -216,7 +228,8 @@
"type": "object",
"properties": {
"type": {
"const": "boolean"
"type": "string",
"enum": ["boolean"]
},
"required": {
"type": "boolean"
Expand All @@ -227,12 +240,8 @@
},
"elementConstraints": {
"oneOf": [
{
"$ref": "#/definitions/numberConstraints"
},
{
"$ref": "#/definitions/stringConstraints"
}
{ "$ref": "#/definitions/numberConstraints" },
{ "$ref": "#/definitions/stringConstraints" }
]
},
"variant": {
Expand All @@ -246,43 +255,22 @@
},
"rule": {
"type": "string",
"maxLength": 1024
"maxLength": 16384
},
"attributeValues": {
"$ref": "#/definitions/attributeValue"
"type": "object",
"patternProperties": {
"^[a-z][a-zA-Z\\d_-]{0,63}$": {
"$ref": "#/definitions/attributeValue"
}
},
"maxProperties": 25,
"additionalProperties": false
}
},
"required": ["name", "enabled"],
"additionalProperties": false
},
"attributeValue": {
"oneOf": [
{
"type": "string",
"maxLength": 1024
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string",
"maxLength": 1024
},
{
"type": "number"
}
]
}
}
]
},
"customerDefinedName": {
"type": "string",
"pattern": "^[^\\n]{1,64}$"
Expand All @@ -292,7 +280,10 @@
"maxLength": 1024
},
"flagSchemaVersions": {
"const": "1"
"type": "string",
"enum": ["1"]
}
}
},
"type": "object",
"additionalProperties": false
}
Loading