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
|
{
"apiVersion": "0.0.1",
"swaggerVersion": "1.2",
"basePath": "{{Protocol}}://{{Host}}",
"resourcePath": "/hello",
"produces": [
"application/json"
],
"apis": [
{
"path": "/hello/world/{var1}/{var2}",
"operations": [
{
"method": "GET",
"summary": "Returns the number of seconds since the system was booted",
"type": "long",
"nickname": "hello_world",
"produces": [
"application/json"
],
"parameters": [
{
"name":"var2",
"description":"Full path of file or directory",
"required":true,
"allowMultiple":true,
"type":"string",
"paramType":"path"
},
{
"name":"var1",
"description":"Full path of file or directory",
"required":true,
"allowMultiple":false,
"type":"string",
"paramType":"path"
},
{
"name":"query_enum",
"description":"The operation to perform",
"required":true,
"allowMultiple":false,
"type":"string",
"paramType":"query",
"enum":["VAL1", "VAL2", "VAL3"]
}
]
}
]
}
],
"models" : {
"my_object": {
"id": "my_object",
"description": "Demonstrate an object",
"properties": {
"var1": {
"type": "string",
"description": "The first parameter in the path"
},
"var2": {
"type": "string",
"description": "The second parameter in the path"
},
"enum_var" : {
"type": "string",
"description": "Demonstrate an enum returned, note this is not the same enum type of the request",
"enum":["VAL1", "VAL2", "VAL3"]
}
}
}
}
}
|