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

Conditional logic for JSONPath selectors not working #218

Open
mark-sivill-kong opened this issue Oct 24, 2024 · 1 comment
Open

Conditional logic for JSONPath selectors not working #218

mark-sivill-kong opened this issue Oct 24, 2024 · 1 comment

Comments

@mark-sivill-kong
Copy link

When applying conditional logic for a plugin using deck file add-plugins, only the first piece of logic is matched and applied.

Using the command

cat ./kong-simple-config.json | deck file add-plugins --format json ./get-post-route-plugins.yaml

Plugins are only applied to GET routes not POST routes, the selectors JSONPath is

$.services[*].routes[?(@.methods[?(@=='GET' ) || (@=='POST')])]

get-post-route-plugins.yaml.txt
get-route-plugins.yaml.txt
kong-simple-config.json

@rspurgeon
Copy link
Contributor

Filed upstream issue here: vmware-labs/yaml-jsonpath#60

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

No branches or pull requests

2 participants