-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
121 lines (121 loc) · 2.68 KB
/
swagger.yaml
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
115
116
117
118
119
120
121
basePath: /v1
definitions:
handler.ValidateIPRequest:
properties:
ip:
type: string
type: object
handler.ValidateIPResponse:
properties:
status:
type: boolean
type: object
model.Address:
properties:
ip:
type: string
type: object
model.Query:
properties:
addresses:
items:
$ref: '#/definitions/model.Address'
type: array
client_ip:
type: string
created_at:
type: integer
domain:
type: string
type: object
utils.HTTPError:
properties:
message:
type: string
type: object
info:
contact: {}
description: Implementation for the interview challenge
title: Interview challenge
version: "1.0"
paths:
/history:
get:
consumes:
- application/json
description: List queries
operationId: queries_history
produces:
- application/json
responses:
"200":
description: OK
schema:
items:
$ref: '#/definitions/model.Query'
type: array
"400":
description: Bad Request
schema:
$ref: '#/definitions/utils.HTTPError'
summary: List queries
tags:
- history
/tools/lookup:
get:
consumes:
- application/json
description: Lookup domain and return all IPv4 addresses
operationId: lookup_domain
parameters:
- description: Domain name
in: query
name: domain
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/model.Query'
"400":
description: Bad Request
schema:
$ref: '#/definitions/utils.HTTPError'
"404":
description: Not Found
schema:
$ref: '#/definitions/utils.HTTPError'
summary: Lookup domain
tags:
- tools
/tools/validate:
post:
consumes:
- application/json
description: Simple IP valication
operationId: validate_ip
parameters:
- description: IP to validate
in: body
name: request
required: true
schema:
$ref: '#/definitions/handler.ValidateIPRequest'
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/handler.ValidateIPResponse'
"400":
description: Bad Request
schema:
$ref: '#/definitions/utils.HTTPError'
summary: Simple IP validation
tags:
- tools
swagger: "2.0"