From fabb4551a6d2501e8f0fecd713a3a7aee9c58e97 Mon Sep 17 00:00:00 2001 From: aorzelskiGH Date: Fri, 17 Apr 2026 16:44:29 +0200 Subject: [PATCH] fix(schema): add missing $ref definitions referenced by JSON schemas The access rule JSON schemas referenced five definitions that were not actually declared anywhere in the schema files, making the schemas formally invalid for any standard validator: - ReferenceIdentifier - IdentifiableIdentifier - ReferableIdentifier - FragmentIdentifier - DescriptorIdentifier These definitions are now added to both partials/json/aas-queries-and-access-rules-schema.json partials/json/access-rule-model.json Each definition is a typed string with a pattern derived from the corresponding production in the Access Rules BNF (RouteObject, IdentifiableObject, ReferableObject, FragmentObject, DescriptorObject, ReferenceAttribute). No changes to the public JSON format for valid rules; previously any validator would error out before reaching rule content. Refs: Review Finding T-04 Made-with: Cursor --- .../aas-queries-and-access-rules-schema.json | 24 +++++++++++++++++++ .../ROOT/partials/json/access-rule-model.json | 24 +++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json b/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json index 3a15b94..dc5610e 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json +++ b/documentation/IDTA-01004/modules/ROOT/partials/json/aas-queries-and-access-rules-schema.json @@ -20,6 +20,30 @@ "type": "string", "pattern": "^16#[0-9A-F]+$" }, + "IdentifiableIdentifier": { + "type": "string", + "description": "Identifier for an Identifiable (AAS, Submodel, ConceptDescription) as used in OBJECTS IDENTIFIABLE. Format: $aas(\"...\") | $sm(\"...\") | $cd(\"...\") | same with wildcard \"*\".", + "pattern": "^\\$(?:aas|sm|cd)\\((?:\"\\*\"|\"[^\"]*\")\\)$" + }, + "ReferableIdentifier": { + "type": "string", + "description": "Identifier for a Referable (Submodel element) as used in OBJECTS REFERABLE. Format: $sme(\"...\"). | $sme(\"*\")..", + "pattern": "^\\$sme\\((?:\"\\*\"|\"[^\"]*\")\\)\\.[^\\s]+$" + }, + "FragmentIdentifier": { + "type": "string", + "description": "Fragment literal as used in OBJECTS FRAGMENT. Carries the fragment identifier as defined by in the BNF." + }, + "DescriptorIdentifier": { + "type": "string", + "description": "Identifier for a Descriptor (AAS Descriptor, Submodel Descriptor) as used in OBJECTS DESCRIPTOR. Format: $aasdesc(\"...\") | $smdesc(\"...\") | same with wildcard \"*\".", + "pattern": "^\\$(?:aasdesc|smdesc)\\((?:\"\\*\"|\"[^\"]*\")\\)$" + }, + "ReferenceIdentifier": { + "type": "string", + "description": "Identifier for a REFERENCE attribute as used by in the BNF. Format: $aas(\"...\")# | $sm(\"...\")# | $cd(\"...\")# | $sme(\"...\").#.", + "pattern": "^\\$(?:aas|sm|cd)\\(\"[^\"]*\"\\)#[^\\s]+$|^\\$sme\\(\"[^\"]*\"\\)\\.[^#\\s]+#[^\\s]+$" + }, "dateTimeLiteralPattern": { "type": "string", "format": "date-time" diff --git a/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json b/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json index 6830cd5..3229592 100644 --- a/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json +++ b/documentation/IDTA-01004/modules/ROOT/partials/json/access-rule-model.json @@ -1,5 +1,29 @@ { "definitions": { + "IdentifiableIdentifier": { + "type": "string", + "description": "Identifier for an Identifiable (AAS, Submodel, ConceptDescription) as used in OBJECTS IDENTIFIABLE. Format: $aas(\"...\") | $sm(\"...\") | $cd(\"...\") | same with wildcard \"*\".", + "pattern": "^\\$(?:aas|sm|cd)\\((?:\"\\*\"|\"[^\"]*\")\\)$" + }, + "ReferableIdentifier": { + "type": "string", + "description": "Identifier for a Referable (Submodel element) as used in OBJECTS REFERABLE. Format: $sme(\"...\"). | $sme(\"*\")..", + "pattern": "^\\$sme\\((?:\"\\*\"|\"[^\"]*\")\\)\\.[^\\s]+$" + }, + "FragmentIdentifier": { + "type": "string", + "description": "Fragment literal as used in OBJECTS FRAGMENT. Carries the fragment identifier as defined by in the BNF." + }, + "DescriptorIdentifier": { + "type": "string", + "description": "Identifier for a Descriptor (AAS Descriptor, Submodel Descriptor) as used in OBJECTS DESCRIPTOR. Format: $aasdesc(\"...\") | $smdesc(\"...\") | same with wildcard \"*\".", + "pattern": "^\\$(?:aasdesc|smdesc)\\((?:\"\\*\"|\"[^\"]*\")\\)$" + }, + "ReferenceIdentifier": { + "type": "string", + "description": "Identifier for a REFERENCE attribute as used by in the BNF. Format: $aas(\"...\")# | $sm(\"...\")# | $cd(\"...\")# | $sme(\"...\").#.", + "pattern": "^\\$(?:aas|sm|cd)\\(\"[^\"]*\"\\)#[^\\s]+$|^\\$sme\\(\"[^\"]*\"\\)\\.[^#\\s]+#[^\\s]+$" + }, "attributeItem": { "oneOf": [ {