apib2swagger 1.10.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/codeql-analysis.yml +71 -0
- package/.github/workflows/docker-publish.yml +70 -0
- package/.github/workflows/nodejs.yml +26 -0
- package/.travis.yml +2 -3
- package/Dockerfile +5 -0
- package/LICENSE +0 -0
- package/README.md +31 -10
- package/bin/apib2swagger.js +44 -18
- package/index.js +82 -366
- package/package.json +6 -4
- package/src/escape_json_pointer.js +0 -0
- package/src/mson_to_json_schema.js +13 -8
- package/src/parameters.js +111 -0
- package/src/requests.js +344 -0
- package/src/responses.js +181 -0
- package/src/util.js +127 -0
- package/test/input/Attributes.md +0 -0
- package/test/input/Issue-#15.md +0 -0
- package/test/input/Issue-#22.md +0 -0
- package/test/input/Issue-#23.md +0 -0
- package/test/input/Issue-#26.md +0 -0
- package/test/input/Issue-#29.md +0 -0
- package/test/input/Issue-#33.md +0 -0
- package/test/input/Issue-#35.md +0 -0
- package/test/input/Issue-#36.md +0 -0
- package/test/input/Issue-#38.md +0 -0
- package/test/input/Issue-#49.md +24 -0
- package/test/input/OpenAPI3_attributes.md +36 -0
- package/test/input/OpenAPI3_headers.md +74 -0
- package/test/input/OpenAPI3_includes.md +22 -0
- package/test/input/OpenAPI3_requests.md +162 -0
- package/test/input/OpenAPI3_responses.md +177 -0
- package/test/input/Schema.md +0 -0
- package/test/input/apiblueprint_uber.md +0 -0
- package/test/input/apiblueprint_valid_simple.md +0 -0
- package/test/input/includes/resource-request-body-2.json +3 -0
- package/test/input/includes/resource-request-body.json +3 -0
- package/test/input/includes/resource-request-schema.json +9 -0
- package/test/input/includes/resource-response-body-2.json +3 -0
- package/test/input/includes/resource-response-body.json +3 -0
- package/test/input/includes/resource-response-schema.json +9 -0
- package/test/input/schema_without_body.md +17 -0
- package/test/meta_schema.json +0 -0
- package/test/openAPI_30_schema.json +1662 -0
- package/test/output/01. Simplest API.json +1 -0
- package/test/output/01. Simplest API.ref.json +1 -0
- package/test/output/02. Resource and Actions.json +2 -0
- package/test/output/02. Resource and Actions.ref.json +2 -0
- package/test/output/03. Named Resource and Actions.json +2 -0
- package/test/output/03. Named Resource and Actions.ref.json +2 -0
- package/test/output/04. Grouping Resources.json +2 -0
- package/test/output/04. Grouping Resources.ref.json +2 -0
- package/test/output/05. Responses.json +2 -0
- package/test/output/05. Responses.ref.json +2 -0
- package/test/output/06. Requests.json +2 -0
- package/test/output/06. Requests.ref.json +2 -0
- package/test/output/07. Parameters.json +3 -0
- package/test/output/07. Parameters.ref.json +3 -0
- package/test/output/08. Attributes.json +1 -0
- package/test/output/08. Attributes.ref.json +1 -0
- package/test/output/09. Advanced Attributes.json +3 -0
- package/test/output/09. Advanced Attributes.ref.json +3 -0
- package/test/output/10. Data Structures.json +3 -0
- package/test/output/10. Data Structures.ref.json +3 -0
- package/test/output/11. Resource Model.json +2 -0
- package/test/output/11. Resource Model.ref.json +2 -0
- package/test/output/12. Advanced Action.json +3 -0
- package/test/output/12. Advanced Action.ref.json +3 -0
- package/test/output/13. Named Endpoints.json +2 -0
- package/test/output/13. Named Endpoints.ref.json +2 -0
- package/test/output/Attributes.json +1 -0
- package/test/output/Attributes.ref.json +1 -0
- package/test/output/Gist Fox API + Auth.json +12 -0
- package/test/output/Gist Fox API + Auth.ref.json +12 -0
- package/test/output/Issue-#15.json +3 -0
- package/test/output/Issue-#15.ref.json +3 -0
- package/test/output/Issue-#22.json +0 -0
- package/test/output/Issue-#22.ref.json +0 -0
- package/test/output/Issue-#23.json +1 -0
- package/test/output/Issue-#23.ref.json +1 -0
- package/test/output/Issue-#26.json +2 -0
- package/test/output/Issue-#26.ref.json +2 -0
- package/test/output/Issue-#29.json +2 -0
- package/test/output/Issue-#29.ref.json +2 -0
- package/test/output/Issue-#33.json +9 -8
- package/test/output/Issue-#33.ref.json +9 -8
- package/test/output/Issue-#35.json +0 -0
- package/test/output/Issue-#35.ref.json +0 -0
- package/test/output/Issue-#36.json +1 -0
- package/test/output/Issue-#36.ref.json +1 -0
- package/test/output/Issue-#38.bearer.json +53 -52
- package/test/output/Issue-#38.json +1 -0
- package/test/output/Issue-#38.ref.json +1 -0
- package/test/output/Issue-#49.json +141 -0
- package/test/output/Issue-#49.ref.json +126 -0
- package/test/output/OpenAPI3_attributes.json +199 -0
- package/test/output/OpenAPI3_attributes.ref.json +173 -0
- package/test/output/OpenAPI3_headers.json +169 -0
- package/test/output/OpenAPI3_headers.ref.json +169 -0
- package/test/output/OpenAPI3_includes.json +66 -0
- package/test/output/OpenAPI3_includes.ref.json +66 -0
- package/test/output/OpenAPI3_requests.json +326 -0
- package/test/output/OpenAPI3_requests.ref.json +321 -0
- package/test/output/OpenAPI3_responses.json +255 -0
- package/test/output/OpenAPI3_responses.ref.json +245 -0
- package/test/output/Schema.json +3 -0
- package/test/output/Schema.ref.json +3 -0
- package/test/output/apiblueprint_uber.json +5 -0
- package/test/output/apiblueprint_uber.ref.json +5 -0
- package/test/output/apiblueprint_valid_simple.json +12 -0
- package/test/output/apiblueprint_valid_simple.ref.json +12 -0
- package/test/output/schema_without_body.json +52 -0
- package/test/output/schema_without_body.ref.json +52 -0
- package/test/swagger_20_schema.json +0 -0
- package/test/test.js +31 -15
- package/test/util.test.js +151 -0
- package/.npmignore +0 -35
- package/package-lock.json +0 -2320
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"summary": "Get Server Settings",
|
|
44
|
+
"operationId": "Get Server Settings",
|
|
44
45
|
"description": "",
|
|
45
46
|
"tags": [
|
|
46
47
|
"Settings"
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
"summary": "List all users",
|
|
86
|
+
"operationId": "List all users",
|
|
85
87
|
"description": "Get a list of all users. Optionally, you can specify a `prefix` to search for a specific user.\n\n+ prefix (string - The prefix of a user (username, first name, or last name)",
|
|
86
88
|
"tags": [
|
|
87
89
|
"Users"
|
|
@@ -186,6 +188,7 @@
|
|
|
186
188
|
}
|
|
187
189
|
},
|
|
188
190
|
"summary": "Get a specific user",
|
|
191
|
+
"operationId": "Get a specific user",
|
|
189
192
|
"description": "",
|
|
190
193
|
"tags": [
|
|
191
194
|
"Users"
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
43
|
"summary": "Get Server Settings",
|
|
44
|
+
"operationId": "Get Server Settings",
|
|
44
45
|
"description": "",
|
|
45
46
|
"tags": [
|
|
46
47
|
"Settings"
|
|
@@ -82,6 +83,7 @@
|
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
"summary": "List all users",
|
|
86
|
+
"operationId": "List all users",
|
|
85
87
|
"description": "Get a list of all users. Optionally, you can specify a `prefix` to search for a specific user.\n\n+ prefix (string - The prefix of a user (username, first name, or last name)",
|
|
86
88
|
"tags": [
|
|
87
89
|
"Users"
|
|
@@ -123,6 +125,7 @@
|
|
|
123
125
|
}
|
|
124
126
|
},
|
|
125
127
|
"summary": "Get a specific user",
|
|
128
|
+
"operationId": "Get a specific user",
|
|
126
129
|
"description": "",
|
|
127
130
|
"tags": [
|
|
128
131
|
"Users"
|
|
File without changes
|
|
File without changes
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"summary": "Get Store",
|
|
64
|
+
"operationId": "Get Store",
|
|
64
65
|
"description": "",
|
|
65
66
|
"tags": [
|
|
66
67
|
"Stores"
|
|
@@ -133,6 +134,7 @@
|
|
|
133
134
|
}
|
|
134
135
|
},
|
|
135
136
|
"summary": "Update Store",
|
|
137
|
+
"operationId": "Update Store",
|
|
136
138
|
"description": "Updates an existing store. This call does not currently support partial updates. The entire resource must be provided in the body of the request.",
|
|
137
139
|
"tags": [
|
|
138
140
|
"Stores"
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
"summary": "Get Store",
|
|
64
|
+
"operationId": "Get Store",
|
|
64
65
|
"description": "",
|
|
65
66
|
"tags": [
|
|
66
67
|
"Stores"
|
|
@@ -133,6 +134,7 @@
|
|
|
133
134
|
}
|
|
134
135
|
},
|
|
135
136
|
"summary": "Update Store",
|
|
137
|
+
"operationId": "Update Store",
|
|
136
138
|
"description": "Updates an existing store. This call does not currently support partial updates. The entire resource must be provided in the body of the request.",
|
|
137
139
|
"tags": [
|
|
138
140
|
"Stores"
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"summary": "Retrieve A Post",
|
|
80
|
+
"operationId": "Retrieve A Post",
|
|
80
81
|
"description": "",
|
|
81
82
|
"tags": [],
|
|
82
83
|
"parameters": [
|
|
@@ -104,6 +105,7 @@
|
|
|
104
105
|
}
|
|
105
106
|
},
|
|
106
107
|
"summary": "Create Post",
|
|
108
|
+
"operationId": "Create Post",
|
|
107
109
|
"description": "",
|
|
108
110
|
"tags": [],
|
|
109
111
|
"parameters": [
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
},
|
|
41
41
|
"summary": "Retrieve A Post",
|
|
42
|
+
"operationId": "Retrieve A Post",
|
|
42
43
|
"description": "",
|
|
43
44
|
"tags": [],
|
|
44
45
|
"parameters": [
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
}
|
|
67
68
|
},
|
|
68
69
|
"summary": "Create Post",
|
|
70
|
+
"operationId": "Create Post",
|
|
69
71
|
"description": "",
|
|
70
72
|
"tags": [],
|
|
71
73
|
"parameters": [
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
}
|
|
98
98
|
},
|
|
99
99
|
"summary": "Get Plans of People",
|
|
100
|
+
"operationId": "Get Plans of People",
|
|
100
101
|
"description": "* Paginated ✖\n\n* Sortable ✖\n\n* Signable ✖\n\n#### Error Codes\n\nPossible error codes for this resource.\n\n| HTTP Status Code | Error Code | Purpose |\n| ----------------- | ----------------- | --------- |\n| 400 | VALIDATION\\_ERROR | Validation error. |\n| 400 | FIELD\\_MISSING | A required field is missing. |",
|
|
101
102
|
"tags": [
|
|
102
103
|
"People"
|
|
@@ -119,20 +120,20 @@
|
|
|
119
120
|
"type": "string"
|
|
120
121
|
},
|
|
121
122
|
{
|
|
122
|
-
"description": "e.g. <here comes some key>",
|
|
123
|
-
"in": "header",
|
|
124
123
|
"name": "some-key",
|
|
124
|
+
"in": "header",
|
|
125
|
+
"description": "e.g. <here comes some key>",
|
|
125
126
|
"required": false,
|
|
126
|
-
"
|
|
127
|
-
"
|
|
127
|
+
"x-example": "<here comes some key>",
|
|
128
|
+
"type": "string"
|
|
128
129
|
},
|
|
129
130
|
{
|
|
130
|
-
"description": "e.g. <here comes some token>",
|
|
131
|
-
"in": "header",
|
|
132
131
|
"name": "auth",
|
|
132
|
+
"in": "header",
|
|
133
|
+
"description": "e.g. <here comes some token>",
|
|
133
134
|
"required": false,
|
|
134
|
-
"
|
|
135
|
-
"
|
|
135
|
+
"x-example": "<here comes some token>",
|
|
136
|
+
"type": "string"
|
|
136
137
|
}
|
|
137
138
|
],
|
|
138
139
|
"produces": [
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"summary": "Get Plans of People",
|
|
90
|
+
"operationId": "Get Plans of People",
|
|
90
91
|
"description": "* Paginated ✖\n\n* Sortable ✖\n\n* Signable ✖\n\n#### Error Codes\n\nPossible error codes for this resource.\n\n| HTTP Status Code | Error Code | Purpose |\n| ----------------- | ----------------- | --------- |\n| 400 | VALIDATION\\_ERROR | Validation error. |\n| 400 | FIELD\\_MISSING | A required field is missing. |",
|
|
91
92
|
"tags": [
|
|
92
93
|
"People"
|
|
@@ -109,20 +110,20 @@
|
|
|
109
110
|
"type": "string"
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
|
-
"description": "e.g. <here comes some key>",
|
|
113
|
-
"in": "header",
|
|
114
113
|
"name": "some-key",
|
|
114
|
+
"in": "header",
|
|
115
|
+
"description": "e.g. <here comes some key>",
|
|
115
116
|
"required": false,
|
|
116
|
-
"
|
|
117
|
-
"
|
|
117
|
+
"x-example": "<here comes some key>",
|
|
118
|
+
"type": "string"
|
|
118
119
|
},
|
|
119
120
|
{
|
|
120
|
-
"description": "e.g. <here comes some token>",
|
|
121
|
-
"in": "header",
|
|
122
121
|
"name": "auth",
|
|
122
|
+
"in": "header",
|
|
123
|
+
"description": "e.g. <here comes some token>",
|
|
123
124
|
"required": false,
|
|
124
|
-
"
|
|
125
|
-
"
|
|
125
|
+
"x-example": "<here comes some token>",
|
|
126
|
+
"type": "string"
|
|
126
127
|
}
|
|
127
128
|
],
|
|
128
129
|
"produces": [
|
|
File without changes
|
|
File without changes
|
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "",
|
|
5
|
+
"version": "",
|
|
6
|
+
"description": ""
|
|
7
|
+
},
|
|
8
|
+
"paths": {
|
|
9
|
+
"/whatever": {
|
|
10
|
+
"get": {
|
|
11
|
+
"responses": {
|
|
12
|
+
"200": {
|
|
13
|
+
"description": "OK",
|
|
14
|
+
"headers": {},
|
|
15
|
+
"examples": {}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"summary": "Whatever",
|
|
19
|
+
"operationId": "Whatever",
|
|
20
|
+
"description": "",
|
|
21
|
+
"tags": [],
|
|
22
|
+
"parameters": [
|
|
23
|
+
{
|
|
24
|
+
"name": "limit",
|
|
25
|
+
"in": "query",
|
|
26
|
+
"description": "The maximum number of results to return.",
|
|
27
|
+
"required": false,
|
|
28
|
+
"type": "number",
|
|
29
|
+
"default": 10
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"security": [
|
|
33
|
+
{
|
|
34
|
+
"basic": []
|
|
17
35
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
"name": "limit",
|
|
24
|
-
"in": "query",
|
|
25
|
-
"description": "The maximum number of results to return.",
|
|
26
|
-
"required": false,
|
|
27
|
-
"type": "number",
|
|
28
|
-
"default": 10
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"security": [
|
|
32
|
-
{
|
|
33
|
-
"basic": []
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"bearer": []
|
|
37
|
-
}
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"definitions": {
|
|
43
|
-
"Whatever": {}
|
|
44
|
-
},
|
|
45
|
-
"securityDefinitions": {
|
|
46
|
-
"basic": {
|
|
47
|
-
"type": "basic"
|
|
48
|
-
},
|
|
49
|
-
"bearer": {
|
|
50
|
-
"in": "header",
|
|
51
|
-
"name": "Authorization",
|
|
52
|
-
"type": "apiKey"
|
|
36
|
+
{
|
|
37
|
+
"bearer": []
|
|
38
|
+
}
|
|
39
|
+
]
|
|
53
40
|
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"definitions": {
|
|
44
|
+
"Whatever": {}
|
|
45
|
+
},
|
|
46
|
+
"securityDefinitions": {
|
|
47
|
+
"basic": {
|
|
48
|
+
"type": "basic"
|
|
54
49
|
},
|
|
55
|
-
"
|
|
56
|
-
|
|
50
|
+
"bearer": {
|
|
51
|
+
"type": "apiKey",
|
|
52
|
+
"in": "header",
|
|
53
|
+
"name": "Authorization"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"tags": []
|
|
57
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "",
|
|
5
|
+
"version": "",
|
|
6
|
+
"description": ""
|
|
7
|
+
},
|
|
8
|
+
"paths": {
|
|
9
|
+
"/user": {
|
|
10
|
+
"get": {
|
|
11
|
+
"responses": {
|
|
12
|
+
"200": {
|
|
13
|
+
"description": "OK",
|
|
14
|
+
"headers": {},
|
|
15
|
+
"examples": {
|
|
16
|
+
"application/json": {
|
|
17
|
+
"id": "",
|
|
18
|
+
"name": null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"schema": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"id": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"name": {
|
|
28
|
+
"type": [
|
|
29
|
+
"string",
|
|
30
|
+
"null"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"required": [
|
|
35
|
+
"id",
|
|
36
|
+
"name"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"500": {
|
|
41
|
+
"description": "Internal Server Error",
|
|
42
|
+
"headers": {},
|
|
43
|
+
"examples": {}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"summary": "Get one user",
|
|
47
|
+
"operationId": "Get one user",
|
|
48
|
+
"description": "",
|
|
49
|
+
"tags": [
|
|
50
|
+
"Users"
|
|
51
|
+
],
|
|
52
|
+
"parameters": [],
|
|
53
|
+
"produces": [
|
|
54
|
+
"application/json"
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"/users": {
|
|
59
|
+
"get": {
|
|
60
|
+
"responses": {
|
|
61
|
+
"200": {
|
|
62
|
+
"description": "OK",
|
|
63
|
+
"headers": {},
|
|
64
|
+
"examples": {
|
|
65
|
+
"application/json": [
|
|
66
|
+
{
|
|
67
|
+
"id": "",
|
|
68
|
+
"name": null
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"schema": {
|
|
73
|
+
"type": "array",
|
|
74
|
+
"items": {}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"500": {
|
|
78
|
+
"description": "Internal Server Error",
|
|
79
|
+
"headers": {},
|
|
80
|
+
"examples": {}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"summary": "Get a collection of users",
|
|
84
|
+
"operationId": "Get a collection of users",
|
|
85
|
+
"description": "",
|
|
86
|
+
"tags": [
|
|
87
|
+
"Users"
|
|
88
|
+
],
|
|
89
|
+
"parameters": [],
|
|
90
|
+
"produces": [
|
|
91
|
+
"application/json"
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"definitions": {
|
|
97
|
+
"A user": {},
|
|
98
|
+
"Some users": {},
|
|
99
|
+
"User": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"required": [
|
|
102
|
+
"id",
|
|
103
|
+
"name"
|
|
104
|
+
],
|
|
105
|
+
"properties": {
|
|
106
|
+
"id": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"name": {
|
|
110
|
+
"type": [
|
|
111
|
+
"string",
|
|
112
|
+
"null"
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"Users": {
|
|
118
|
+
"type": "object",
|
|
119
|
+
"required": [
|
|
120
|
+
"users"
|
|
121
|
+
],
|
|
122
|
+
"properties": {
|
|
123
|
+
"users": {
|
|
124
|
+
"type": [
|
|
125
|
+
"array",
|
|
126
|
+
"null"
|
|
127
|
+
],
|
|
128
|
+
"items": {
|
|
129
|
+
"$ref": "#/definitions/User"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"securityDefinitions": {},
|
|
136
|
+
"tags": [
|
|
137
|
+
{
|
|
138
|
+
"name": "Users"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
{
|
|
2
|
+
"swagger": "2.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "",
|
|
5
|
+
"version": "",
|
|
6
|
+
"description": ""
|
|
7
|
+
},
|
|
8
|
+
"paths": {
|
|
9
|
+
"/user": {
|
|
10
|
+
"get": {
|
|
11
|
+
"responses": {
|
|
12
|
+
"200": {
|
|
13
|
+
"description": "OK",
|
|
14
|
+
"headers": {},
|
|
15
|
+
"examples": {
|
|
16
|
+
"application/json": {
|
|
17
|
+
"id": "",
|
|
18
|
+
"name": null
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"schema": {
|
|
22
|
+
"$ref": "#/definitions/User"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"500": {
|
|
26
|
+
"description": "Internal Server Error",
|
|
27
|
+
"headers": {},
|
|
28
|
+
"examples": {}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"summary": "Get one user",
|
|
32
|
+
"operationId": "Get one user",
|
|
33
|
+
"description": "",
|
|
34
|
+
"tags": [
|
|
35
|
+
"Users"
|
|
36
|
+
],
|
|
37
|
+
"parameters": [],
|
|
38
|
+
"produces": [
|
|
39
|
+
"application/json"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"/users": {
|
|
44
|
+
"get": {
|
|
45
|
+
"responses": {
|
|
46
|
+
"200": {
|
|
47
|
+
"description": "OK",
|
|
48
|
+
"headers": {},
|
|
49
|
+
"examples": {
|
|
50
|
+
"application/json": [
|
|
51
|
+
{
|
|
52
|
+
"id": "",
|
|
53
|
+
"name": null
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"schema": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"500": {
|
|
63
|
+
"description": "Internal Server Error",
|
|
64
|
+
"headers": {},
|
|
65
|
+
"examples": {}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"summary": "Get a collection of users",
|
|
69
|
+
"operationId": "Get a collection of users",
|
|
70
|
+
"description": "",
|
|
71
|
+
"tags": [
|
|
72
|
+
"Users"
|
|
73
|
+
],
|
|
74
|
+
"parameters": [],
|
|
75
|
+
"produces": [
|
|
76
|
+
"application/json"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"definitions": {
|
|
82
|
+
"A user": {},
|
|
83
|
+
"Some users": {},
|
|
84
|
+
"User": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": [
|
|
87
|
+
"id",
|
|
88
|
+
"name"
|
|
89
|
+
],
|
|
90
|
+
"properties": {
|
|
91
|
+
"id": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"name": {
|
|
95
|
+
"type": [
|
|
96
|
+
"string",
|
|
97
|
+
"null"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"Users": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"required": [
|
|
105
|
+
"users"
|
|
106
|
+
],
|
|
107
|
+
"properties": {
|
|
108
|
+
"users": {
|
|
109
|
+
"type": [
|
|
110
|
+
"array",
|
|
111
|
+
"null"
|
|
112
|
+
],
|
|
113
|
+
"items": {
|
|
114
|
+
"$ref": "#/definitions/User"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"securityDefinitions": {},
|
|
121
|
+
"tags": [
|
|
122
|
+
{
|
|
123
|
+
"name": "Users"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|