openapi

package
v3.10.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGraphQLSDL

func IsGraphQLSDL(data []byte) bool

func IsOpenAPI

func IsOpenAPI(data []byte) bool

func Parse

func Parse(data []byte) (*spec.APISpec, error)

Parse parses an OpenAPI spec strictly. Use ParseLenient for specs with broken $refs.

func ParseLenient

func ParseLenient(data []byte) (*spec.APISpec, error)

ParseLenient parses an OpenAPI spec, skipping validation errors from broken $refs. It logs warnings to stderr for any issues found but continues parsing.

func SetMaxEndpointsPerResource

func SetMaxEndpointsPerResource(n int)

SetMaxEndpointsPerResource overrides the default limit and disables auto-calibration. When not called, the parser auto-calibrates the limit from the spec so well-formed specs never have endpoints silently skipped.

func SetMaxResources

func SetMaxResources(n int)

SetMaxResources overrides the default resource limit. When not called, the parser uses a default of 500 which accommodates all known APIs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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