-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(json validation): add catalogue schema
- Loading branch information
1 parent
dce505d
commit e2d6942
Showing
3 changed files
with
156 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
{ | ||
"$schema": "https://json-schema.org/draft/2020-12/schema", | ||
"title": "Search Parameter Catalogue", | ||
"description": "A catalogue of search parameters", | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/categoryItem" | ||
}, | ||
"$defs": { | ||
"childCategories": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/$defs/categoryItem" | ||
} | ||
}, | ||
"categoryItem": { | ||
"type": "object", | ||
"properties": { | ||
"key": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
}, | ||
"subCategoryName": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
}, | ||
"infoButtonText": { | ||
"type": "array", | ||
"description": "The text to display in the info button", | ||
"items": { | ||
"type": "string", | ||
"pattern": "^.*$" | ||
} | ||
}, | ||
"system": { | ||
"type": "string", | ||
"pattern": "^.*$" | ||
}, | ||
"fieldType": { | ||
"enum": [ | ||
"single-select", | ||
"number", | ||
"autocomplete" | ||
] | ||
}, | ||
"type": { | ||
"enum": [ | ||
"EQUALS", | ||
"BETWEEN" | ||
] | ||
}, | ||
"childCategories": { | ||
"$ref": "#/$defs/childCategories" | ||
}, | ||
"criteria": { | ||
"$ref": "#/$defs/criteria" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"unevaluatedProperties": false, | ||
"required": [ | ||
"key", | ||
"name" | ||
] | ||
}, | ||
"criteria": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"key": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"pattern": "^.*$" | ||
}, | ||
"infoButtonText": { | ||
"type": "array", | ||
"description": "The text to display in the info button", | ||
"items": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
} | ||
}, | ||
"aggregatedValue": { | ||
"type": "array", | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
}, | ||
"name": { | ||
"type": "string", | ||
"pattern": "^.+$" | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"unevaluatedProperties": false, | ||
"required": [ | ||
"value", | ||
"name" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"unevaluatedProperties": false, | ||
"required": [ | ||
"key", | ||
"name" | ||
] | ||
} | ||
} | ||
} | ||
} |
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