Documentation
¶
Index ¶
- func AuthTypeFromSpec(spec *v3.Document) string
- func BuildApi(spec *v3.Document, requestBody models.ApiPost, label string) *models.Api
- func CorsGet(c *http.Client, u string, corsurl string) (*http.Response, error)
- func DeriveAuthType(spec *v3.Document) string
- func IsHTTPStatus(err error, statusCode int) bool
- func ParseOutput(out string, timenow time.Time) []models.LintMessage
- func ProcessOAS(ctx context.Context, input tools.OASInput, opts FetchOpts, ...) error
- func UpdateApiFromSpec(api *models.Api, spec *v3.Document, requestBody models.ApiPost, label string)
- func ValidateApi(api *models.Api, requestBody models.ApiPost) []problem.InvalidParam
- type FetchOpts
- type HTTPStatusError
- type OASResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthTypeFromSpec ¶
func BuildApi ¶
BuildApi constructs a models.Api based on the OpenAPI spec (pb33f v3) and request body.
func DeriveAuthType ¶
DeriveAuthType determines authentication type from security schemes (pb33f v3).
func IsHTTPStatus ¶
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 ¶
ValidateApi checks fields needed to persist an API.
Types ¶
type HTTPStatusError ¶
type HTTPStatusError = models.HTTPStatusError
Click to show internal directories.
Click to hide internal directories.