forked from 2600hz/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Adds feature specification and preference schemas. * Adds kzd_users feature preference validation.
- Loading branch information
Roger Neate
committed
Dec 15, 2020
1 parent
8edfd72
commit 84b6a7d
Showing
10 changed files
with
275 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
16 changes: 16 additions & 0 deletions
16
applications/crossbar/priv/couchdb/schemas/account_config.features.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "account_config.features", | ||
"description": "Schema for account-level feature specifications", | ||
"properties": { | ||
"specifications": { | ||
"additionalProperties": { | ||
"$ref": "feature.specification" | ||
}, | ||
"default": {}, | ||
"description": "Map from feature identifiers to specifications", | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} |
17 changes: 17 additions & 0 deletions
17
applications/crossbar/priv/couchdb/schemas/feature.preferences.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "feature.preferences", | ||
"additionalProperties": false, | ||
"description": "Schema for a feature's user-specific preferences", | ||
"properties": { | ||
"enabled": { | ||
"description": "Whether the feature should be enabled (i.e. visible) or disabled (i.e. hidden) in client applications", | ||
"type": "boolean" | ||
}, | ||
"props": { | ||
"description": "A type-specific map of feature preference properties", | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} |
43 changes: 43 additions & 0 deletions
43
applications/crossbar/priv/couchdb/schemas/feature.specification.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "feature.specification", | ||
"additionalProperties": false, | ||
"description": "Schema for a feature's definition and default preferences", | ||
"properties": { | ||
"definition": { | ||
"additionalProperties": false, | ||
"default": {}, | ||
"description": "The feature's definition", | ||
"properties": { | ||
"description": { | ||
"description": "A description of the feature for display in client applications", | ||
"type": "string" | ||
}, | ||
"display_name": { | ||
"description": "The name of the feature for display in client applications", | ||
"type": "string" | ||
}, | ||
"props": { | ||
"default": {}, | ||
"description": "A type-specific map of feature definition properties", | ||
"type": "object" | ||
}, | ||
"type": { | ||
"description": "The feature's type", | ||
"type": "string" | ||
} | ||
}, | ||
"type": "object" | ||
}, | ||
"enabled": { | ||
"default": false, | ||
"description": "Whether the feature should be enabled (i.e. visible) or disabled (i.e. hidden) in client applications by default", | ||
"type": "boolean" | ||
}, | ||
"props": { | ||
"default": {}, | ||
"description": "A type-specific map of default feature preference properties", | ||
"type": "object" | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
applications/crossbar/priv/couchdb/schemas/system_config.features.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"_id": "system_config.features", | ||
"description": "Schema for system-wide feature specifications", | ||
"properties": { | ||
"specifications": { | ||
"additionalProperties": { | ||
"$ref": "feature.specification" | ||
}, | ||
"default": {}, | ||
"description": "Map from feature identifiers to specifications", | ||
"type": "object" | ||
} | ||
}, | ||
"type": "object" | ||
} |
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
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
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