4.11 ruml:context
The format of the `hash` of a context entry.
hash-algorithms
| Description | Three context entries have a `hash` with `sha3-256`, `sha256` and `blake3`, each followed by 64 lowercase hexadecimal characters. |
|---|---|
| Expect | accept |
| Layer | schema |
| RUML | 4-11-ruml-context.fixtures/accept-hash-algorithms.ruml |
| Spec | §4.11 |
{ "$format": "RUML", "$specVersion": "1.0", "capabilities": [ { "id": "ruml:context", "payload": { "data": { "ctx_estg_sha3": { "title": "§ 32a EStG - Einkommensteuertarif", "category": "administrativeGuidance", "type": "url", "timestamp": "2024-01-01T00:00:00Z", "url": "https://www.gesetze-im-internet.de/estg/__32a.html", "hash": "sha3-256:877998158956cc7b189ce0906e3b6c30cf2cc27e6d8d3dc3170460389d610b5b" }, "ctx_estg_sha256": { "title": "§ 32a EStG - Einkommensteuertarif", "category": "administrativeGuidance", "type": "url", "timestamp": "2024-01-01T00:00:00Z", "url": "https://www.gesetze-im-internet.de/estg/__32a.html", "hash": "sha256:877998158956cc7b189ce0906e3b6c30cf2cc27e6d8d3dc3170460389d610b5b" }, "ctx_estg_blake3": { "title": "§ 32a EStG - Einkommensteuertarif", "category": "administrativeGuidance", "type": "url", "timestamp": "2024-01-01T00:00:00Z", "url": "https://www.gesetze-im-internet.de/estg/__32a.html", "hash": "blake3:877998158956cc7b189ce0906e3b6c30cf2cc27e6d8d3dc3170460389d610b5b" } } } } ], "metadata": { "id": "3f1a2b4c-5d6e-4f70-8a91-b2c3d4e5f607", "version": "1.0.0", "created": "2024-01-01T00:00:00Z", "modified": "2024-01-01T00:00:00Z", "status": "inForce", "validFrom": "2024-01-01T00:00:00Z" }, "rulemap": { "nodes": { "1": { "id": "4a2b3c5d-6e7f-4a81-9b02-c3d4e5f60718", "label": "Antrag" } } }}hash-unknown-algorithm
| Description | A context entry has a `hash` with the algorithm `sha-256`, which is not one of `sha3-256`, `sha256` and `blake3`. |
|---|---|
| Expect | reject |
| Layer | schema |
| RUML | 4-11-ruml-context.fixtures/reject-hash-unknown-algorithm.ruml |
| Spec | §4.11 |
| Expected rule violations | CTX-08 |
| At | /capabilities/0/payload/data/ctx_estg_32a/hash |
{ "$format": "RUML", "$specVersion": "1.0", "capabilities": [ { "id": "ruml:context", "payload": { "data": { "ctx_estg_32a": { "title": "§ 32a EStG - Einkommensteuertarif", "category": "administrativeGuidance", "type": "url", "timestamp": "2024-01-01T00:00:00Z", "url": "https://www.gesetze-im-internet.de/estg/__32a.html", "hash": "sha-256:877998158956cc7b189ce0906e3b6c30cf2cc27e6d8d3dc3170460389d610b5b" } } } } ], "metadata": { "id": "3f1a2b4c-5d6e-4f70-8a91-b2c3d4e5f607", "version": "1.0.0", "created": "2024-01-01T00:00:00Z", "modified": "2024-01-01T00:00:00Z", "status": "inForce", "validFrom": "2024-01-01T00:00:00Z" }, "rulemap": { "nodes": { "1": { "id": "4a2b3c5d-6e7f-4a81-9b02-c3d4e5f60718", "label": "Antrag" } } }}hash-uppercase-hex
| Description | A context entry has a `hash` whose hexadecimal characters are uppercase. |
|---|---|
| Expect | reject |
| Layer | schema |
| RUML | 4-11-ruml-context.fixtures/reject-hash-uppercase-hex.ruml |
| Spec | §4.11 |
| Expected rule violations | CTX-08 |
| At | /capabilities/0/payload/data/ctx_estg_32a/hash |
{ "$format": "RUML", "$specVersion": "1.0", "capabilities": [ { "id": "ruml:context", "payload": { "data": { "ctx_estg_32a": { "title": "§ 32a EStG - Einkommensteuertarif", "category": "administrativeGuidance", "type": "url", "timestamp": "2024-01-01T00:00:00Z", "url": "https://www.gesetze-im-internet.de/estg/__32a.html", "hash": "sha3-256:877998158956CC7B189CE0906E3B6C30CF2CC27E6D8D3DC3170460389D610B5B" } } } } ], "metadata": { "id": "3f1a2b4c-5d6e-4f70-8a91-b2c3d4e5f607", "version": "1.0.0", "created": "2024-01-01T00:00:00Z", "modified": "2024-01-01T00:00:00Z", "status": "inForce", "validFrom": "2024-01-01T00:00:00Z" }, "rulemap": { "nodes": { "1": { "id": "4a2b3c5d-6e7f-4a81-9b02-c3d4e5f60718", "label": "Antrag" } } }}hash-wrong-length
| Description | A context entry has a `hash` with 40 instead of 64 hexadecimal characters. |
|---|---|
| Expect | reject |
| Layer | schema |
| RUML | 4-11-ruml-context.fixtures/reject-hash-wrong-length.ruml |
| Spec | §4.11 |
| Expected rule violations | CTX-08 |
| At | /capabilities/0/payload/data/ctx_estg_32a/hash |
{ "$format": "RUML", "$specVersion": "1.0", "capabilities": [ { "id": "ruml:context", "payload": { "data": { "ctx_estg_32a": { "title": "§ 32a EStG - Einkommensteuertarif", "category": "administrativeGuidance", "type": "url", "timestamp": "2024-01-01T00:00:00Z", "url": "https://www.gesetze-im-internet.de/estg/__32a.html", "hash": "sha3-256:877998158956cc7b189ce0906e3b6c30cf2cc27e" } } } } ], "metadata": { "id": "3f1a2b4c-5d6e-4f70-8a91-b2c3d4e5f607", "version": "1.0.0", "created": "2024-01-01T00:00:00Z", "modified": "2024-01-01T00:00:00Z", "status": "inForce", "validFrom": "2024-01-01T00:00:00Z" }, "rulemap": { "nodes": { "1": { "id": "4a2b3c5d-6e7f-4a81-9b02-c3d4e5f60718", "label": "Antrag" } } }}