Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save harish-venkataramanan-cko/acd0d0fd773418a72f4202cbdb5c0f2a to your computer and use it in GitHub Desktop.
Save harish-venkataramanan-cko/acd0d0fd773418a72f4202cbdb5c0f2a to your computer and use it in GitHub Desktop.
Feature Management schema
{
"$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