diff --git a/src/schemas/json/aws-cdk-appconfig-featureflags-1.0.0.json b/src/schemas/json/aws-cdk-appconfig-featureflags-1.0.0.json index 671b7f4eb3b..0fc0412c4d9 100644 --- a/src/schemas/json/aws-cdk-appconfig-featureflags-1.0.0.json +++ b/src/schemas/json/aws-cdk-appconfig-featureflags-1.0.0.json @@ -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", @@ -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": { @@ -52,7 +47,8 @@ "type": "object", "properties": { "status": { - "const": "planned" + "type": "string", + "enum": ["planned"] }, "date": { "type": "string", @@ -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" } }, @@ -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": { @@ -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" @@ -153,7 +167,7 @@ }, "enum": { "type": "array", - "maxItems": 100, + "maxLength": 100, "items": { "oneOf": [ { @@ -169,11 +183,7 @@ }, "required": ["type"], "not": { - "required": ["pattern", "enum"], - "properties": { - "pattern": true, - "enum": true - } + "required": ["pattern", "enum"] }, "additionalProperties": false }, @@ -181,7 +191,8 @@ "type": "object", "properties": { "type": { - "const": "number" + "type": "string", + "enum": ["number"] }, "required": { "type": "boolean" @@ -200,7 +211,8 @@ "type": "object", "properties": { "type": { - "const": "array" + "type": "string", + "enum": ["array"] }, "required": { "type": "boolean" @@ -216,7 +228,8 @@ "type": "object", "properties": { "type": { - "const": "boolean" + "type": "string", + "enum": ["boolean"] }, "required": { "type": "boolean" @@ -227,12 +240,8 @@ }, "elementConstraints": { "oneOf": [ - { - "$ref": "#/definitions/numberConstraints" - }, - { - "$ref": "#/definitions/stringConstraints" - } + { "$ref": "#/definitions/numberConstraints" }, + { "$ref": "#/definitions/stringConstraints" } ] }, "variant": { @@ -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}$" @@ -292,7 +280,10 @@ "maxLength": 1024 }, "flagSchemaVersions": { - "const": "1" + "type": "string", + "enum": ["1"] } - } + }, + "type": "object", + "additionalProperties": false }