Documentation
¶
Overview ¶
Package openapi translates OpenAPI 3.x and Swagger 2.0 into callable operations.
The translator does not write a parser: `kin-openapi` already resolves `$ref` (nested and external included), reads JSON and YAML, and understands 3.0 and 3.1; Swagger 2.0 comes in converted to 3. Writing that by hand costs a partial model — and whatever the model does not cover arrives impoverished at the other end.
Here each parameter's schema is handed over AS IT IS in the spec (enum, format, array items, nested objects): the reader is an LLM, and every field lost along the way is a call it has to guess at.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
BaseURL string // beats the spec's `servers`
Auth auth.Applier
Client *http.Client
IncludePaths []*regexp.Regexp
ExcludePaths []*regexp.Regexp
IncludeMethods []string
ExcludeMethods []string
Headers map[string]string // fixed headers on every call
}
Options are decisions made by whoever starts the server, not by the spec.