1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-02-03 13:12:03 +02:00

Change swagger BinaryResponse to os.File

This commit is contained in:
Ralph Slooten 2023-10-16 17:34:10 +13:00
parent e72dd8d9b6
commit 4c3e073b0c
2 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,7 @@
package apiv1
import "os"
// These structs are for the purpose of defining swagger HTTP responses
// Application information
@ -146,7 +148,10 @@ type linkCheckParams struct {
// Binary data response inherits the attachment's content type
// swagger:response BinaryResponse
type binaryResponse string
type binaryResponse struct {
// in: body
File os.File
}
// Plain text response
// swagger:response TextResponse

View File

@ -809,6 +809,11 @@
"x-go-name": "deleteMessagesRequestBody",
"x-go-package": "github.com/axllent/mailpit/server/apiv1"
},
"File": {
"type": "object",
"title": "File represents an open file descriptor.",
"x-go-package": "os"
},
"HTMLCheckResponse": {
"description": "Response represents the HTML check response struct",
"type": "object",
@ -1382,7 +1387,7 @@
"BinaryResponse": {
"description": "Binary data response inherits the attachment's content type",
"schema": {
"type": "string"
"$ref": "#/definitions/File"
}
},
"ErrorResponse": {