Question / feature proposal: Using the validator with httptest.ResponseRecorder
#40
Labels
enhancement
New feature or request
httptest.ResponseRecorder
#40
I'm looking at adding libopenapi to https://gitlab.com/jamietanna/httptest-openapi, a library I've got for writing (unit) tests with Go's
net/http
handlers by validating the response matches an OpenAPI spec.I've looked at using this library to give me full OpenAPI 3.0 and 3.1 support, instead of Kin's OpenAPI 3.0 only, but noticed that I couldn't use it right away.
In the test code i.e. https://gitlab.com/jamietanna/httptest-openapi/-/blob/v0.3.0/openapi3/validator.go?ref_type=tags#L95 we only have access to a
httptest.ResponseRecorder
whereas the library expects anhttp.Response
.Would it be of interest to add support for providing a
httptest.ResponseRecorder
or should I instead look at how to convert between the two types?The text was updated successfully, but these errors were encountered: