@@ -94,8 +94,8 @@ type Example struct {
9494//
9595// https://swagger.io/specification/#tag-object
9696type Tag struct {
97- Name string `json:"name"`
98- Description string `json:"description,omitempty"`
97+ Name string `json:"name"`
98+ Description string `json:"description,omitempty"`
9999 ExternalDocs * ExternalDocumentation `json:"externalDocs,omitempty"`
100100}
101101
@@ -136,7 +136,28 @@ type License struct {
136136
137137// Server represents a Server.
138138type Server struct {
139- URL string `json:"url"`
139+ // REQUIRED. A URL to the target host. This URL supports Server Variables and MAY be relative,
140+ // to indicate that the host location is relative to the location where the OpenAPI document is being served.
141+ // Variable substitutions will be made when a variable is named in {brackets}.
142+ URL string `json:"url"`
143+ // An optional string describing the host designated by the URL.
144+ // CommonMark syntax MAY be used for rich text representation.
145+ Description string `json:"description,omitempty"`
146+ // A map between a variable name and its value. The value is used for substitution in the server's URL template.
147+ Variables map [string ]ServerVariable `json:"variables,omitempty"`
148+ }
149+
150+ // ServerVariable describes an object representing a Server Variable for server URL template substitution.
151+ type ServerVariable struct {
152+ // An enumeration of string values to be used if the substitution options are from a limited set.
153+ //
154+ // The array MUST NOT be empty.
155+ Enum []string `json:"enum,omitempty"`
156+ // REQUIRED. The default value to use for substitution, which SHALL be sent if an alternate value is not supplied.
157+ // Note this behavior is different than the Schema Object’s treatment of default values, because in those
158+ // cases parameter values are optional. If the enum is defined, the value MUST exist in the enum’s values.
159+ Default string `json:"default"`
160+ // An optional description for the server variable. CommonMark syntax MAY be used for rich text representation.
140161 Description string `json:"description,omitempty"`
141162}
142163
@@ -190,8 +211,8 @@ type Operation struct {
190211 // Tags can be used for logical grouping of operations by resources or any other qualifier.
191212 Tags []string `json:"tags,omitempty"`
192213
193- Summary string `json:"summary,omitempty"`
194- Description string `json:"description,omitempty"`
214+ Summary string `json:"summary,omitempty"`
215+ Description string `json:"description,omitempty"`
195216 ExternalDocs * ExternalDocumentation `json:"externalDocs,omitempty"`
196217
197218 OperationID string `json:"operationId,omitempty"`
0 commit comments