Feature Plan - Chouette Valid - Ruleset management
Document under construction
Manage Ruleset via Secretary Command Line Client
secretary-client create ruleset --name="Sample" --shortname="sample" --domain=netex --rules=rules.json
secretary-client get rulesets
secretary-client patch ruleset/sample --rules=rules.json
secretary-client delete ruleset/sample
Define Rules with a JSON file
[
{
"rule_context": "resource/kind_of",
"classes": ["Quay", "StopPlace"],
"rules": [
{
"rule": "attribute/mandatory",
"name": "latitude",
"criticity": "error",
"internal_code": "latitude-mandatory",
"message": "Una parada debe estar ubicada geográficamente. Indicar una latitud"
},
{
"rule": "attribute/mandatory",
"name": "longitude",
"criticity": "error",
"internal_code": "longitude-mandatory",
"message": "Una parada debe estar ubicada geográficamente Indicar una longitud"
}
]
},
{
"rule": "reference/exists",
"referenced_classes": ["Quay", "StopPlace", ..., "OperationPeriod"],
"criticity": "warning",
"internal_code": "unknown-reference",
"tags": [ "next" ]
}
]
Available Rule Contexts
resource/kind_of
attribute/match
attribute/reduce
WIP
Available Rules
resource/mandatory
resource/class
attribute/value
attribute/mandatory
attribute/match
reference/exists
reference/version
tag/match