-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
goai_mediatype.go
27 lines (23 loc) · 1023 Bytes
/
goai_mediatype.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file,
// You can obtain one at https://github.com/gogf/gf.
package goai
// MediaType is specified by OpenAPI/Swagger 3.0 standard.
type MediaType struct {
Schema *SchemaRef `json:"schema,omitempty"`
Example interface{} `json:"example,omitempty"`
Examples Examples `json:"examples,omitempty"`
Encoding map[string]*Encoding `json:"encoding,omitempty"`
}
// Content is specified by OpenAPI/Swagger 3.0 standard.
type Content map[string]MediaType
// Encoding is specified by OpenAPI/Swagger 3.0 standard.
type Encoding struct {
ContentType string `json:"contentType,omitempty"`
Headers Headers `json:"headers,omitempty"`
Style string `json:"style,omitempty"`
Explode *bool `json:"explode,omitempty"`
AllowReserved bool `json:"allowReserved,omitempty"`
}