openapi

package
v0.0.0-...-83eafe6 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: EUPL-1.2 Imports: 24 Imported by: ? 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 AuthTypeFromSpec

func AuthTypeFromSpec(spec *v3.Document) string

func BuildApi

func BuildApi(spec *v3.Document, requestBody models.ApiPost, label string) *models.Api

BuildApi constructs a models.Api based on the OpenAPI spec (pb33f v3) and request body.

func CorsGet

func CorsGet(c *http.Client, u string, corsurl string) (*http.Response, error)

CorsGet performs a GET request including an Origin header.

func DeriveAuthType

func DeriveAuthType(spec *v3.Document) string

DeriveAuthType determines authentication type from security schemes (pb33f v3).

func IsHTTPStatus

func IsHTTPStatus(err error, statusCode int) bool

func ParseOutput

func ParseOutput(out string, timenow time.Time) []models.LintMessage

ParseOutput converts the text output of Spectral into structured messages.

func ProcessOAS

func ProcessOAS(ctx context.Context, input tools.OASInput, opts FetchOpts, consume func(*OASResult) error) error

ProcessOAS owns one complete libopenapi document lifecycle. libopenapi uses process-global caches and node pools, so model consumers are serialized and the caches are cleared before another document can be processed.

func UpdateApiFromSpec

func UpdateApiFromSpec(api *models.Api, spec *v3.Document, requestBody models.ApiPost, label string)

UpdateApiFromSpec mutates an existing models.Api with values derived from the OpenAPI spec.

func ValidateApi

func ValidateApi(api *models.Api, requestBody models.ApiPost) []problem.InvalidParam

ValidateApi checks fields needed to persist an API.

Types

type FetchOpts

type FetchOpts = models.FetchOpts

type HTTPStatusError

type HTTPStatusError = models.HTTPStatusError

type OASResult

type OASResult = models.OASResult

func FetchParseValidateAndHash

func FetchParseValidateAndHash(ctx context.Context, input tools.OASInput, opts FetchOpts) (*OASResult, error)

Jump to

Keyboard shortcuts

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