Fix swagger syntax

This commit is contained in:
Kumi 2020-09-03 11:48:31 +02:00
parent 4d1c18c542
commit 92ce2092e7
2 changed files with 11 additions and 14 deletions

File diff suppressed because one or more lines are too long

View file

@ -25,7 +25,7 @@ paths:
parameters: parameters:
- in: "body" - in: "body"
name: "data" name: "data"
description: "JSON defining the email message to be sent" description: "Object defining the email message to be sent"
required: true required: true
schema: schema:
$ref: "#/definitions/Mail" $ref: "#/definitions/Mail"
@ -38,49 +38,45 @@ paths:
status: status:
type: "string" type: "string"
description: "\"Success\" if message was successfully sent, else \"error\"" description: "\"Success\" if message was successfully sent, else \"error\""
required: true
error: error:
type: "string" type: "string"
description: "Error message, only included if an error has occurred" description: "Error message, only included if an error has occurred"
required: false
definitions: definitions:
Placeholder: Placeholder:
type: "object" type: "object"
required: ["name"]
properties: properties:
name: name:
type: "string" type: "string"
required: true
description: "Name of the placeholder - will be converted to ALL CAPS by the server if it isn't already" description: "Name of the placeholder - will be converted to ALL CAPS by the server if it isn't already"
value: value:
type: "string" type: "string"
required: false
description: "Value to insert into placeholder" description: "Value to insert into placeholder"
Attachment: Attachment:
type: "object" type: "object"
required: ["url"]
properties: properties:
url: url:
type: "string" type: "string"
format: "url" format: "url"
required: true
description: "URL from where to fetch the file to attach" description: "URL from where to fetch the file to attach"
filename: filename:
type: "string" type: "string"
required: false
description: "File name to use for email attachment. If not set, defaults to name from Content-Disposition header of URL if it exists, else the base name of the URL." description: "File name to use for email attachment. If not set, defaults to name from Content-Disposition header of URL if it exists, else the base name of the URL."
Recipient: Recipient:
type: "object" type: "object"
required: ["email"]
properties: properties:
email: email:
type: "string" type: "string"
format: "email" format: "email"
required: true
description: "Email address of the recipient" description: "Email address of the recipient"
name: name:
type: "string" type: "string"
required: false
description: "Name of the recipient" description: "Name of the recipient"
Mail: Mail:
type: "object" type: "object"
required: ["recipients", "key"]
properties: properties:
subject: subject:
type: "string" type: "string"
@ -98,7 +94,6 @@ definitions:
type: "string" type: "string"
description: "String containing the URL to a file containing the plain text content of the email. Ignored (but still validated) if `text` is provided. If both `texturl` and `html` or `htmlurl` are provided, will create a multi-part MIME message." description: "String containing the URL to a file containing the plain text content of the email. Ignored (but still validated) if `text` is provided. If both `texturl` and `html` or `htmlurl` are provided, will create a multi-part MIME message."
recipients: recipients:
required: true
type: "array" type: "array"
description: "Array of `Recipient` objects to be used as \"To:\" addresses for the email" description: "Array of `Recipient` objects to be used as \"To:\" addresses for the email"
items: items: