hugo-mx-gateway/swagger.yaml

73 lines
1.6 KiB
YAML
Raw Normal View History

2020-05-10 00:02:18 +02:00
swagger: "2.0"
info:
description: "Emailer for Hugo contact form"
version: "1.0.0"
title: "Emailer for Hugo contact form"
contact:
email: "rodrigue.chakode at gmail.com"
license:
name: "Apache 2.0"
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "mail.example.com"
basePath: "/v1"
tags:
- name: "email"
description: "API to handle email"
schemes:
- "https"
- "http"
paths:
/send:
post:
tags:
- "email"
summary: "Send an email using details provided in the request body"
description: ""
operationId: "sendMail"
consumes:
- "application/json"
produces:
- "application/json"
parameters:
- in: "body"
name: "body"
description: "Email object containing, the recipient, the subject and the content"
required: true
schema:
$ref: "#/definitions/EmailRequest"
responses:
405:
description: "Invalid input"
500:
description: "Internal server error"
security:
- petstore_auth:
- "send:emails"
securityDefinitions:
petstore_auth:
type: "oauth2"
authorizationUrl: "http://auth.example.com/oauth/dialog"
flow: "implicit"
scopes:
send:emails: "send email"
api_key:
type: "apiKey"
name: "api_key"
in: "header"
definitions:
EmailRequest:
type: "object"
properties:
recipient:
type: "string"
format: "email"
subject:
type: "string"
body:
type: "string"
xml:
name: "Order"
externalDocs:
description: "Learn more"
url: "https://github.com/rchakode/hugo-mx-gateway"