validate

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExampleValidationResult

type ExampleValidationResult struct {
	Schemas map[string]*SchemaValidation
}

ExampleValidationResult wraps validation results for export to public API

func ValidateExamples

func ValidateExamples(openapi []byte, schemaNames []string) (*ExampleValidationResult, error)

ValidateExamples validates examples in OpenAPI spec against schemas

type Issue

type Issue struct {
	Severity     Severity
	ExampleField string
	Message      string
	Line         int
}

Issue represents a single validation error or warning

type SchemaValidation

type SchemaValidation struct {
	SchemaPath  string
	HasExamples bool
	Valid       bool
	Issues      []Issue
}

SchemaValidation contains validation details for a single schema

type Severity

type Severity string

Severity indicates whether an issue is an error or warning

const (
	SeverityError   Severity = "error"
	SeverityWarning Severity = "warning"
)

Jump to

Keyboard shortcuts

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