[openapi] empty default should not be specified for required objects with required properties #2987
Open
2 tasks done
Labels
area/testing
Pull requests that update testing code
priority/backlog
Issues that have the least priority
source/deckhouse-team
Issue created by Deckhouse team
status/needs-triage
Issues or PRs awaiting triage.
Preflight Checklist
Version
main
Affected modules
Expected Behavior
OpenAPI cases test should not fail for this setup:
MODULE/openapi/values.yaml
MODULE/openapi/openapi-case-tests.yaml
Actual Behavior
make test-openapi
fails because negative case validates successfully.Steps To Reproduce
No response
Additional Information
The root cause is using
default:{}
andrequired
for required object. We think it is a valid schema, and JSON schema spec tells us it is:And here is the implementation of the "validation process" in go-openapi/validate:
Source: go-openapi/validate/object_validator.go
It seems we need to remove
default: {}
from all required certs and other such properties.Logs
No response
The text was updated successfully, but these errors were encountered: