1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-01-22 03:39:59 +02:00

Chore: Update API documentation regarding date/time searches & timezones

This commit is contained in:
Ralph Slooten 2024-04-14 12:36:45 +12:00
parent 9e527adb24
commit 8da8a1ad6b
2 changed files with 17 additions and 6 deletions

View File

@ -84,7 +84,7 @@ func Search(w http.ResponseWriter, r *http.Request) {
//
// # Search messages
//
// Returns the latest messages matching a search.
// Returns messages matching [a search](https://mailpit.axllent.org/docs/usage/search-filters/), sorted by received date (descending).
//
// Produces:
// - application/json
@ -111,7 +111,7 @@ func Search(w http.ResponseWriter, r *http.Request) {
// default: 50
// + name: tz
// in: query
// description: Timezone for `before:` & `after:` queries, eg: "Pacific/Auckland"
// description: [Timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used specifically for `before:` & `after:` searches (eg: "Pacific/Auckland").
// required: false
// type: string
//
@ -155,7 +155,7 @@ func DeleteSearch(w http.ResponseWriter, r *http.Request) {
//
// # Delete messages by search
//
// Delete all messages matching a search.
// Delete all messages matching [a search](https://mailpit.axllent.org/docs/usage/search-filters/).
//
// Produces:
// - application/json
@ -168,6 +168,11 @@ func DeleteSearch(w http.ResponseWriter, r *http.Request) {
// description: Search query
// required: true
// type: string
// + name: tz
// in: query
// description: [Timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used specifically for `before:` & `after:` searches (eg: "Pacific/Auckland").
// required: false
// type: string
//
// Responses:
// 200: OKResponse

View File

@ -516,7 +516,7 @@
},
"/api/v1/search": {
"get": {
"description": "Returns the latest messages matching a search.",
"description": "Returns messages matching [a search](https://mailpit.axllent.org/docs/usage/search-filters/), sorted by received date (descending).",
"produces": [
"application/json"
],
@ -553,7 +553,7 @@
},
{
"type": "string",
"description": "Timezone for `before:` \u0026 `after:` queries, eg: \"Pacific/Auckland\"",
"description": "[Timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used specifically for `before:` \u0026 `after:` searches (eg: \"Pacific/Auckland\").",
"name": "tz",
"in": "query"
}
@ -568,7 +568,7 @@
}
},
"delete": {
"description": "Delete all messages matching a search.",
"description": "Delete all messages matching [a search](https://mailpit.axllent.org/docs/usage/search-filters/).",
"produces": [
"application/json"
],
@ -588,6 +588,12 @@
"name": "query",
"in": "query",
"required": true
},
{
"type": "string",
"description": "[Timezone identifier](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) used specifically for `before:` \u0026 `after:` searches (eg: \"Pacific/Auckland\").",
"name": "tz",
"in": "query"
}
],
"responses": {