+ openapi: add /rewrite/* methods

This commit is contained in:
Simon Zolin 2019-07-26 17:09:46 +03:00 committed by Ildar Kamalov
parent 1bb6638db7
commit 70b8cf6ec8
1 changed files with 67 additions and 0 deletions

View File

@ -786,6 +786,54 @@ paths:
200: 200:
description: OK description: OK
# --------------------------------------------------
# Rewrite methods
# --------------------------------------------------
/rewrite/list:
get:
tags:
- rewrite
operationId: rewriteList
summary: 'Get list of Rewrite rules'
responses:
200:
description: OK
schema:
$ref: "#/definitions/RewriteList"
/rewrite/add:
post:
tags:
- rewrite
operationId: rewriteAdd
summary: 'Add a new Rewrite rule'
parameters:
- in: "body"
name: "body"
required: true
schema:
$ref: "#/definitions/RewriteEntry"
responses:
200:
description: OK
/rewrite/delete:
post:
tags:
- rewrite
operationId: rewriteDelete
summary: 'Remove a Rewrite rule'
parameters:
- in: "body"
name: "body"
required: true
schema:
$ref: "#/definitions/RewriteEntry"
responses:
200:
description: OK
# -------------------------------------------------- # --------------------------------------------------
# I18N methods # I18N methods
# -------------------------------------------------- # --------------------------------------------------
@ -1571,6 +1619,25 @@ definitions:
items: items:
$ref: "#/definitions/ClientAuto" $ref: "#/definitions/ClientAuto"
description: "Auto-Clients array" description: "Auto-Clients array"
RewriteList:
type: "array"
items:
$ref: "#/definitions/RewriteEntry"
description: "Rewrite rules array"
RewriteEntry:
type: "object"
description: "Rewrite rule"
properties:
domain:
type: "string"
description: "Domain name"
example: "example.org"
answer:
type: "string"
description: "value of A, AAAA or CNAME DNS record"
example: "127.0.0.1"
CheckConfigRequest: CheckConfigRequest:
type: "object" type: "object"
description: "Configuration to be checked" description: "Configuration to be checked"