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

ODATA-1604 #105

Merged
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 8 additions & 5 deletions abnf/odata-abnf-construction-rules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ inlinecount = ( "$count" / "count" ) EQ booleanValue

schemaversion = ( "$schemaversion" / "schemaversion" ) EQ ( STAR / 1*unreserved )

search = ( "$search" / "search" ) EQ BWS ( searchExpr / searchExpr-incomplete )
search = ( "$search" / "search" ) EQ BWS ( searchExpr / searchExpr-incomplete ) BWS

searchExpr = ( searchParenExpr
/ searchNegateExpr
Expand Down Expand Up @@ -359,7 +359,7 @@ searchPhrase = quotation-mark 1*( qchar-no-AMP-DQUOTE / SP ) quotation-mark
; Expressing this in ABNF is somewhat clumsy, so the following rule is overly generous.
; Note: the words AND, OR, and NOT are sometimes operators, depending on their position within a search expression.
searchWord = searchChar *( searchChar / SQUOTE )
searchChar = unreserved / pct-encoded-no-DQUOTE / "!" / "*" / "+" / "," / ":" / "@" / "/" / "?" / "$" / "="
searchChar = unreserved / pct-encoded-no-SP-DQUOTE / "!" / "*" / "+" / "," / ":" / "@" / "/" / "?" / "$" / "="

searchExpr-incomplete = SQUOTE *( SQUOTE-in-string / qchar-no-AMP-SQUOTE / quotation-mark / SP ) SQUOTE

Expand Down Expand Up @@ -1237,8 +1237,11 @@ pct-encoded-unescaped = "%" ( "0" / "1" / "3" / "4" / "6" / "7" / "8" / "9"

pct-encoded-no-DQUOTE = "%" ( "0" / "1" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / A-to-F ) HEXDIG
/ "%" "2" ( "0" / "1" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / A-to-F )



pct-encoded-no-SP-DQUOTE = "%" ( "0" / "1" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / A-to-F ) HEXDIG
/ "%" "2" ( "1" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / A-to-F )


;------------------------------------------------------------------------------
; B. IRI syntax [RFC3987]
;------------------------------------------------------------------------------
Expand All @@ -1248,7 +1251,7 @@ pct-encoded-no-DQUOTE = "%" ( "0" / "1" / "3" / "4" / "5" / "6" / "7" / "8" /
IRI-in-header = 1*( VCHAR / obs-text )
IRI-in-query = 1*qchar-no-AMP


;------------------------------------------------------------------------------
; C. ABNF core definitions [RFC5234]
;------------------------------------------------------------------------------
Expand Down
20 changes: 20 additions & 0 deletions abnf/odata-abnf-testcases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2695,6 +2695,26 @@ TestCases:
Rule: queryOptions
Input: $search=blue%20green

- Name: 5.1.7 Search - leading space
Rule: queryOptions
Input: $search=%20blue
Expect:
- searchWord:blue

- Name: 5.1.7 Search - trailing space
Rule: queryOptions
Input: $search=blue%20&!special
Expect:
- searchWord:blue
- customQueryOption:!special

- Name: 5.1.7 Search - space in search phrase
Rule: queryOptions
Input: $search=%20"%20"%20-%20
Expect:
- searchPhrase:"%20"
- searchWord:-

- Name: 5.1.7 Search - AND
Rule: queryOptions
Input: $search=blue AND green
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.