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

condition languages: rules treated as properties might lead to ugly trees #94

Closed
tripodsan opened this issue Apr 24, 2019 · 2 comments
Closed
Labels
question Further information is requested

Comments

@tripodsan
Copy link
Contributor

tripodsan commented Apr 24, 2019

the current schema defines the condition values as properties:

"patternProperties": {

which would lead to ugly trees for alternatives:

conditions:
  or:
    url.hostname=: www.adobe.com
    or:
       url.hostname=: www.adobe.io
       or:
         url.hostname=: www.adobe.net

of course, it could be written in a regexp, so maybe this is not really a problem

conditions:
   url.hostname~: www.adobe.(com|io|net)

an alternative could be to define the or, and nodes as arrays:

conditions:
  - or:
     - url.hostname=: www.adobe.com
     - url.hostname=: www.adobe.io
     - url.hostname=: www.adobe.net

or maybe both should be possible?

@trieloff
Copy link
Contributor

or is an array. Your example should look like this:

conditions:
  or:
    - url.hostname=: www.adobe.com
   - url.hostname=: www.adobe.io
   - url.hostname=: www.adobe.net

@tripodsan
Copy link
Contributor Author

@trieloff but then, those are wrong:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants