mirror of
https://github.com/axllent/mailpit.git
synced 2025-08-13 20:04:49 +02:00
Docs: Add Message ListUnsubscribe to swagger / API documentation (#494)
This commit is contained in:
@@ -28,7 +28,6 @@ type Message struct {
|
||||
// Message subject
|
||||
Subject string
|
||||
// List-Unsubscribe header information
|
||||
// swagger:ignore
|
||||
ListUnsubscribe ListUnsubscribe
|
||||
// Message date if set, else date received
|
||||
Date time.Time
|
||||
@@ -117,10 +116,10 @@ type DBMailSummary struct {
|
||||
type ListUnsubscribe struct {
|
||||
// List-Unsubscribe header value
|
||||
Header string
|
||||
// Detected links, maximum one email and one HTTP(S)
|
||||
// Detected links, maximum one email and one HTTP(S) link
|
||||
Links []string
|
||||
// Validation errors if any
|
||||
// Validation errors (if any)
|
||||
Errors string
|
||||
// List-Unsubscribe-Post value if set
|
||||
// List-Unsubscribe-Post value (if set)
|
||||
HeaderPost string
|
||||
}
|
||||
|
@@ -1436,6 +1436,32 @@
|
||||
"x-go-name": "Response",
|
||||
"x-go-package": "github.com/axllent/mailpit/internal/linkcheck"
|
||||
},
|
||||
"ListUnsubscribe": {
|
||||
"description": "ListUnsubscribe contains a summary of List-Unsubscribe \u0026 List-Unsubscribe-Post headers\nincluding validation of the link structure",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Errors": {
|
||||
"description": "Validation errors (if any)",
|
||||
"type": "string"
|
||||
},
|
||||
"Header": {
|
||||
"description": "List-Unsubscribe header value",
|
||||
"type": "string"
|
||||
},
|
||||
"HeaderPost": {
|
||||
"description": "List-Unsubscribe-Post value (if set)",
|
||||
"type": "string"
|
||||
},
|
||||
"Links": {
|
||||
"description": "Detected links, maximum one email and one HTTP(S) link",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-go-package": "github.com/axllent/mailpit/internal/storage"
|
||||
},
|
||||
"Message": {
|
||||
"description": "Message data excluding physical attachments",
|
||||
"type": "object",
|
||||
@@ -1484,6 +1510,9 @@
|
||||
"$ref": "#/definitions/Attachment"
|
||||
}
|
||||
},
|
||||
"ListUnsubscribe": {
|
||||
"$ref": "#/definitions/ListUnsubscribe"
|
||||
},
|
||||
"MessageID": {
|
||||
"description": "Message ID",
|
||||
"type": "string"
|
||||
|
Reference in New Issue
Block a user