-
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
Draft
Martin187187
wants to merge
38
commits into
admin-shell-io:IDTA-01002-3-2_working
Choose a base branch
from
Martin187187:filter
base: IDTA-01002-3-2_working
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
4e6cad9
Merge pull request #520 from admin-shell-io/IDTA-01002-3-2_working
BirgitBoss 3da2f09
Change to $filter
aorzelskiGH 67c9424
Add FILTER to query
aorzelskiGH 5be900e
added fragment fieldidentifier to bnf
Martin187187 6be4034
removed not allowed fragment fieldidentifier paths
Martin187187 8dc108b
added query filter description & root can be filtered now
Martin187187 ab6cf92
added example & updated bnf & moved filters to own section
Martin187187 00c3547
Clarify filtering of Submodel elements in Query Language
Martin187187 5604c1e
moved example
Martin187187 273161e
Merge branch 'filter' of https://github.com/Martin187187/aas-specs-ap…
Martin187187 221ebd2
removed duplicated section
Martin187187 c24ba07
added comment
Martin187187 93ace6b
Update description for Nameplate submodels query
Martin187187 834e17a
Enhance query-language.adoc with filtering details
Martin187187 7ad8efb
added bnf
Martin187187 137b904
update bnf
Martin187187 3168f19
update bnf
Martin187187 b5e1955
Fix typo in query language documentation
Martin187187 183b1b1
updated api
Martin187187 dacffa4
updated names
Martin187187 d19e6d8
adjusted schema.adoc
Martin187187 cb9c79d
fix naming inconsistency
Martin187187 62dd07a
added needed fragments
Martin187187 3ddd0c0
fragment keys[] clarification
Martin187187 2705175
Enhance specification clarity and ensure consistency
Martin187187 5dfeea4
FIX useconditions
Martin187187 cfa4f04
made bnf and json schema more consistent
Martin187187 4b5cf9c
make bnf and json schema more consistent
Martin187187 24baf8e
Merge remote-tracking branch 'upstream/IDTA-01002-3-2_working' into f…
Martin187187 94035e9
add Query Wrapper to example
Martin187187 0fb6daa
align json grammar txt
Martin187187 7c6a0f5
removed Access Rule entry in json schema
Martin187187 e229c27
added shared schema for queries & access rules
Martin187187 f42da51
remove TREE
Martin187187 3b3ce8f
removed unused spec in the query json schema
Martin187187 9c50be0
resolve ordering inconsistency
Martin187187 16355b9
update bnf and json schema to be consistent with security spec
Martin187187 a6cc6c7
make FILTER optional
Martin187187 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 12 additions & 23 deletions
35
documentation/IDTA-01002-3/modules/ROOT/pages/http-rest-api/test/query/test1.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.