-
Notifications
You must be signed in to change notification settings - Fork 4
/
api.swagger.json
114 lines (114 loc) · 2.58 KB
/
api.swagger.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
"swagger": "2.0",
"info": {
"title": "API Service",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/record": {
"post": {
"summary": "Echo method receives a simple message and returns it.\nThe message posted as the id parameter will also be returned.",
"operationId": "SaveRecord",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/apiRecord"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/apiRecord"
}
}
],
"tags": [
"DDNSService"
]
}
},
"/v1/record/{domain}/{type}": {
"delete": {
"operationId": "DeleteRecord",
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/apiRecord"
}
}
},
"parameters": [
{
"name": "domain",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "type",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"DDNSService"
]
}
}
},
"definitions": {
"apiRecord": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"ip": {
"type": "string",
"title": "Record IP address"
},
"domain": {
"type": "string",
"title": "Record Name"
},
"type": {
"type": "string",
"title": "Record Type see https://github.com/miekg/dns/blob/master/types.go#L27"
},
"expires": {
"type": "integer",
"format": "int32",
"title": "Expiration of the record, after which will be removed.\nDefault is 0 for not expiring"
},
"TTL": {
"type": "integer",
"format": "int32",
"title": "TTL time to live of the record"
},
"PTR": {
"type": "boolean",
"format": "boolean",
"title": "Add a PTR (reverse) record"
}
},
"description": "Message represents a simple message sent to the Echo service."
}
}
}