Api spec cleanup (#1869)

* Fix indentation

* Add parameter definition and remove unused model

* Update version

* Quote example string
This commit is contained in:
Richard Willis 2020-11-26 11:56:04 +00:00 committed by GitHub
parent b85b86e6de
commit f66e609d3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 33 deletions

View File

@ -15,7 +15,7 @@ info:
license: license:
name: CC0 1.0 Universal name: CC0 1.0 Universal
url: https://creativecommons.org/publicdomain/zero/1.0/legalcode url: https://creativecommons.org/publicdomain/zero/1.0/legalcode
version: 0.47.0 version: 0.51.0
x-logo: x-logo:
url: https://mailinabox.email/static/logo.png url: https://mailinabox.email/static/logo.png
altText: Mail-in-a-Box logo altText: Mail-in-a-Box logo
@ -744,30 +744,37 @@ paths:
schema: schema:
type: string type: string
/dns/zonefile/{zone}: /dns/zonefile/{zone}:
get: parameters:
tags: - in: path
- DNS name: zone
summary: Get DNS zonefile schema:
description: Returns an array of all managed top-level domains. $ref: '#/components/schemas/Hostname'
operationId: getDnsZonefile required: true
x-codeSamples: description: Hostname
- lang: curl get:
source: | tags:
curl -X GET "https://{host}/admin/dns/zonefile/<zone>" \ - DNS
-u "<email>:<password>" summary: Get DNS zonefile
responses: description: Returns a DNS zone file for a hostname.
200: operationId: getDnsZonefile
description: Successful operation x-codeSamples:
content: - lang: curl
application/json: source: |
schema: curl -X GET "https://{host}/admin/dns/zonefile/<zone>" \
$ref: '#/components/schemas/DNSZonefileResponse' -u "<email>:<password>"
403: responses:
description: Forbidden 200:
content: description: Successful operation
text/html: content:
schema: application/json:
type: string schema:
$ref: '#/components/schemas/DNSZonefileResponse'
403:
description: Forbidden
content:
text/html:
schema:
type: string
/dns/update: /dns/update:
post: post:
tags: tags:
@ -1806,7 +1813,7 @@ components:
text/plain: text/plain:
schema: schema:
type: string type: string
example: 1.2.3.4 example: '1.2.3.4'
description: The value of the DNS record. description: The value of the DNS record.
example: '1.2.3.4' example: '1.2.3.4'
schemas: schemas:
@ -2690,13 +2697,6 @@ components:
type: string type: string
MfaEnableSuccessResponse: MfaEnableSuccessResponse:
type: string type: string
MfaEnableBadRequestResponse:
type: object
required:
- error
properties:
error:
type: string
MfaDisableRequest: MfaDisableRequest:
type: object type: object
properties: properties: