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
|
// Message subject
|
||||||
Subject string
|
Subject string
|
||||||
// List-Unsubscribe header information
|
// List-Unsubscribe header information
|
||||||
// swagger:ignore
|
|
||||||
ListUnsubscribe ListUnsubscribe
|
ListUnsubscribe ListUnsubscribe
|
||||||
// Message date if set, else date received
|
// Message date if set, else date received
|
||||||
Date time.Time
|
Date time.Time
|
||||||
@@ -117,10 +116,10 @@ type DBMailSummary struct {
|
|||||||
type ListUnsubscribe struct {
|
type ListUnsubscribe struct {
|
||||||
// List-Unsubscribe header value
|
// List-Unsubscribe header value
|
||||||
Header string
|
Header string
|
||||||
// Detected links, maximum one email and one HTTP(S)
|
// Detected links, maximum one email and one HTTP(S) link
|
||||||
Links []string
|
Links []string
|
||||||
// Validation errors if any
|
// Validation errors (if any)
|
||||||
Errors string
|
Errors string
|
||||||
// List-Unsubscribe-Post value if set
|
// List-Unsubscribe-Post value (if set)
|
||||||
HeaderPost string
|
HeaderPost string
|
||||||
}
|
}
|
||||||
|
@@ -1436,6 +1436,32 @@
|
|||||||
"x-go-name": "Response",
|
"x-go-name": "Response",
|
||||||
"x-go-package": "github.com/axllent/mailpit/internal/linkcheck"
|
"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": {
|
"Message": {
|
||||||
"description": "Message data excluding physical attachments",
|
"description": "Message data excluding physical attachments",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
@@ -1484,6 +1510,9 @@
|
|||||||
"$ref": "#/definitions/Attachment"
|
"$ref": "#/definitions/Attachment"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ListUnsubscribe": {
|
||||||
|
"$ref": "#/definitions/ListUnsubscribe"
|
||||||
|
},
|
||||||
"MessageID": {
|
"MessageID": {
|
||||||
"description": "Message ID",
|
"description": "Message ID",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
Reference in New Issue
Block a user