mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-29 02:18:51 +03:00
+ openapi: add /rewrite/* methods
This commit is contained in:
parent
1bb6638db7
commit
70b8cf6ec8
1 changed files with 67 additions and 0 deletions
|
@ -786,6 +786,54 @@ paths:
|
|||
200:
|
||||
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
|
||||
# --------------------------------------------------
|
||||
|
@ -1571,6 +1619,25 @@ definitions:
|
|||
items:
|
||||
$ref: "#/definitions/ClientAuto"
|
||||
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:
|
||||
type: "object"
|
||||
description: "Configuration to be checked"
|
||||
|
|
Loading…
Reference in a new issue