swagger

package
v0.0.0-...-58c3220 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WritingDataErrorMessage              = "Writing swagger data is failed"
	ReadingFromVFSErrorMessage           = "Error while reading swagger files from virtual file system"
	ReadingSwaggerDefinitionErrorMessage = "Reading of a swagger definition is failed"
)

Error messages

View Source
const (
	ContentTypeHeaderKey = "Content-Type"
)

Variables

This section is empty.

Functions

func Handler

func Handler(apiStaticFS http.FileSystem, swaggerDefReader DefinitionReader) gin.HandlerFunc

Types

type DefinitionReader

type DefinitionReader func() (string, error)

It returns a v2 or v3 swagger definition as a string. Example of the definition is https://petstore.swagger.io/v2/swagger.json

Jump to

Keyboard shortcuts

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