A validation module for libopenapi.
libopenapi-validator
will validate the following elements against an OpenAPI 3+ specification
- http.Request - Validates the request against the OpenAPI specification
- http.Response - Validates the response against the OpenAPI specification
- libopenapi.Document - Validates the OpenAPI document against the OpenAPI specification
- base.Schema - Validates a schema against a JSON or YAML blob / unmarshalled object
ππ Check out the full documentation ππ
go get github.com/pb33f/libopenapi-validator
go run github.com/pb33f/libopenapi-validator/cmd/validate@latest [--regexengine] <file>
π Example: Use a custom regex engine/flag (e.g., ecmascript)
go run github.com/pb33f/libopenapi-validator/cmd/validate@latest --regexengine=ecmascript <file>
π§ Supported --regexengine flags/values (βΉοΈ Default: re2)
- none
- ignorecase
- multiline
- explicitcapture
- compiled
- singleline
- ignorepatternwhitespace
- righttoleft
- debug
- ecmascript
- re2
- unicode
- The structure of the validator
- Validating http.Request
- Validating http.Request and http.Response
- Validating just http.Response
- Validating HTTP Parameters
- Validating an OpenAPI document
- Validating Schemas
libopenapi and libopenapi-validator are products of Princess Beef Heavy Industries, LLC