fork of hey-api/openapi-ts because I need some additional things
at main 135 lines 4.0 kB view raw
1swagger: 2.0 2info: 3 title: OpenAPI 2.0 schema unknown example 4 description: https://github.com/hey-api/openapi-ts/issues/1402 5 version: 1 6host: api.postmarkapp.com 7basePath: / 8produces: 9 - application/json 10consumes: 11 - application/json 12definitions: 13 SendEmailRequest: 14 properties: 15 From: 16 description: The sender email address. Must have a registered and confirmed Sender Signature. 17 type: string 18 To: 19 description: Recipient email address. Multiple addresses are comma seperated. Max 50. 20 type: string 21 Cc: 22 description: Recipient email address. Multiple addresses are comma seperated. Max 50. 23 type: string 24 Bcc: 25 description: Bcc recipient email address. Multiple addresses are comma seperated. Max 50. 26 type: string 27 Subject: 28 description: Email Subject 29 type: string 30 Tag: 31 description: Email tag that allows you to categorize outgoing emails and get detailed statistics. 32 type: string 33 HtmlBody: 34 description: If no TextBody specified HTML email message 35 type: string 36 TextBody: 37 description: If no HtmlBody specified Plain text email message 38 type: string 39 ReplyTo: 40 description: Reply To override email address. Defaults to the Reply To set in the sender signature. 41 type: string 42 TrackOpens: 43 description: Activate open tracking for this email. 44 type: boolean 45 TrackLinks: 46 description: Replace links in content to enable "click tracking" stats. Default is 'null', which uses the server's LinkTracking setting'. 47 type: string 48 enum: ['None', 'HtmlAndText', 'HtmlOnly', 'TextOnly'] 49 Headers: 50 $ref: '#/definitions/HeaderCollection' 51 Attachments: 52 $ref: '#/definitions/AttachmentCollection' 53 MessageHeader: 54 description: A single header for an email message. 55 properties: 56 Name: 57 description: The header's name. 58 type: string 59 Value: 60 description: The header's value. 61 type: string 62 HeaderCollection: 63 type: array 64 items: 65 $ref: '#/definitions/MessageHeader' 66 Attachment: 67 description: An attachment for an email message. 68 properties: 69 Name: 70 type: string 71 Content: 72 type: string 73 ContentType: 74 type: string 75 ContentID: 76 type: string 77 AttachmentCollection: 78 type: array 79 items: 80 $ref: '#/definitions/Attachment' 81 SendEmailResponse: 82 description: The standard response when a postmark message is sent 83 properties: 84 To: 85 type: string 86 SubmittedAt: 87 type: string 88 format: 'date-time' 89 MessageID: 90 type: string 91 ErrorCode: 92 type: integer 93 Message: 94 type: string 95 StandardPostmarkResponse: 96 description: 'A Postmark API error.' 97 properties: 98 ErrorCode: 99 type: integer 100 Message: 101 type: string 102responses: 103 422: 104 description: 'An error was generated due to incorrect use of the API. See the Message associated with this response for more information.' 105 schema: 106 $ref: '#/definitions/StandardPostmarkResponse' 107 500: 108 description: 'Indicates an internal server error occurred.' 109paths: 110 #Message Sending API 111 /email: 112 post: 113 operationId: sendEmail 114 tags: 115 - Sending API 116 summary: Send a single email 117 parameters: 118 - name: X-Postmark-Server-Token 119 required: true 120 description: The token associated with the Server on which this request will operate. 121 type: string 122 in: header 123 - name: body 124 in: body 125 schema: 126 $ref: '#/definitions/SendEmailRequest' 127 responses: 128 200: 129 description: OK 130 schema: 131 $ref: '#/definitions/SendEmailResponse' 132 422: 133 $ref: '#/responses/422' 134 500: 135 $ref: '#/responses/500'