Documentation
¶
Index ¶
- func DefineErrors(op *core.Operation, registry core.Registry, factory core.ErrorHandler, ...)
- func Downgrade(oapi *core.OpenAPI) ([]byte, error)
- func DowngradeYAML(oapi *core.OpenAPI) ([]byte, error)
- func FilterByTag(oapi *core.OpenAPI, tag string) *core.OpenAPI
- func FilterExcludeTag(oapi *core.OpenAPI, tag string) *core.OpenAPI
- func GenerateInternalSpec(oapi *core.OpenAPI, hiddenOps []*core.Operation) (*core.OpenAPI, error)
- func GenerateInternalSpecJSON(oapi *core.OpenAPI, hiddenOps []*core.Operation) ([]byte, error)
- func RegisterDocsRoute(adapter core.Adapter, oapi *core.OpenAPI, config core.Config)
- func RegisterErrorDocRoutes(adapter core.Adapter, factory core.ErrorHandler, config core.Config)
- func RegisterInternalSpecRoutes(adapter core.Adapter, api core.API, config core.Config)
- func RegisterSpecRoutes(adapter core.Adapter, oapi *core.OpenAPI, config core.Config)
- func YAML(oapi *core.OpenAPI) ([]byte, error)
- type ScalarProvider
- type SchemaLinkTransformer
- type StoplightProvider
- type SwaggerUIProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefineErrors ¶
func DefineErrors(op *core.Operation, registry core.Registry, factory core.ErrorHandler, discovered ...[]core.DiscoveredError)
func GenerateInternalSpec ¶
func RegisterDocsRoute ¶
func RegisterErrorDocRoutes ¶
func RegisterSpecRoutes ¶
Types ¶
type ScalarProvider ¶
type ScalarProvider struct {
LocalJSPath string
}
type SchemaLinkTransformer ¶ added in v1.1.0
type SchemaLinkTransformer struct {
// contains filtered or unexported fields
}
SchemaLinkTransformer adds a Link header with rel="describedBy" and a $schema field to JSON response bodies, pointing to the JSON Schema that describes the response structure (RFC 8288).
func NewSchemaLinkTransformer ¶ added in v1.1.0
func NewSchemaLinkTransformer(schemasPath string) *SchemaLinkTransformer
NewSchemaLinkTransformer creates a transformer that adds a Link header with rel="describedBy" and a $schema field to response bodies.
func (*SchemaLinkTransformer) OnAddOperation ¶ added in v1.1.0
func (t *SchemaLinkTransformer) OnAddOperation(oapi *core.OpenAPI, op *core.Operation)
OnAddOperation is triggered whenever a new operation is added to the API, enabling this transformer to precompute and cache information about the response and schema.
type StoplightProvider ¶
type StoplightProvider struct{}
type SwaggerUIProvider ¶
Click to show internal directories.
Click to hide internal directories.