Skip to content

Commit

Permalink
Validate submodel reference in JSON Schema
Browse files Browse the repository at this point in the history
This will propose more restriction which validate the submodel references in AssetAdministrationShell to be only ModelRefernce and SubmodelReference
  • Loading branch information
mhrimaz authored Dec 12, 2023
1 parent 13b904f commit 920db7c
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions schemas/json/aas.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"submodels": {
"type": "array",
"items": {
"$ref": "#/definitions/Reference"
"$ref": "#/definitions/ModelReferenceToSubmodel"
},
"minItems": 1
},
Expand Down Expand Up @@ -800,6 +800,23 @@
"value"
]
},
"SubmodelKey": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Key"
},
{
"type": "object",
"properties": {
"type": {
"const": "Submodel"
}
},
"required": ["type"]
}
]
},
"KeyTypes": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -1207,6 +1224,34 @@
"keys"
]
},
"ModelReferenceToSubmodel": {
"type": "object",
"allOf": [
{
"$ref": "#/definitions/Reference"
},
{
"type": "object",
"properties": {
"type": {
"const": "ModelReference"
},
"keys": {
"type": "array",
"items": {
"$ref": "#/definitions/Key"
},
"minItems": 1,
"maxItems": 1
}
},
"required": [
"type",
"keys"
]
}
]
},
"ReferenceElement": {
"allOf": [
{
Expand Down Expand Up @@ -1537,4 +1582,4 @@
]
}
}
}
}

0 comments on commit 920db7c

Please sign in to comment.