Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/gate-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
disable-sudo: true
allowed-endpoints: >
github.com:443
proxy.golang.org:443
- name: checkout code
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: setup go
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ tests:
paths:
$.author.name: Ernest Hemingway
$.publisher.address.state: New York
path_formats:
path-formats:
$.id: uuid4
```

Expand Down
4 changes: 2 additions & 2 deletions assertion/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ type Expect struct {
Paths map[string]string `yaml:"paths,omitempty"`
// PathFormats is a map, keyed by JSONPath expression, of expected formats
// that values found at the expression should have.
PathFormats map[string]string `yaml:"path_formats,omitempty"`
PathFormats map[string]string `yaml:"path-formats,omitempty"`
// Schema is a file path to the JSONSchema that the JSON should validate
// against.
Schema string `yaml:"schema,omitempty"`
Expand Down Expand Up @@ -112,7 +112,7 @@ func (e *Expect) UnmarshalYAML(node *yaml.Node) error {
}
}
e.Paths = paths
case "path_formats":
case "path_formats", "path-formats":
if valNode.Kind != yaml.MappingNode {
return gdterrors.ExpectedMapAt(valNode)
}
Expand Down