validation

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllPaths

func AllPaths(spec *openapi.Spec) map[string][]string

AllPaths returns all unique paths with their defined methods

func GetSupportedOperations

func GetSupportedOperations(spec *openapi.Spec) []*openapi.Operation

GetSupportedOperations returns only GET and POST operations

Types

type ValidationError

type ValidationError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	Path    string `json:"path,omitempty"`
	Method  string `json:"method,omitempty"`
}

ValidationError represents a single validation failure

type ValidationResult

type ValidationResult struct {
	Valid  bool              `json:"valid"`
	Errors []ValidationError `json:"errors,omitempty"`
}

ValidationResult holds all validation results

func Validate

func Validate(spec *openapi.Spec, profile jsp.ProfileID) *ValidationResult

Validate runs all validations on the parsed spec using the given schema profile for response schema validation via the jsonschemaprofiles library.

func (*ValidationResult) FormatJSON

func (r *ValidationResult) FormatJSON() string

FormatJSON returns validation result as JSON

func (*ValidationResult) FormatText

func (r *ValidationResult) FormatText() string

FormatText returns validation result as human-readable text

Jump to

Keyboard shortcuts

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