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

Disambiguate single-item lists from parenthesized expressions. #10

Open
OliverHofkens opened this issue Feb 16, 2022 · 0 comments
Open
Labels
bug Something isn't working enhancement New feature or request

Comments

@OliverHofkens
Copy link
Member

The OData ABNF doesn't seem to distinguish between a single item list expression and a simple parenthesized literal (e.g. ('draft')). This currently breaks some expressions in this library.
Example failing case:
status in ('draft')

Ref: https://docs.oasis-open.org/odata/odata/v4.01/cs01/abnf/odata-abnf-construction-rules.txt
Grammar rules:

  • parenExpr = OPEN BWS commonExpr BWS CLOSE
  • listExpr = OPEN BWS commonExpr BWS *( COMMA BWS commonExpr BWS ) CLOSE

Currently, the workaround in odata-query is by forcing a listExpr through a trailing comma: ('draft',). It would be nicer if we could comply with the spec 100%.

@OliverHofkens OliverHofkens added bug Something isn't working enhancement New feature or request labels Mar 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant