-
Notifications
You must be signed in to change notification settings - Fork 14
Added $filters to AAS QL & enhanced Fragment Fieldidentifiers #532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: IDTA-01002-3-2_working
Are you sure you want to change the base?
Changes from all commits
4e6cad9
3da2f09
67c9424
5be900e
6be4034
8dc108b
ab6cf92
00c3547
5604c1e
273161e
221ebd2
c24ba07
93ace6b
834e17a
7ad8efb
137b904
3168f19
b5e1955
183b1b1
dacffa4
d19e6d8
cb9c79d
62dd07a
3ddd0c0
2705175
5dfeea4
cfa4f04
4b5cf9c
24baf8e
94035e9
0fb6daa
7c6a0f5
e229c27
f42da51
3b3ce8f
9c50be0
16355b9
a6cc6c7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -629,6 +629,10 @@ components: | |
| type: string | ||
| pattern: >- | ||
| ^((?:\$aas#(?:idShort|id|assetInformation\.assetKind|assetInformation\.assetType|assetInformation\.globalAssetId|assetInformation\.(?:specificAssetIds(\[[0-9]*\])(?:\.(?:name|value|externalSubjectId(?:\.type|\.keys\[\d*\](?:\.(?:type|value))?)?)?)|submodels\.(?:type|keys\[\d*\](?:\.(?:type|value))?))|submodels\.(type|keys\[\d*\](?:\.(type|value))?)))|(?:\$sm#(?:semanticId(?:\.type|\.keys\[\d*\](?:\.(type|value))?)?|idShort|id))|(?:\$sme(?:\.[a-zA-Z][a-zA-Z0-9_]*(\[[0-9]*\])?(?:\.[a-zA-Z][a-zA-Z0-9_]*(\[[0-9]*\])?)*)?#(?:semanticId(?:\.type|\.keys\[\d*\](?:\.(type|value))?)?|idShort|value|valueType|language))|(?:\$cd#(?:idShort|id))|(?:\$aasdesc#(?:idShort|id|assetKind|assetType|globalAssetId|specificAssetIds(\[[0-9]*\])?(?:\.(name|value|externalSubjectId(?:\.type|\.keys\[\d*\](?:\.(type|value))?)?)?)|endpoints(\[[0-9]*\])\.(interface|protocolinformation\.href)|submodelDescriptors(\[[0-9]*\])\.(semanticId(?:\.type|\.keys\[\d*\](?:\.(type|value))?)?|idShort|id|endpoints(\[[0-9]*\])\.(interface|protocolinformation\.href))))|(?:\$smdesc#(?:semanticId(?:\.type|\.keys\[\d*\](?:\.(type|value))?)?|idShort|id|endpoints(\[[0-9]*\])\.(interface|protocolinformation\.href))))$ | ||
| fragmentStringPattern: | ||
| type: string | ||
| pattern: >- | ||
| ^(?:\$aas#(?:idShort|assetInformation\.assetType|assetInformation\.globalAssetId|assetInformation\.specificAssetIds\[\d*\](?:\.externalSubjectId(?:\.keys\[\d*\])?)?|submodels|submodels\.keys\[\d*\])|(?:\$sm#(?:semanticId(?:\.keys\[\d*\])?|idShort|id))|(?:\$sme(?:\.(?:[a-zA-Z](?:[a-zA-Z0-9_-]*[a-zA-Z0-9_])?(?:\[\d*\])*)*)?(?:#(?:semanticId(?:\.keys\[\d*\])?|idShort|value|valueType|language))?)|(?:\$cd#idShort)|(?:\$aasdesc#(?:idShort|assetKind|assetType|globalAssetId|specificAssetIds\[\d*\](?:\.externalSubjectId(?:\.keys\[\d*\])?)?|endpoints\[\d*\]|submodelDescriptors\[\d*\]|submodelDescriptors\[\d*\]\.(?:semanticId(?:\.keys\[\d*\])?|idShort|endpoints\[\d*\])))|(?:\$smdesc#(?:semanticId(?:\.keys\[\d*\])?|idShort|endpoints\[\d*\])))$ | ||
| MultiLanguagePropertyMetadata: | ||
| allOf: | ||
| - $ref: "#/components/schemas/SubmodelElementAttributes" | ||
|
|
@@ -776,6 +780,19 @@ components: | |
| required: | ||
| - href | ||
| type: object | ||
| QueryFilter: | ||
| type: object | ||
| properties: | ||
| $fragment: | ||
| description: Field identifier fragment the filter applies to (FieldIdentifierFragment in the BNF). | ||
| $ref: '#/components/schemas/fragmentStringPattern' | ||
| $condition: | ||
| description: Logical expression to be applied for this field identifier fragment. | ||
| $ref: '#/components/schemas/logicalExpression' | ||
| required: | ||
| - $fragment | ||
| - $condition | ||
| additionalProperties: false | ||
| Query: | ||
| type: object | ||
| properties: | ||
|
|
@@ -784,6 +801,13 @@ components: | |
| pattern: ^id$ | ||
| $condition: | ||
| $ref: '#/components/schemas/logicalExpression' | ||
| $filters: | ||
| description: >- | ||
| Additional filters scoped to specific field identifier fragments, corresponding to | ||
| repeated "$filter <FieldIdentifierFragment> <logicalExpression>" clauses in the BNF. | ||
| type: array | ||
| items: | ||
| $ref: '#/components/schemas/QueryFilter' | ||
| required: | ||
| - $condition | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Highlighting the naming inconsistency as explained in the above comment. |
||
| additionalProperties: false | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ Note: Changes in Metamodel (IDTA-01001) will not be listed here, although they h | |
|
|
||
| Major Changes: | ||
|
|
||
| * ... | ||
| * new: Enhanced the FieldIdentifier Fragment Definition from just plain string to a BNF specification. Extended the query language and security with field-based filters (`$filters` & `FILTERS` clauses) using field identifier fragments, and aligned the OpenAPI schemas and JSON Schema for queries and security rules accordingly. Addition does not introduce breaking changes because it only adds new optional field (https://github.com/admin-shell-io/aas-specs-api/issues/517[#517]) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. inconsistent, sometimes it is "$filter", sometimes it is "$filters" or it is "$filters" in JSON but $filter in BNF? |
||
|
|
||
|
|
||
| Minor Changes: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,15 @@ | ||
| { | ||
| "$schema": "../../query-json-schema.json", | ||
| "select": "id", | ||
| "filter": { | ||
| "$and":[ | ||
| { | ||
| "$eq": [ | ||
| { | ||
| "strModel": "$sm.semanticId.keys.value" | ||
| }, | ||
| { | ||
| "strVal": "https://example.org/value" | ||
| } | ||
| ] | ||
| }, | ||
| {} | ||
| ] | ||
| }, | ||
| "option": { | ||
| "sort": { | ||
| "id": "asc" | ||
| }, | ||
| "limit": 10, | ||
| "offset": 0 | ||
| "Query": { | ||
| "$select": "id", | ||
| "$condition": { | ||
| "$eq": [ | ||
| { | ||
| "$field": "$sm#semanticId.keys[].value" | ||
| }, | ||
| { | ||
| "$strVal": "https://example.org/value" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Highlighting the naming inconsistency as explained in the above comment.