oapi-codegen icon indicating copy to clipboard operation
oapi-codegen copied to clipboard

strict client

Open amery opened this issue 4 years ago • 1 comments

Hi, is there a way to generate a strict client that will warn if the data provided by the server doesn't comply with the specification anymore?

amery avatar Nov 14 '21 01:11 amery

I've got a library that works under unit tests to validate it, which uses the https://github.com/getkin/kin-openapi#validating-http-requestsresponses. You can also enforce this server-side if your server using i.e. https://github.com/deepmap/oapi-codegen/blob/b1edf760c6e783a91dd007995bf42118550cab4f/examples/petstore-expanded/gorilla/petstore.go#L41

jamietanna avatar May 27 '22 07:05 jamietanna