In this section: Specification
Specification
- Overview
- 1. Purpose and scope
- 2. Principles (normative)
- 3. Participant roles
- 4. Objects, identifiers and envelopes
- 5. The twelve functions
- 6. Wire bindings
- 7. Conformance
- 8. Security model
- 9. Gaps register
- 10. Versioning and change
- 11. Implementations
- 12. Operator sovereignty profile (OBSP-SOV)
- 13. Sovereign deployment for every operator and environment
Functions
Schemas
- Schema explorer
- attestation-evidence
- attestation-result
- calibration-record
- conformance-claim
- conformance-report
- correction-notice
- decommission-record
- error-problem
- event-envelope
- fleet-projection
- model-manifest
- name-pack
- native-envelope
- node-bootstrap-bundle
- node-manifest
- observation-record
- observed-state-receipt
- participant-manifest
- plan
- product-manifest
- proof-receipt
- provenance
- provider-manifest
- qualification-record
- quality-flag
- reconciliation-assignment
- reconciliation-receipt
- replay-batch-result
- replay-batch
- request-context
- sensor-passport
- source-manifest
- source-release
- supply-chain-receipt
- system-pack
- time-quality
QualityFlag
One quality flag from the controlled vocabulary (OBSP 0.1 section 5.6) with the test and test version that set it. NOT_CHECKED means no test ran and carries no test; every other flag names its test.
| Field | Value |
|---|---|
| Identifier | urn:obsp:schema:v3.1:qualityflag |
| Dialect | https://json-schema.org/draft/2020-12/schema |
| Used by functions | Qualify |
Properties
| Property | Required | Type | Description |
|---|---|---|---|
schemaVersion | yes | reference | |
apiVersion | yes | constant | |
kind | yes | constant | |
protocolVersion | yes | constant | |
flagUni | yes | reference | |
flag | yes | reference | |
testCode | no | reference | |
testVersion | no | string | |
setAt | yes | reference | |
setBy | yes | object | |
observationRef | no | reference | |
note | no | reference | |
recordedAt | yes | reference | |
extensions | no | reference |
Positive fixtures
quality-flag.not-checked.valid.jsonquality-flag.valid.json
Negative fixtures
quality-flag.free-text-test-code.json: test codes are controlledquality-flag.missing-test-code.json: a checked flag names its testquality-flag.missing-test-version.json: a checked flag names its test versionquality-flag.not-checked-with-test.json: NOT_CHECKED carries no testquality-flag.unknown-flag.json: flag from GOOD|SUSPECT|BAD|MISSING|ESTIMATED|NOT_CHECKED
Mappings to open standards
A mapping to a standard, never a conformance statement.
- maps to NS-5 Figures, maps and visualization (relation REL-NS-5)
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "urn:obsp:schema:v3.1:qualityflag",
"title": "QualityFlag",
"description": "One quality flag from the controlled vocabulary (OBSP 0.1 section 5.6) with the test and test version that set it. NOT_CHECKED means no test ran and carries no test; every other flag names its test.",
"type": "object",
"required": [
"schemaVersion",
"apiVersion",
"kind",
"protocolVersion",
"flagUni",
"flag",
"setAt",
"setBy",
"recordedAt"
],
"properties": {
"schemaVersion": {
"$ref": "#/$defs/SchemaVersion"
},
"apiVersion": {
"const": "obsp/quality-flag/v3.1"
},
"kind": {
"const": "QualityFlag"
},
"protocolVersion": {
"const": "obsp/0.1"
},
"flagUni": {
"$ref": "#/$defs/Uni"
},
"flag": {
"$ref": "#/$defs/QualityFlagValue"
},
"testCode": {
"$ref": "#/$defs/TestCode"
},
"testVersion": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+([-+][0-9A-Za-z.-]+)?$"
},
"setAt": {
"$ref": "#/$defs/Timestamp"
},
"setBy": {
"type": "object",
"required": [
"role",
"agentUni"
],
"properties": {
"role": {
"$ref": "#/$defs/ProtocolRole"
},
"agentUni": {
"$ref": "#/$defs/Uni"
}
},
"additionalProperties": false
},
"observationRef": {
"$ref": "#/$defs/RecordRef"
},
"note": {
"$ref": "#/$defs/NonEmptyString"
},
"recordedAt": {
"$ref": "#/$defs/Timestamp"
},
"extensions": {
"$ref": "#/$defs/Extensions"
}
},
"allOf": [
{
"if": {
"properties": {
"flag": {
"const": "NOT_CHECKED"
}
},
"required": [
"flag"
]
},
"then": {
"not": {
"anyOf": [
{
"required": [
"testCode"
]
},
{
"required": [
"testVersion"
]
}
]
}
},
"else": {
"required": [
"testCode",
"testVersion"
]
}
}
],
"$defs": {
"SchemaVersion": {
"type": "string",
"const": "3.1.0"
},
"Uni": {
"type": "string",
"minLength": 8,
"maxLength": 256,
"pattern": "^[A-Za-z0-9][A-Za-z0-9:._/@-]{7,255}$",
"description": "Durable UNI or typed unresolved identifier according to authority rules"
},
"Digest": {
"type": "string",
"pattern": "^[a-z0-9][a-z0-9._-]{1,31}:[A-Fa-f0-9]{32,128}$",
"description": "Algorithm-prefixed hexadecimal digest"
},
"NonEmptyString": {
"type": "string",
"minLength": 1,
"maxLength": 2048
},
"Timestamp": {
"type": "string",
"format": "date-time"
},
"RecordVersion": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+){0,2}$"
},
"Extensions": {
"type": "object",
"description": "Namespaced extension bag; unknown top-level fields remain forbidden.",
"propertyNames": {
"pattern": "^[a-z][a-z0-9]*(\\.[a-z][a-z0-9]*)+$"
},
"additionalProperties": true
},
"EvidenceRef": {
"type": "object",
"required": [
"uri",
"digest"
],
"properties": {
"uri": {
"type": "string",
"minLength": 1,
"maxLength": 4096
},
"digest": {
"$ref": "#/$defs/Digest"
},
"kind": {
"type": "string",
"minLength": 1,
"maxLength": 128
},
"recordedAt": {
"$ref": "#/$defs/Timestamp"
}
},
"additionalProperties": false
},
"ProtocolRole": {
"enum": [
"NODE",
"SITE_CELL",
"CLUSTER",
"FED_PEER",
"GRID_OPERATOR",
"PROVIDER",
"VERIFIER",
"CONSUMER",
"STEWARD"
],
"description": "OBSP 0.1 participant role (specification section 3). Roles, never company names."
},
"RecordRef": {
"type": "object",
"required": [
"uni",
"digest"
],
"properties": {
"uni": {
"$ref": "#/$defs/Uni"
},
"version": {
"$ref": "#/$defs/RecordVersion"
},
"digest": {
"$ref": "#/$defs/Digest"
}
},
"additionalProperties": false
},
"VersionedRecordRef": {
"type": "object",
"required": [
"uni",
"version",
"digest"
],
"properties": {
"uni": {
"$ref": "#/$defs/Uni"
},
"version": {
"$ref": "#/$defs/RecordVersion"
},
"digest": {
"$ref": "#/$defs/Digest"
}
},
"additionalProperties": false
},
"CorrectionState": {
"enum": [
"CURRENT",
"DISPUTED",
"SUPERSEDED",
"WITHDRAWN",
"RECALLED"
]
},
"QualityFlagValue": {
"enum": [
"GOOD",
"SUSPECT",
"BAD",
"MISSING",
"ESTIMATED",
"NOT_CHECKED"
],
"description": "Controlled quality-flag vocabulary (OBSP 0.1 section 5.6, WMO-style)"
},
"TestCode": {
"type": "string",
"pattern": "^(RANGE|STEP|PERSISTENCE|SPIKE|CLIMATOLOGY|INTERNAL_CONSISTENCY|SPATIAL_CONSISTENCY|COMPLETENESS|TIME_INTEGRITY|CALIBRATION_VALIDITY|MANUAL_REVIEW|GAP_FILL_MODEL)$|^LOCAL\\.[a-z0-9-]+\\.[A-Z][A-Z0-9_]{1,63}$",
"description": "Quality-control test that set the flag: a controlled WMO-style code, or LOCAL.<namespace>.<CODE> for a registered local test"
}
},
"additionalProperties": false
}