-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
In the docs here, it explains that:
You can use additional tags. Some will be interpreted by tonic, others will be exclusively used to enrich the OpenAPI specification.
example- An example value to be used in OpenAPI specification. See section below for the demonstration on how to provide example for custom types.
I've tried this:
type MultiPointWeatherRequest struct {
Locations []string `query:"locations[]" binding:"required" validate:"min=1" description:"Array of latitude,longitude pairs" explode:"true" example:"45.4215,-75.6972"`
Start *time.Time `query:"start"`
End *time.Time `query:"end"`
Step *models.PointStep `query:"step"`
}Except the example is not being used in the open API specification that is generated:
- name: locations[]
in: query
description: Array of latitude,longitude pairs
schema:
type: array
items:
type: string
description: Array of latitude,longitude pairs
minItems: 1
style: form
explode: trueWhat am I missing. I don't think this is a "custom type"?
Metadata
Metadata
Assignees
Labels
No labels