Categorygithub.com/pb33f/libopenapi-validator
modulepackage
0.1.0
Repository: https://github.com/pb33f/libopenapi-validator.git
Documentation: pkg.go.dev

# README

libopenapi

Enterprise grade OpenAPI validation tools for golang.

Pipeline codecov discord Docs

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 šŸ‘ˆšŸ‘ˆ


Installation

go get github.com/pb33f/libopenapi-validator

Documentation

libopenapi and libopenapi-validator are products of Princess Beef Heavy Industries, LLC

# Packages

Package errors contains all the error types used by the validator.
Package helpers contains helper and utility functions used by the validator.
Package parameters contains all the logic, models and interfaces for validating OpenAPI 3+ Parameters.
Package paths contains all the logic, models and interfaces for validating OpenAPI 3+ Paths.
Package requests contains all the logic, models and interfaces for validating OpenAPI 3+ Requests.
Package responses contains all the logic, models and interfaces for validating OpenAPI 3+ Responses The package depends on *http.Response.
Package schema_validation contains all the logic, models and interfaces for validating OpenAPI 3+ Schemas.

# Functions

NewValidator will create a new Validator from an OpenAPI 3+ document.
NewValidatorFromV3Model will create a new Validator from an OpenAPI Model.

# Interfaces

Validator provides a coarse grained interface for validating an OpenAPI 3+ documents.