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

JSONPath support for yaml compare analyzer #1253

Open
banjoh opened this issue Jun 29, 2023 · 0 comments
Open

JSONPath support for yaml compare analyzer #1253

banjoh opened this issue Jun 29, 2023 · 0 comments
Labels
type::feature New feature or request

Comments

@banjoh
Copy link
Member

banjoh commented Jun 29, 2023

Describe the rationale for the suggested feature.

The YAML compare has a path parameter that is used to path a jsonpath-ish expression to select a field to compare inside a YAML document. Its based on GetAtPath implementation which is not fully compliant to the jsonpath specification. item[0].name does not work for example. It should be items.[0].name in our implementation. There might be a few others cases.

Describe the feature

Introduce a new field jsonPath parameter that uses https://pkg.go.dev/k8s.io/client-go/util/jsonpath library which is compliant to the jsonpath specification. #1244 PR is work that adds the same field to the JSON compare analyser. Aim to have a similar implementation to ensure the behaviour of the analysers remains the same.

@banjoh banjoh added the type::feature New feature or request label Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant