libopenapi-validator
libopenapi-validator copied to clipboard
OpenAPI validation extension for libopenapi, validate http requests and responses as well as schemas
The validation functions return both a bool and error(s). It leads to simpler code to simply ignore the returned bool and check for `len(errs) > 0` or `err != nil`...
A response with, for example, a `Content-Type: application/json; version=2` header fails validation against a spec that defines that same type as a valid response type, like so: ``` ... path...
If you call NewValidator() the resulting validator has the v.document field set. However if I want you call NewValidatorFromV3Model() it doesn't. Without this being set you get a panic when...
libopenapi-validator currently is unable to handle fixed fields in schema objects, an example being writeOnly. This property specifies that the schema object may appear in a request but not to...
I conducted a simple time-consuming test on a local MacPro (macOS 14.4.1 (23E224), 16GB, M22022) using code similar to the following ``` package mw import ( "context" "errors" "io/ioutil" "net/http"...
**Description**: I've encountered an inconsistency in parameter validation when using `libopenapi-validator version v0.4.0`. Specifically, there are differences in how validation errors are reported for different types of illegal parameter scenarios:...
implement https://github.com/pb33f/libopenapi-validator/issues/141
Bumps [github.com/pb33f/libopenapi](https://github.com/pb33f/libopenapi) from 0.21.8 to 0.21.9. Release notes Sourced from github.com/pb33f/libopenapi's releases. v0.21.9 Fixes a number of issues across models and the what_changed module after stress testing. Also fixes the...
as seen here https://swagger.io/specification/v3/#request-body-object a request body content type can be a [media type range](https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.2), we could extends https://github.com/pb33f/libopenapi-validator/blob/c322bf8cbbec477dc22e1193cff60ec249da813a/requests/validate_body.go#L66 to handle that media range. wdyt ?