On serialization
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
First thanks for working on a Golang project that understands/parses/validates multiple API specs!
I am using gnostic to parse & validate OpenAPIv3 specs (and later to validate API responses).
When translating from Gnostic's generated openapiv3.proto to my own intermediary format I noticed that some values have dubious defaults, such as OpenAPI's schema's `minimum` field:
https://github.com/googleapis/gnostic/blob/master/OpenAPIv3/OpenAPIv3.proto#L549
https://github.com/googleapis/gnostic/blob/master/OpenAPIv3/OpenAPIv3.go#L8100-L8102
IMO a boolean `has_minimum` should be introduced here, as a minimum of 0 is meaningful for real numbers.
Another note: it seems that OAS-flavored JSON schemas are not validated. They can contain `type: 'blipblop'` without issue.
Did I miss something? Is this planned to be supported?
I'm happy to open PRs!
I would also be very happy to see other Golang libs you like that
* parse at least OpenAPI specs
* validate the full spec (including OAS-flavored schemas), displaying useful warnings/errors
* can validate a net/http response against a spec
I'm building https://fuzzymonkey.co's client in Go but really the most complete libs seem to be in JS...
Contributor guide
Assessment
This issue has not been assessed yet.