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