openapidoc

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: MIT Imports: 13 Imported by: 3

Documentation

Index

Constants

View Source
const DefaultSecurityDefinitionName = "Bearer"

Variables

This section is empty.

Functions

func Format

func Format(t reflect.Type) string

func Param

func Param(t reflect.Type, name, in string) (*spec.Parameter, error)

func RegisterFormat

func RegisterFormat[T any](format string)

func Schema

func Schema(t reflect.Type, requireTag bool) (*spec.Schema, error)

func SwaggerUI

func SwaggerUI() http.Handler

func Type

func Type(t reflect.Type) string

Types

type APIDocer

type APIDocer interface {
	APIDoc(context.Context) (*spec.Swagger, error)
}

type OperationMiddleware

type OperationMiddleware interface {
	OperationMiddleware(*spec.Operation) *spec.Operation
}

type Operationer

type Operationer interface {
	Operation(ctx context.Context) (*spec.Operation, error)
}

type Pathser

type Pathser interface {
	Paths(ctx context.Context, basePath string) (*spec.Paths, error)
}

type SwaggerOption

type SwaggerOption func(*spec.Swagger) *spec.Swagger

func BasePath

func BasePath(basePath string) SwaggerOption

func DefaultSecurityDefinition

func DefaultSecurityDefinition() SwaggerOption

func Info

func Info(info spec.InfoProps) SwaggerOption

func SecurityDefinition

func SecurityDefinition(name string, securityScheme *spec.SecuritySchemeProps) SwaggerOption

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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