我正在尝试使用 go-swagger 生成 Go 服务的规范/文档
swagger generate spec -o ./docs/swagger.json --scan-models
Run Code Online (Sandbox Code Playgroud)
我能够生成基本信息+路线,但我的结构遇到了问题\
// Package classification Users' Data API
//
// Documentation for Users' Data API
//
// Schemes: http
// BasePath: /v1
// Version: 0.1.0
//
// Consumes:
// - application/json
//
// Produces:
// - application/json
//
// swagger:meta
package classification
import (
M "service-users-data/internals/database/models"
)
// A list of all Users
// swagger:response usersResponse
type productsResponseWrapper struct {
// All current Users
// …Run Code Online (Sandbox Code Playgroud)