swagger

package
v0.17.19 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: BSD-3-Clause Imports: 16 Imported by: 2

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

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

func New

func New(title, ver, desc string) *Generator

func (*Generator) ReDocUI added in v0.17.3

func (sg *Generator) ReDocUI(svc ...desc.ServiceDesc) (fs.FS, error)

func (*Generator) SwaggerUI added in v0.16.0

func (sg *Generator) SwaggerUI(svc ...desc.ServiceDesc) (fs.FS, error)

func (*Generator) WithTag

func (sg *Generator) WithTag(tagName string) *Generator

func (*Generator) WritePostmanTo added in v0.10.0

func (sg *Generator) WritePostmanTo(w io.Writer, descs ...desc.ServiceDesc) error

func (*Generator) WritePostmanToFile added in v0.10.0

func (sg *Generator) WritePostmanToFile(filename string, services ...desc.ServiceDesc) error
Example
err := swagger.New("TestTitle", "v0.0.1", "").
	WithTag("json").
	WritePostmanToFile("_postman.json", testService{})
fmt.Println(err)
Output:

<nil>

func (*Generator) WriteSwagTo added in v0.10.0

func (sg *Generator) WriteSwagTo(w io.Writer, descs ...desc.ServiceDesc) error

func (*Generator) WriteSwagToFile added in v0.10.0

func (sg *Generator) WriteSwagToFile(filename string, services ...desc.ServiceDesc) error
Example
err := swagger.New("TestTitle", "v0.0.1", "").
	WithTag("json").
	WriteSwagToFile("_swagger.json", testService{})
fmt.Println(err)
Output:

<nil>

Jump to

Keyboard shortcuts

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