openapi

package
v0.0.0-...-aea7a5c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OpenAPIDefPath is the path to the OpenAPI definition
	OpenAPIDefPath = "../../api/openapi.yaml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator is a struct to validate the OpenAPI specification

func PrepareOpenAPIValidator

func PrepareOpenAPIValidator(openAPIDefPath string) (*Validator, error)

PrepareOpenAPIValidator creates a new OpenAPIValidator

func (*Validator) ValidateResponse

func (v *Validator) ValidateResponse(responseBody []byte, request *http.Request, statusCode int, headers http.Header) error

ValidateResponse validates the response against the OpenAPI specification

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL