Documentation ¶
Index ¶
- type Generator
- func (sg *Generator) ReDocUI(svc ...desc.ServiceDesc) (fs.FS, error)
- func (sg *Generator) SwaggerUI(svc ...desc.ServiceDesc) (fs.FS, error)
- func (sg *Generator) WithTag(tagName string) *Generator
- func (sg *Generator) WritePostmanTo(w io.Writer, descs ...desc.ServiceDesc) error
- func (sg *Generator) WritePostmanToFile(filename string, services ...desc.ServiceDesc) error
- func (sg *Generator) WriteSwagTo(w io.Writer, descs ...desc.ServiceDesc) error
- func (sg *Generator) WriteSwagToFile(filename string, services ...desc.ServiceDesc) error
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 (*Generator) WritePostmanTo ¶ added in v0.10.0
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 (*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>
Click to show internal directories.
Click to hide internal directories.