OpenAPI V3 schema default type should support any
Open
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
I noticed in the code generator for Schema.default, the only acceptable types are bool, string, float, and int. https://github.com/google/gnostic/blob/master/generate-gnostic/generate-compiler.go#L233-L257
The OpenAPI 3.0 schema defines that the default value can be anything (https://github.com/OAI/OpenAPI-Specification/blob/main/schemas/v3.0/schema.json#L513-L514) and does not specify this oneOf clause present in gnostic.
We should be able to support Any for the default
cc @timburks
Contributor guide
Assessment
This issue has not been assessed yet.