-
Notifications
You must be signed in to change notification settings - Fork 0
/
contract.json
122 lines (122 loc) · 3.14 KB
/
contract.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
115
116
117
118
119
120
121
122
{
"swagger": "2.0",
"basePath": "/",
"paths": {
"/health": {
"get": {
"responses": {
"200": {
"description": "Success"
}
},
"operationId": "get_health",
"tags": [
""
]
}
},
"/search": {
"put": {
"responses": {
"200": {
"description": "Success",
"schema": {
"$ref": "#/definitions/Word"
}
}
},
"operationId": "put_search",
"parameters": [
{
"name": "payload",
"required": true,
"in": "body",
"schema": {
"$ref": "#/definitions/Search"
}
},
{
"name": "X-Fields",
"in": "header",
"type": "string",
"format": "mask",
"description": "An optional fields mask"
}
],
"tags": [
""
]
}
}
},
"info": {
"title": "Word search engine",
"version": "1.0",
"description": "The service will allow a user to search an specific word in an URL"
},
"produces": [
"application/json"
],
"consumes": [
"application/json"
],
"tags": [
{
"name": "",
"description": "Simple word search engine"
}
],
"definitions": {
"Search": {
"properties": {
"query": {
"$ref": "#/definitions/Query"
},
"source": {
"type": "string"
}
},
"type": "object"
},
"Query": {
"properties": {
"word": {
"type": "string"
},
"strict": {
"type": "boolean",
"default": true
}
},
"type": "object"
},
"Word": {
"properties": {
"__this": {
"type": "string"
},
"query": {
"$ref": "#/definitions/Query"
},
"source": {
"type": "string"
},
"found": {
"type": "boolean"
},
"count": {
"type": "integer"
}
},
"type": "object"
}
},
"responses": {
"ParseError": {
"description": "When a mask can't be parsed"
},
"MaskError": {
"description": "When any error occurs on mask"
}
}
}