added /dyndns endpoint

Signed-off-by: tracer <tracer@24unix.net>
This commit is contained in:
tracer 2022-03-01 16:44:32 +01:00
parent a92c445725
commit 412e35cb02
1 changed files with 72 additions and 2 deletions

View File

@ -2,10 +2,10 @@
"openapi": "3.0.2", "openapi": "3.0.2",
"info": { "info": {
"title": "bindAPI", "title": "bindAPI",
"version": "0.0.1", "version": "0.0.2",
"description": "TODO …", "description": "TODO …",
"contact": { "contact": {
"name": "micha Espey", "name": "Micha Espey",
"email": "tracer@24unix.net" "email": "tracer@24unix.net"
} }
}, },
@ -31,6 +31,9 @@
{ {
"name": "Server" "name": "Server"
}, },
{
"name": "DNS"
},
{ {
"name": "Domains" "name": "Domains"
} }
@ -66,6 +69,45 @@
] ]
} }
}, },
"/dyndns/{hostname}": {
"get": {
"tags": [
"DNS"
],
"summary": "Updated a DynDNS host.",
"description": "Updates a predefined custom DNS entry.",
"operationId": "updateDynDNS",
"parameters": [
{
"name": "hostname",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"$ref": "#/components/requestBodies/dyndns-put"
},
"responses": {
"200": {
"description": "OK"
},
"401": {
"description": "API key is missing or invalid."
},
"404": {
"description": "Domain not found."
}
},
"security": [
{
"Authorization": []
}
]
}
},
"/domains": { "/domains": {
"get": { "get": {
"tags": [ "tags": [
@ -250,6 +292,20 @@
} }
}, },
"requestBodies": { "requestBodies": {
"dyndns-put": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/dyndns"
},
"example": {
"a": "1.2.3.4",
"aaaa": "1bad::babe"
}
}
}
},
"domain-post": { "domain-post": {
"required": true, "required": true,
"content": { "content": {
@ -394,6 +450,20 @@
} }
} }
}, },
"dyndns": {
"type": "object",
"properties": {
"a": {
"type": "string",
"example": "1.2.3.4"
},
"aaaa": {
"type": "string",
"example": "1bad::babe"
}
}
},
"domain": { "domain": {
"description": "Representation of a domain.\n", "description": "Representation of a domain.\n",
"type": "object", "type": "object",