mirror of
				https://github.com/axllent/mailpit.git
				synced 2025-10-31 00:07:43 +02:00 
			
		
		
		
	Change swagger BinaryResponse to os.File
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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": { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user