mirror of
https://github.com/axllent/mailpit.git
synced 2025-07-05 00:48:52 +02:00
Swagger: Revert BinaryResponse type to string
Go-swagger does not appear to support `"format": "binary"`, and `"$ref": "#/definitions/File"` doesn't seem to be supported. Resolves #188
This commit is contained in:
@ -1,7 +1,5 @@
|
|||||||
package apiv1
|
package apiv1
|
||||||
|
|
||||||
import "os"
|
|
||||||
|
|
||||||
// These structs are for the purpose of defining swagger HTTP responses
|
// These structs are for the purpose of defining swagger HTTP responses
|
||||||
|
|
||||||
// Application information
|
// Application information
|
||||||
@ -148,10 +146,7 @@ type linkCheckParams struct {
|
|||||||
|
|
||||||
// Binary data response inherits the attachment's content type
|
// Binary data response inherits the attachment's content type
|
||||||
// swagger:response BinaryResponse
|
// swagger:response BinaryResponse
|
||||||
type binaryResponse struct {
|
type binaryResponse string
|
||||||
// in: body
|
|
||||||
File os.File
|
|
||||||
}
|
|
||||||
|
|
||||||
// Plain text response
|
// Plain text response
|
||||||
// swagger:response TextResponse
|
// swagger:response TextResponse
|
||||||
@ -161,7 +156,7 @@ type textResponse string
|
|||||||
// swagger:response HTMLResponse
|
// swagger:response HTMLResponse
|
||||||
type htmlResponse string
|
type htmlResponse string
|
||||||
|
|
||||||
// Error response
|
// HTTP error response will return with a >= 400 response code
|
||||||
// swagger:response ErrorResponse
|
// swagger:response ErrorResponse
|
||||||
type errorResponse string
|
type errorResponse string
|
||||||
|
|
||||||
|
@ -809,11 +809,6 @@
|
|||||||
"x-go-name": "deleteMessagesRequestBody",
|
"x-go-name": "deleteMessagesRequestBody",
|
||||||
"x-go-package": "github.com/axllent/mailpit/server/apiv1"
|
"x-go-package": "github.com/axllent/mailpit/server/apiv1"
|
||||||
},
|
},
|
||||||
"File": {
|
|
||||||
"type": "object",
|
|
||||||
"title": "File represents an open file descriptor.",
|
|
||||||
"x-go-package": "os"
|
|
||||||
},
|
|
||||||
"HTMLCheckResponse": {
|
"HTMLCheckResponse": {
|
||||||
"description": "Response represents the HTML check response struct",
|
"description": "Response represents the HTML check response struct",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@ -1387,11 +1382,11 @@
|
|||||||
"BinaryResponse": {
|
"BinaryResponse": {
|
||||||
"description": "Binary data response inherits the attachment's content type",
|
"description": "Binary data response inherits the attachment's content type",
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/definitions/File"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ErrorResponse": {
|
"ErrorResponse": {
|
||||||
"description": "Error response",
|
"description": "HTTP error response will return with a \u003e= 400 response code",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user