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
4 changes: 4 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ jobs:
run: |
! git grep -InE 'json:"' | grep -v _test.go | grep -v yaml:

- if: runner.os == 'Linux' && matrix.go != '1.16'
name: nilness
run: go run golang.org/x/tools/go/analysis/passes/nilness/cmd/nilness@latest ./...

- if: runner.os == 'Linux'
name: Missing specification object link to definition
run: |
Expand Down
4 changes: 1 addition & 3 deletions openapi3/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,6 @@ func (schema *Schema) visitJSON(settings *schemaValidationSettings, value interf
}

switch value := value.(type) {
case nil:
return schema.visitJSONNull(settings)
case bool:
return schema.visitJSONBoolean(settings, value)
case float64:
Expand Down Expand Up @@ -1416,7 +1414,7 @@ func (schema *Schema) visitJSONObject(settings *schemaValidationSettings, value
}
}
allowed := schema.AdditionalPropertiesAllowed
if additionalProperties != nil || allowed == nil || (allowed != nil && *allowed) {
if additionalProperties != nil || allowed == nil || *allowed {
if additionalProperties != nil {
if err := additionalProperties.visitJSON(settings, v); err != nil {
if settings.failfast {
Expand Down