Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jlandowner authored Jan 11, 2024
1 parent bc0badc commit 2587f8a
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,23 @@ dynamicFields:
- /data/COOKIE_SESSION_NAME
```

> NOTE:
> In JSONPath, escaping the / character is documented in [RFC6901, section 3](https://datatracker.ietf.org/doc/html/rfc6901#section-3)
> ```
> Because the characters '~' (%x7E) and '/' (%x2F) have special
> meanings in JSON Pointer, '~' needs to be encoded as '~0' and '/'
> needs to be encoded as '~1' when these characters appear in a
> reference token.
> ```
>
> So if you handle a manifest like the following, you need to specify the json path as `/metadata/annotaions/checksum~1values`.
>
> ```yaml
> metadata:
> annotations:
> checksum/values: RANDOM_VALUES
> ```
If you have a test values file directory, place it as a `.chartsnap.yaml` file within that directory. It is a common behavior in all snapshot tests in the directory.
For more examples, see [example/app1](example/app1).
Expand Down Expand Up @@ -234,23 +251,6 @@ testSpec:
# ...
```
> NOTE:
> In JSON Patch, escaping the / character is documented in [RFC6901, section 3](https://datatracker.ietf.org/doc/html/rfc6901#section-3)
> ```
> Because the characters '~' (%x7E) and '/' (%x2F) have special
> meanings in JSON Pointer, '~' needs to be encoded as '~0' and '/'
> needs to be encoded as '~1' when these characters appear in a
> reference token.
> ```
>
> So you need to specifiy the path `/metadata/annotaions/checksum~1values` for the below manifest.
>
> ```yaml
> metadata:
> annotations:
> checksum/values: RANDOM_VALUES
> ```
For more examples, see [example/remote](example/remote).
## Showcase & Users ✨
Expand Down

0 comments on commit 2587f8a

Please sign in to comment.