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

Negative condition support #33

Open
chillleader opened this issue Nov 23, 2023 · 3 comments
Open

Negative condition support #33

chillleader opened this issue Nov 23, 2023 · 3 comments
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers ux

Comments

@chillleader
Copy link

Is your feature request related to a problem? Please describe.

As a Connector developer, I would like to be able to use the not condition when creating an element template.

Describe the solution you'd like

      "condition" : {
        "property": "method",
        "noneOf": [ "GET", "DELETE"]
      }

Describe alternatives you've considered

Regex (or client-side FEEL expression) condition support could solve this and any other future requests in this area:

    "condition": {
      "type": "regex",
      "regex": "^((?!GET|DELETE).)*$"
    }

Additional context

@chillleader chillleader added the enhancement New feature or request label Nov 23, 2023
@nikku
Copy link
Member

nikku commented Nov 24, 2023

Is there a reason (beyond convenience) that you want to use noneOf instead of oneOf?

@nikku nikku added backlog Queued in backlog good first issue Good for newcomers ux labels Nov 24, 2023
@chillleader
Copy link
Author

This came up in the context of REST connector and the condition change bug. This could help us work around that issue as we wouldn't need to update the condition e.g. when adding a new operation or removing the body for one of HTTP methods.

Apart from that, like you said it is mostly for convenience. For instance, could be useful in the element template generator, especially the OpenAPI one, by making the resulting code a bit easier to comprehend.

@nikku
Copy link
Member

nikku commented Nov 27, 2023

Thanks for elaborating. We'll try to tackle the bug with higher priority then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog enhancement New feature or request good first issue Good for newcomers ux
Projects
None yet
Development

No branches or pull requests

2 participants