We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the repo we have a sample deck file: docs/summertime-kong.yml that has one service and one route and the route is defined under the service.
docs/summertime-kong.yml
Applying a patch with a selector that uses recursive descent and a filter expression results in (I believe) inconsistent results:
The first example's selector is explicit in the path to the routes:
> kced patch -s docs/summertime-kong.yml --selector '$.services[*].routes[?(@.name=="summer-time_get")]' --value 'field:"foo"' _format_version: "3.0" services: - host: mockbin.org id: b1525aee-d304-11ed-afa1-0242ac120002 name: summer-time path: /requests plugins: [] port: 443 protocol: https routes: - field: foo id: b7d87736-d304-11ed-afa1-0242ac120002 methods: - GET name: summer-time_get paths: - ~/summer-time$ plugins: [] regex_priority: 200 strip_path: false tags: []
In the second example we use recursive descent which should result in the same behavior, but do not get the expected results:
❯ kced patch -s docs/summertime-kong.yml --selector '$..routes[?(@.name=="summer-time_get")]' --value 'field:"foo"' _format_version: "3.0" services: - host: mockbin.org id: b1525aee-d304-11ed-afa1-0242ac120002 name: summer-time path: /requests plugins: [] port: 443 protocol: https routes: - id: b7d87736-d304-11ed-afa1-0242ac120002 methods: - GET name: summer-time_get paths: - ~/summer-time$ plugins: [] regex_priority: 200 strip_path: false tags: []
Using https://jsonpath.com/ to validate, I see the following:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In the repo we have a sample deck file:
docs/summertime-kong.yml
that has one service and one route and the route is defined under the service.Applying a patch with a selector that uses recursive descent and a filter expression results in (I believe) inconsistent results:
The first example's selector is explicit in the path to the routes:
In the second example we use recursive descent which should result in the same behavior, but do not get the expected results:
Using https://jsonpath.com/ to validate, I see the following:
The text was updated successfully, but these errors were encountered: