swagger-codegen-generators
swagger-codegen-generators copied to clipboard
[go-server] How to generate type:string format:uuid as uuid.UUID?
Hi folks, is there any way to generate a (type:string,format:uuid) as go-type "uuid.UUID"?
Yaml-Definition:
thing_id:
type: string
format: uuid
Generated code:
ThingId string `json:"thing_id"`
Expected code:
import (
"github.com/google/uuid"
)
ThingId uuid.UUID `json:"thing_id"`
Used latest generator V3.0.29:
java -jar jars/swagger-codegen-cli-3.0.29.jar generate -l go-server -i "openapi.yaml" -o swagger