diff --git a/.github/workflows/gate-tests.yml b/.github/workflows/gate-tests.yml index 5f598a3..6553a6c 100644 --- a/.github/workflows/gate-tests.yml +++ b/.github/workflows/gate-tests.yml @@ -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 diff --git a/README.md b/README.md index c03ed75..b03247f 100644 --- a/README.md +++ b/README.md @@ -409,7 +409,7 @@ tests: paths: $.author.name: Ernest Hemingway $.publisher.address.state: New York - path_formats: + path-formats: $.id: uuid4 ``` diff --git a/assertion/json/json.go b/assertion/json/json.go index b6109b7..14d4d6f 100644 --- a/assertion/json/json.go +++ b/assertion/json/json.go @@ -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"` @@ -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) }