specification

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseURLFromRequest

func BaseURLFromRequest(r *http.Request) *url.URL

func ContentTypeFromFilename

func ContentTypeFromFilename(name string) string

func NopSeekCloser

func NopSeekCloser(r io.ReadSeeker) io.ReadSeekCloser

Types

type CompiledFile

type CompiledFile struct {
	Contents *bytes.Buffer
	Info     fs.FileInfo
}

type Config

type Config struct {
	// contains filtered or unexported fields
}

type Option

type Option func(*Config)

func WithIndexFilePath

func WithIndexFilePath(indexFilePath string) Option

Sets another path to where files for swagger ui is located

func WithOpenAPIPath

func WithOpenAPIPath(openAPIPath string) Option

Sets another name for index file than index.html

func WithSwaggerUIDirectory

func WithSwaggerUIDirectory(swaggerUIDirectory string) Option

Sets another base path for the swagger endpoints

type SwaggerFS

type SwaggerFS struct {
	FS fs.FS

	SwaggerURLPrefix      string
	APIEndpointsURLPrefix string

	NotFoundHandler         http.Handler
	MethodNotAllowedHandler http.Handler
}

func (*SwaggerFS) Handler

func (swaggerfs *SwaggerFS) Handler(opts ...Option) http.Handler

Jump to

Keyboard shortcuts

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