openapi

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractRequestConstraints

func ExtractRequestConstraints(doc *openapi3.T) map[string]map[string]FieldConstraint

ExtractRequestConstraints returns field constraints for the request body of each operationId.

func ExtractResponseConstraints

func ExtractResponseConstraints(doc *openapi3.T) map[string]map[string]FieldConstraint

ExtractResponseConstraints returns field constraints for the 2xx response of each operationId.

Types

type FieldConstraint

type FieldConstraint struct {
	Type      string
	Format    string
	MaxLength *int
	MinLength *int
	Enum      []string
	Required  bool
}

FieldConstraint holds constraints for a single OpenAPI schema property.

Jump to

Keyboard shortcuts

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