I have a simple schema object SerialNumber
SerialNumber:
type: object
description: |
A serial number of an entity. This is a basic string but with length limitations. Hence a separate type to uniquely
identify such entities.
properties:
serial:
type: string
minLength: 5
maxLength: 128
required: [serial]
I used the openapi-generator to translate this to goalng with go-gin and the generated object is:
type SerialNumber struct {
Serial string `json:"serial"`
}
Wondering what happened to the maxLength and minLenght specification? How do I know on the generated golang side what the maxLength/minLength are for a SerialNumber? I was expecting that the json tags would have the maxLength/minLength attributes.
What am I doing wrong?