/
Feature Plan - Chouette Valid - Ruleset management
Feature Plan - Chouette Valid - Ruleset management
Manage Ruleset via API & Secretary Command Line Client
The user can manage Rulesets via API and Secretary Command Line Client:
secretary-client create ruleset --name="Sample" --slug="sample" rules.json
secretary-client get ruleset sample
secretary-client patch ruleset sample --definition=rules.json
secretary-client delete ruleset sample
Define Rules with a JSON file
The user can define the Rules and their Rule Contexts via a JSON file:
[
{
"rule_context": "resource/kind_of",
"classes": ["Quay", "StopPlace"],
"rules": [
{
"rule": "attribute/mandatory",
"name": "latitude",
"criticity": "error",
"code": "latitude-mandatory",
"message": "Una parada debe estar ubicada geográficamente. Indicar una latitud"
},
{
"rule": "attribute/mandatory",
"name": "longitude",
"criticity": "error",
"code": "longitude-mandatory",
"message": "Una parada debe estar ubicada geográficamente Indicar una longitud"
}
]
},
{
"rule": "reference/exists",
"referenced_classes": ["Quay", "StopPlace", ..., "OperationPeriod"],
"criticity": "warning",
"code": "unknown-reference"
}
]
Available Rule Contexts
resource/kind_of
attribute/match
reduce/element
NEWreduce/collection
NEW
Available Rules
resource/mandatory
resource/class
attribute/value
attribute/mandatory
attribute/match
reference/exists
reference/version
tag/match
Related content
Sprint 117
Sprint 117
Read with this
Sprint 121
Sprint 121
More like this
Publication de l’offre
Publication de l’offre
Read with this
Feature Plan - Flexible Transport Service v1
Feature Plan - Flexible Transport Service v1
More like this
Sprint 120
Sprint 120
More like this