Skip to content
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

Request references #117

Merged
merged 3 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions abnf/odata-abnf-construction-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,9 @@ rootExpr = %s"$root/" ( entitySetName [ collectionNavigationExpr ]

firstMemberExpr = memberExpr
/ inscopeVariableExpr [ "/" memberExpr ]
/ "$" request-id "/" memberExpr ; reference to single-valued response of earlier request
/ "$" request-id collectionNavigationExpr ; reference to collection-valued response of earlier request
/ "$" request-id
ralfhandl marked this conversation as resolved.
Show resolved Hide resolved

memberExpr = directMemberExpr
/ ( optionallyQualifiedEntityTypeName / optionallyQualifiedComplexTypeName ) "/" directMemberExpr
Expand Down
24 changes: 24 additions & 0 deletions abnf/odata-abnf-testcases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ Constraints:
- Title
- X
- ZipCode
request-id:
- '1'
- First-Insert~Customer_1.1
- group1
singletonEntity:
- BestProductEverCreated
- MainSupplier
Expand Down Expand Up @@ -2268,6 +2272,26 @@ TestCases:
Rule: odataRelativeUri
Input: Customers?$select=Addresses(@a=$this;$filter=endswith(@a/Street,'gasse'))

- Name: request reference in $batch
Rule: commonExpr
Input: Customer eq $1
Expect:
- firstMemberExpr:Customer
- firstMemberExpr:$1

ralfhandl marked this conversation as resolved.
Show resolved Hide resolved
- Name: property reference in $batch
Rule: commonExpr
Input: Customer/Name eq $1/Name
Expect:
- memberExpr:Customer/Name
- memberExpr:Name

- Name: member reference in $batch
Rule: commonExpr
Input: Customer/Name eq $1('ALFKI')/Name
Expect:
- collectionNavigationExpr:('ALFKI')/Name

- Name: 5.1.1.15 Path expressions
Rule: commonExpr
Input: Items
Expand Down
2 changes: 2 additions & 0 deletions abnf/odata-aggregation-testcases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ Constraints:
- Total # dynamic
- WeightedAmount # dynamic
- Year
request-id:
- group1
streamProperty:
- Image
termName:
Expand Down
Loading