Created
July 10, 2022 11:56
-
-
Save harish-venkataramanan-cko/acd0d0fd773418a72f4202cbdb5c0f2a to your computer and use it in GitHub Desktop.
Feature Management schema
This file contains 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-06/schema#", | |
"$ref": "#/definitions/FeatureManagementConfiguration", | |
"definitions": { | |
"FeatureManagementConfiguration": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"FeatureManagement": { | |
"$ref": "#/definitions/FeatureManagement" | |
} | |
} | |
}, | |
"FeatureManagement": { | |
"type": "object", | |
"additionalProperties": { | |
"oneOf": [ | |
{ | |
"type": "boolean" | |
}, | |
{ | |
"$ref": "#/definitions/EnabledForFeatureDefinition" | |
} | |
] | |
}, | |
"title": "FeatureManagement" | |
}, | |
"BooleanFeatureDefinition": { | |
"type": "boolean" | |
}, | |
"EnabledForFeatureDefinition": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"EnabledFor": { | |
"$ref": "#/definitions/EnabledFor" | |
} | |
} | |
}, | |
"EnabledFor": { | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"Filters": { | |
"$ref": "#/definitions/EnabledForFilters" | |
} | |
} | |
}, | |
"EnabledForFilters": { | |
"type": "array", | |
"items": { | |
"oneOf": [ | |
{ | |
"$ref": "#/definitions/AlwaysOnFilter" | |
}, | |
{ | |
"$ref": "#/definitions/TimeWindowFilter" | |
}, | |
{ | |
"$ref": "#/definitions/ListFilter" | |
} | |
] | |
} | |
}, | |
"AlwaysOnFilter": { | |
"additionalProperties": false, | |
"properties": { | |
"Name": { | |
"const": "AlwaysOn" | |
} | |
} | |
}, | |
"TimeWindowFilter": { | |
"additionalProperties": true, | |
"properties": { | |
"Name": { | |
"const": "TimeWindow" | |
}, | |
"Start": { | |
"type": "string", | |
"format": "date-time" | |
}, | |
"End": { | |
"type": "string", | |
"format": "date-time" | |
} | |
} | |
}, | |
"ListFilter": { | |
"additionalProperties": false, | |
"properties": { | |
"Name": { | |
"const": "List" | |
}, | |
"ListType": { | |
"type": "string" | |
}, | |
"Items": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment