Fix: Update Swagger JSON to prevent overflow (#442)

This commit is contained in:
Ralph Slooten
2025-02-14 16:10:54 +13:00
parent 61a1ed0e49
commit 7c366669c7
3 changed files with 10 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ var (
)
// Triggers for the Chaos configuration
// swagger:model Triggers
type Triggers struct {
// Sender trigger to fail on From, Sender
Sender Trigger
@@ -35,6 +36,7 @@ type Triggers struct {
}
// Trigger for Chaos
// swagger:model Trigger
type Trigger struct {
// SMTP error code to return. The value must range from 400 to 599.
// required: true

View File

@@ -7,9 +7,7 @@ import (
"github.com/axllent/mailpit/internal/smtpd/chaos"
)
// ChaosTriggers is the Chaos configuration
//
// swagger:model Triggers
// ChaosTriggers are the Chaos triggers
type ChaosTriggers chaos.Triggers
// Response for the Chaos triggers configuration

View File

@@ -69,7 +69,7 @@
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/Triggers"
"$ref": "#/definitions/ChaosTriggers"
}
}
],
@@ -1188,6 +1188,10 @@
},
"x-go-package": "github.com/axllent/mailpit/internal/storage"
},
"ChaosTriggers": {
"description": "ChaosTriggers are the Chaos triggers",
"$ref": "#/definitions/Triggers"
},
"HTMLCheckResponse": {
"description": "Response represents the HTML check response struct",
"type": "object",
@@ -1920,7 +1924,7 @@
"$ref": "#/definitions/Trigger"
}
},
"$ref": "#/definitions/Triggers"
"x-go-package": "github.com/axllent/mailpit/internal/smtpd/chaos"
},
"WebUIConfiguration": {
"description": "Response includes global web UI settings",
@@ -2002,7 +2006,7 @@
"ChaosResponse": {
"description": "Response for the Chaos triggers configuration",
"schema": {
"$ref": "#/definitions/Triggers"
"$ref": "#/definitions/ChaosTriggers"
}
},
"ErrorResponse": {