nl.zeekat.ring-openapi-validator
openapi-validator
(openapi-validator spec {:keys [base-path], :as opts})(openapi-validator spec)Build an OpenApiInteractionValidator from a spec
spec is a url or path to resource describing a Swagger or OpenApi specification.
opts is an optional map of options: - :base-path overrides the base path in the spec.
If you need to customize the validator you can create a builder using com.atlassian.oai.validator.OpenApiInteractionValidator/createFor
validate-interaction
(validate-interaction validator request response)Validate a request/response pair using the given validator.
If any issues are found, returns a report collection
validate-request
(validate-request validator request)Validate a request using the given validator.
If any issues are found, returns a report collection
validate-response
(validate-response validator method path response)Validate a response using the given validator.
methodis a ring-spec method::get:head:postetc…pathis the request path excluding parameters
If any issues are found, returns a report collection