This PR implements a @openapi:example tag for examples.
Usage:
// @openapi:schema
type Character struct {
// @openapi:example Nathan Drake
Name string `json:"name"` // putting the tag here won't work
}
// @openapi:schema
// @openapi:example 42
type Age int
This PR implements a
@openapi:example
tag for examples.Usage:
will result in:
Notes
The conversion only handles
float
types,int
anduint
types. Otherwise, it stays as a string.