Documentation ¶
Overview ¶
* * @Author: TheLife * @Date: 2021/7/23 上午10:52
* * @Author: TheLife * @Date: 2021/7/22 下午4:18
Index ¶
- Variables
- func Build(config *gen.Config) error
- func BuildSwag(config *gen.Config) (s *spec.Swagger, err error)
- func BuildV2(config *gen.Config, s *spec.Swagger) (res []byte, err error)
- func BuildV3(config *gen.Config, swaggerV2 []byte) (res []byte, err error)
- func OutPut(jsonBytes []byte, outputDir string, name string) error
- func ReplaceSpot(searchIn []byte) (res []byte, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var RestCmd = &cobra.Command{ Use: "init", Version: fmt.Sprintf("swagr: 1.0 (powered by swag %s)", swag.Version), Short: "Automatically generate RESTful API documentation with Swagger 2.0 and convert to openapi 3.0 (spec3) for Go. ", Example: "swagr init -g http/api.go", RunE: func(cmd *cobra.Command, args []string) (err error) { switch c.PropNamingStrategy { case swag.CamelCase, swag.SnakeCase, swag.PascalCase: default: return fmt.Errorf("not supported %s propertyStrategy", c.PropNamingStrategy) } return Build(&c) }, }
RestCmd represents the rest command
Functions ¶
func ReplaceSpot ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.