This repository was archived by the owner on Jun 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathnon-string-enum.json
More file actions
127 lines (127 loc) · 3.09 KB
/
Copy pathnon-string-enum.json
File metadata and controls
127 lines (127 loc) · 3.09 KB
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
123
124
125
126
127
{
"swagger": "2.0",
"info": {
"version": "2.0-preview",
"title": "Non String Enums Client",
"description": "Testing non-string enums."
},
"host": "localhost:3000",
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/nonStringEnums/int/put": {
"put": {
"description": "Put an int enum",
"operationId": "Int_put",
"x-ms-examples": {
"Int_put": {
"$ref": "./examples/Int_put.json"
}
},
"parameters": [
{
"name": "input",
"description": "Input int enum.",
"x-ms-parameter-location": "method",
"in": "body",
"schema": {
"$ref": "#/definitions/IntEnum"
}
}
],
"responses": {
"200": {
"description": "Received correct format",
"schema": {
"type": "string"
}
}
}
}
},
"/nonStringEnums/int/get": {
"get": {
"description": "Get an int enum",
"operationId": "Int_get",
"x-ms-examples": {
"Int_get": {
"$ref": "./examples/Int_get.json"
}
},
"responses": {
"200": {
"description": "Returns int enum",
"schema": {
"$ref": "#/definitions/IntEnum"
}
}
}
}
},
"/nonStringEnums/float/put": {
"put": {
"description": "Put a float enum",
"operationId": "Float_put",
"x-ms-examples": {
"Float_put": {
"$ref": "./examples/Float_put.json"
}
},
"parameters": [
{
"name": "input",
"description": "Input float enum.",
"x-ms-parameter-location": "method",
"in": "body",
"schema": {
"$ref": "#/definitions/FloatEnum"
}
}
],
"responses": {
"200": {
"description": "Received correct format",
"schema": {
"type": "string"
}
}
}
}
},
"/nonStringEnums/float/get": {
"get": {
"description": "Get a float enum",
"operationId": "Float_Get",
"x-ms-examples": {
"Float_Get": {
"$ref": "./examples/Float_Get.json"
}
},
"responses": {
"200": {
"description": "Returns float enum",
"schema": {
"$ref": "#/definitions/FloatEnum"
}
}
}
}
}
},
"definitions": {
"IntEnum": {
"x-ms-enum": { "name": "IntEnum", "modelAsString": true },
"description": "List of integer enums",
"type": "integer",
"enum": [200, 403, 405, 406, 429]
},
"FloatEnum": {
"x-ms-enum": { "name": "FloatEnum", "modelAsString": true },
"description": "List of float enums",
"type": "number",
"format": "float",
"enum": [200.4, 403.4, 405.3, 406.2, 429.1]
}
}
}