@aloma.io/integration-sdk 3.8.70 → 3.8.71
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/README.md +15 -2
- package/build/internal/connector/server/on-connect/make-oauth.mjs +27 -6
- package/build/internal/fetcher/fetcher.d.mts +14 -1
- package/build/internal/fetcher/fetcher.mjs +52 -11
- package/build/internal/fetcher/oauth-fetcher.d.mts +15 -2
- package/build/internal/fetcher/oauth-fetcher.mjs +72 -27
- package/build/internal/util/index.d.mts +8 -0
- package/build/internal/util/index.mjs +13 -1
- package/build/internal/util/jwe/index.mjs +3 -1
- package/package.json +8 -3
- package/.prettierrc.cjs +0 -8
- package/FINDINGS-PLAT-47.md +0 -253
- package/MULTI_RESOURCE_GUIDE.md +0 -220
- package/OPENAPI_TO_CONNECTOR.md +0 -349
- package/examples/hello-world/package.json +0 -25
- package/examples/hello-world/src/controller/index.mts +0 -12
- package/examples/hello-world/src/index.mts +0 -6
- package/examples/hello-world/tsconfig.json +0 -27
- package/examples/sample-api.json +0 -325
- package/examples/sample-api.yaml +0 -222
- package/examples/simple-api.json +0 -39
- package/index.js +0 -4
- package/src/builder/index.mts +0 -274
- package/src/builder/runtime-context.mts +0 -129
- package/src/cli.mts +0 -533
- package/src/controller/index.mts +0 -278
- package/src/index.mts +0 -2
- package/src/internal/connector/config.mts +0 -59
- package/src/internal/connector/index.mts +0 -53
- package/src/internal/connector/metrics.mts +0 -34
- package/src/internal/connector/server/index.mts +0 -51
- package/src/internal/connector/server/on-connect/decrypt-config.mts +0 -27
- package/src/internal/connector/server/on-connect/finish-oauth.mts +0 -109
- package/src/internal/connector/server/on-connect/index.mts +0 -162
- package/src/internal/connector/server/on-connect/make-oauth.mts +0 -97
- package/src/internal/connector/server/on-connect/start-oauth.mts +0 -24
- package/src/internal/connector/server/on-message.mts +0 -13
- package/src/internal/dispatcher/index.mts +0 -231
- package/src/internal/fetcher/fetcher.mts +0 -215
- package/src/internal/fetcher/oauth-fetcher.mts +0 -153
- package/src/internal/index.mts +0 -3
- package/src/internal/util/index.mts +0 -52
- package/src/internal/util/jwe/cli.mts +0 -12
- package/src/internal/util/jwe/index.mts +0 -72
- package/src/internal/websocket/config.mjs +0 -109
- package/src/internal/websocket/connection/constants.mjs +0 -25
- package/src/internal/websocket/connection/index.mjs +0 -71
- package/src/internal/websocket/connection/registration.mjs +0 -42
- package/src/internal/websocket/index.mjs +0 -46
- package/src/internal/websocket/transport/durable.mjs +0 -71
- package/src/internal/websocket/transport/index.mjs +0 -194
- package/src/internal/websocket/transport/packet.mjs +0 -54
- package/src/internal/websocket/transport/processor.mjs +0 -66
- package/src/openapi-to-connector.mts +0 -1648
- package/src/testing/fake-aloma.mts +0 -306
- package/src/testing/harness.mts +0 -172
- package/src/testing/index.mts +0 -15
- package/src/testing/keys.mts +0 -19
- package/src/testing/network-guard.mts +0 -57
- package/src/testing/runtime-connector.mts +0 -50
- package/src/testing/vendor-mock.mts +0 -166
- package/src/transform/index.mts +0 -544
- package/test/MUTATION-entry.md +0 -21
- package/test/MUTATION.md +0 -43
- package/test/dispatcher-ctx-forwarding.test.mjs +0 -161
- package/test/fetcher-query-params.test.mjs +0 -294
- package/test/fixtures/transform/basic/expected.json +0 -9
- package/test/fixtures/transform/basic/src/controller/abstract.mts +0 -5
- package/test/fixtures/transform/basic/src/controller/index.mts +0 -30
- package/test/fixtures/transform/basic/tsconfig.json +0 -1
- package/test/fixtures/transform/interface-param/src/controller/abstract.mts +0 -5
- package/test/fixtures/transform/interface-param/src/controller/index.mts +0 -12
- package/test/fixtures/transform/interface-param/tsconfig.json +0 -1
- package/test/fixtures/transform/overloads/expected.json +0 -6
- package/test/fixtures/transform/overloads/src/controller/abstract.mts +0 -5
- package/test/fixtures/transform/overloads/src/controller/index.mts +0 -11
- package/test/fixtures/transform/overloads/tsconfig.json +0 -1
- package/test/fixtures/transform/tdd-stub/expected.json +0 -8
- package/test/fixtures/transform/tdd-stub/src/controller/abstract.mts +0 -6
- package/test/fixtures/transform/tdd-stub/src/controller/index.mts +0 -204
- package/test/fixtures/transform/tdd-stub/tsconfig.json +0 -1
- package/test/fixtures/transform/two-exports/src/controller/abstract.mts +0 -5
- package/test/fixtures/transform/two-exports/src/controller/index.mts +0 -9
- package/test/fixtures/transform/two-exports/tsconfig.json +0 -1
- package/test/fixtures/transform/type-error/src/controller/abstract.mts +0 -5
- package/test/fixtures/transform/type-error/src/controller/index.mts +0 -7
- package/test/fixtures/transform/type-error/tsconfig.json +0 -1
- package/test/fixtures/transform/typed/expected.json +0 -8
- package/test/fixtures/transform/typed/src/controller/abstract.mts +0 -5
- package/test/fixtures/transform/typed/src/controller/index.mts +0 -13
- package/test/fixtures/transform/typed/tsconfig.json +0 -1
- package/test/fixtures/transform/visibility/expected.json +0 -9
- package/test/fixtures/transform/visibility/src/controller/abstract.mts +0 -5
- package/test/fixtures/transform/visibility/src/controller/index.mts +0 -19
- package/test/fixtures/transform/visibility/tsconfig.json +0 -1
- package/test/harness-connector-smoke.test.mjs +0 -72
- package/test/harness.test.mjs +0 -375
- package/test/nested-resolver.test.mjs +0 -184
- package/test/openapi-generator-bugs.test.mjs +0 -248
- package/test/openapi-identifier-sanitise.test.mjs +0 -69
- package/test/openapi-nested-paths.test.mjs +0 -100
- package/test/openapi-to-connector.test.mts +0 -232
- package/test/openapi-ts-compilation.test.mjs +0 -178
- package/test/scenarios/README.md +0 -148
- package/test/scenarios/complex/expected/controller.mts +0 -271
- package/test/scenarios/complex/expected/orders-resource.mts +0 -262
- package/test/scenarios/complex/expected/products-resource.mts +0 -237
- package/test/scenarios/complex/specs/orders.json +0 -362
- package/test/scenarios/complex/specs/products.json +0 -308
- package/test/scenarios/simple/expected-controller.mts +0 -60
- package/test/scenarios/simple/simple-api.json +0 -39
- package/test/scenarios.test.mts +0 -294
- package/test/transform.test.mjs +0 -68
- package/test/verify-scenarios.mjs +0 -298
- package/tools/mutation-run-entry.mjs +0 -52
- package/tools/mutation-run.mjs +0 -138
- package/tools/run-tests.mjs +0 -64
- package/tsconfig.json +0 -27
package/examples/sample-api.json
DELETED
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.0",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Sample API",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"description": "A sample API for testing the OpenAPI to connector generator"
|
|
7
|
-
},
|
|
8
|
-
"servers": [
|
|
9
|
-
{
|
|
10
|
-
"url": "https://api.example.com/v1",
|
|
11
|
-
"description": "Production server"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"url": "https://staging-api.example.com/v1",
|
|
15
|
-
"description": "Staging server"
|
|
16
|
-
}
|
|
17
|
-
],
|
|
18
|
-
"paths": {
|
|
19
|
-
"/users": {
|
|
20
|
-
"get": {
|
|
21
|
-
"operationId": "listUsers",
|
|
22
|
-
"summary": "List all users",
|
|
23
|
-
"description": "Retrieve a paginated list of all users in the system",
|
|
24
|
-
"parameters": [
|
|
25
|
-
{
|
|
26
|
-
"name": "page",
|
|
27
|
-
"in": "query",
|
|
28
|
-
"description": "Page number for pagination",
|
|
29
|
-
"required": false,
|
|
30
|
-
"schema": {
|
|
31
|
-
"type": "integer",
|
|
32
|
-
"minimum": 1,
|
|
33
|
-
"default": 1
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"name": "limit",
|
|
38
|
-
"in": "query",
|
|
39
|
-
"description": "Number of users per page",
|
|
40
|
-
"required": false,
|
|
41
|
-
"schema": {
|
|
42
|
-
"type": "integer",
|
|
43
|
-
"minimum": 1,
|
|
44
|
-
"maximum": 100,
|
|
45
|
-
"default": 20
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"responses": {
|
|
50
|
-
"200": {
|
|
51
|
-
"description": "Successful response",
|
|
52
|
-
"content": {
|
|
53
|
-
"application/json": {
|
|
54
|
-
"schema": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"properties": {
|
|
57
|
-
"users": {
|
|
58
|
-
"type": "array",
|
|
59
|
-
"items": {
|
|
60
|
-
"$ref": "#/components/schemas/User"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
"pagination": {
|
|
64
|
-
"$ref": "#/components/schemas/Pagination"
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"post": {
|
|
74
|
-
"operationId": "createUser",
|
|
75
|
-
"summary": "Create a new user",
|
|
76
|
-
"description": "Create a new user account in the system",
|
|
77
|
-
"requestBody": {
|
|
78
|
-
"required": true,
|
|
79
|
-
"content": {
|
|
80
|
-
"application/json": {
|
|
81
|
-
"schema": {
|
|
82
|
-
"$ref": "#/components/schemas/CreateUserRequest"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
"responses": {
|
|
88
|
-
"201": {
|
|
89
|
-
"description": "User created successfully",
|
|
90
|
-
"content": {
|
|
91
|
-
"application/json": {
|
|
92
|
-
"schema": {
|
|
93
|
-
"$ref": "#/components/schemas/User"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
"400": {
|
|
99
|
-
"description": "Bad request - invalid input data"
|
|
100
|
-
},
|
|
101
|
-
"409": {
|
|
102
|
-
"description": "Conflict - user already exists"
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"/users/{id}": {
|
|
108
|
-
"get": {
|
|
109
|
-
"operationId": "getUserById",
|
|
110
|
-
"summary": "Get user by ID",
|
|
111
|
-
"description": "Retrieve a specific user by their unique identifier",
|
|
112
|
-
"parameters": [
|
|
113
|
-
{
|
|
114
|
-
"name": "id",
|
|
115
|
-
"in": "path",
|
|
116
|
-
"required": true,
|
|
117
|
-
"description": "Unique identifier of the user",
|
|
118
|
-
"schema": {
|
|
119
|
-
"type": "string",
|
|
120
|
-
"format": "uuid"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
"responses": {
|
|
125
|
-
"200": {
|
|
126
|
-
"description": "User found",
|
|
127
|
-
"content": {
|
|
128
|
-
"application/json": {
|
|
129
|
-
"schema": {
|
|
130
|
-
"$ref": "#/components/schemas/User"
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
"404": {
|
|
136
|
-
"description": "User not found"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"put": {
|
|
141
|
-
"operationId": "updateUser",
|
|
142
|
-
"summary": "Update user",
|
|
143
|
-
"description": "Update an existing user's information",
|
|
144
|
-
"parameters": [
|
|
145
|
-
{
|
|
146
|
-
"name": "id",
|
|
147
|
-
"in": "path",
|
|
148
|
-
"required": true,
|
|
149
|
-
"description": "Unique identifier of the user",
|
|
150
|
-
"schema": {
|
|
151
|
-
"type": "string",
|
|
152
|
-
"format": "uuid"
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
],
|
|
156
|
-
"requestBody": {
|
|
157
|
-
"required": true,
|
|
158
|
-
"content": {
|
|
159
|
-
"application/json": {
|
|
160
|
-
"schema": {
|
|
161
|
-
"$ref": "#/components/schemas/UpdateUserRequest"
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"responses": {
|
|
167
|
-
"200": {
|
|
168
|
-
"description": "User updated successfully",
|
|
169
|
-
"content": {
|
|
170
|
-
"application/json": {
|
|
171
|
-
"schema": {
|
|
172
|
-
"$ref": "#/components/schemas/User"
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
"404": {
|
|
178
|
-
"description": "User not found"
|
|
179
|
-
},
|
|
180
|
-
"400": {
|
|
181
|
-
"description": "Bad request - invalid input data"
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
"delete": {
|
|
186
|
-
"operationId": "deleteUser",
|
|
187
|
-
"summary": "Delete user",
|
|
188
|
-
"description": "Permanently delete a user from the system",
|
|
189
|
-
"parameters": [
|
|
190
|
-
{
|
|
191
|
-
"name": "id",
|
|
192
|
-
"in": "path",
|
|
193
|
-
"required": true,
|
|
194
|
-
"description": "Unique identifier of the user",
|
|
195
|
-
"schema": {
|
|
196
|
-
"type": "string",
|
|
197
|
-
"format": "uuid"
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
"responses": {
|
|
202
|
-
"204": {
|
|
203
|
-
"description": "User deleted successfully"
|
|
204
|
-
},
|
|
205
|
-
"404": {
|
|
206
|
-
"description": "User not found"
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
|
-
"/health": {
|
|
212
|
-
"get": {
|
|
213
|
-
"operationId": "healthCheck",
|
|
214
|
-
"summary": "Health check",
|
|
215
|
-
"description": "Check the health status of the API",
|
|
216
|
-
"responses": {
|
|
217
|
-
"200": {
|
|
218
|
-
"description": "API is healthy",
|
|
219
|
-
"content": {
|
|
220
|
-
"application/json": {
|
|
221
|
-
"schema": {
|
|
222
|
-
"type": "object",
|
|
223
|
-
"properties": {
|
|
224
|
-
"status": {
|
|
225
|
-
"type": "string",
|
|
226
|
-
"enum": ["healthy", "unhealthy"]
|
|
227
|
-
},
|
|
228
|
-
"timestamp": {
|
|
229
|
-
"type": "string",
|
|
230
|
-
"format": "date-time"
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
"components": {
|
|
242
|
-
"schemas": {
|
|
243
|
-
"User": {
|
|
244
|
-
"type": "object",
|
|
245
|
-
"required": ["id", "email", "name"],
|
|
246
|
-
"properties": {
|
|
247
|
-
"id": {
|
|
248
|
-
"type": "string",
|
|
249
|
-
"format": "uuid",
|
|
250
|
-
"description": "Unique identifier for the user"
|
|
251
|
-
},
|
|
252
|
-
"email": {
|
|
253
|
-
"type": "string",
|
|
254
|
-
"format": "email",
|
|
255
|
-
"description": "User's email address"
|
|
256
|
-
},
|
|
257
|
-
"name": {
|
|
258
|
-
"type": "string",
|
|
259
|
-
"description": "User's full name"
|
|
260
|
-
},
|
|
261
|
-
"createdAt": {
|
|
262
|
-
"type": "string",
|
|
263
|
-
"format": "date-time",
|
|
264
|
-
"description": "When the user was created"
|
|
265
|
-
},
|
|
266
|
-
"updatedAt": {
|
|
267
|
-
"type": "string",
|
|
268
|
-
"format": "date-time",
|
|
269
|
-
"description": "When the user was last updated"
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
"CreateUserRequest": {
|
|
274
|
-
"type": "object",
|
|
275
|
-
"required": ["email", "name"],
|
|
276
|
-
"properties": {
|
|
277
|
-
"email": {
|
|
278
|
-
"type": "string",
|
|
279
|
-
"format": "email",
|
|
280
|
-
"description": "User's email address"
|
|
281
|
-
},
|
|
282
|
-
"name": {
|
|
283
|
-
"type": "string",
|
|
284
|
-
"description": "User's full name"
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
},
|
|
288
|
-
"UpdateUserRequest": {
|
|
289
|
-
"type": "object",
|
|
290
|
-
"properties": {
|
|
291
|
-
"email": {
|
|
292
|
-
"type": "string",
|
|
293
|
-
"format": "email",
|
|
294
|
-
"description": "User's email address"
|
|
295
|
-
},
|
|
296
|
-
"name": {
|
|
297
|
-
"type": "string",
|
|
298
|
-
"description": "User's full name"
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
},
|
|
302
|
-
"Pagination": {
|
|
303
|
-
"type": "object",
|
|
304
|
-
"properties": {
|
|
305
|
-
"page": {
|
|
306
|
-
"type": "integer",
|
|
307
|
-
"description": "Current page number"
|
|
308
|
-
},
|
|
309
|
-
"limit": {
|
|
310
|
-
"type": "integer",
|
|
311
|
-
"description": "Number of items per page"
|
|
312
|
-
},
|
|
313
|
-
"total": {
|
|
314
|
-
"type": "integer",
|
|
315
|
-
"description": "Total number of items"
|
|
316
|
-
},
|
|
317
|
-
"pages": {
|
|
318
|
-
"type": "integer",
|
|
319
|
-
"description": "Total number of pages"
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
package/examples/sample-api.yaml
DELETED
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
openapi: 3.0.0
|
|
2
|
-
info:
|
|
3
|
-
title: Sample API
|
|
4
|
-
version: 1.0.0
|
|
5
|
-
description: A sample API for testing the OpenAPI to connector generator
|
|
6
|
-
servers:
|
|
7
|
-
- url: https://api.example.com/v1
|
|
8
|
-
description: Production server
|
|
9
|
-
- url: https://staging-api.example.com/v1
|
|
10
|
-
description: Staging server
|
|
11
|
-
paths:
|
|
12
|
-
/users:
|
|
13
|
-
get:
|
|
14
|
-
operationId: listUsers
|
|
15
|
-
summary: List all users
|
|
16
|
-
description: Retrieve a paginated list of all users in the system
|
|
17
|
-
parameters:
|
|
18
|
-
- name: page
|
|
19
|
-
in: query
|
|
20
|
-
description: Page number for pagination
|
|
21
|
-
required: false
|
|
22
|
-
schema:
|
|
23
|
-
type: integer
|
|
24
|
-
minimum: 1
|
|
25
|
-
default: 1
|
|
26
|
-
- name: limit
|
|
27
|
-
in: query
|
|
28
|
-
description: Number of users per page
|
|
29
|
-
required: false
|
|
30
|
-
schema:
|
|
31
|
-
type: integer
|
|
32
|
-
minimum: 1
|
|
33
|
-
maximum: 100
|
|
34
|
-
default: 20
|
|
35
|
-
responses:
|
|
36
|
-
'200':
|
|
37
|
-
description: Successful response
|
|
38
|
-
content:
|
|
39
|
-
application/json:
|
|
40
|
-
schema:
|
|
41
|
-
type: object
|
|
42
|
-
properties:
|
|
43
|
-
users:
|
|
44
|
-
type: array
|
|
45
|
-
items:
|
|
46
|
-
$ref: '#/components/schemas/User'
|
|
47
|
-
pagination:
|
|
48
|
-
$ref: '#/components/schemas/Pagination'
|
|
49
|
-
post:
|
|
50
|
-
operationId: createUser
|
|
51
|
-
summary: Create a new user
|
|
52
|
-
description: Create a new user account in the system
|
|
53
|
-
requestBody:
|
|
54
|
-
required: true
|
|
55
|
-
content:
|
|
56
|
-
application/json:
|
|
57
|
-
schema:
|
|
58
|
-
$ref: '#/components/schemas/CreateUserRequest'
|
|
59
|
-
responses:
|
|
60
|
-
'201':
|
|
61
|
-
description: User created successfully
|
|
62
|
-
content:
|
|
63
|
-
application/json:
|
|
64
|
-
schema:
|
|
65
|
-
$ref: '#/components/schemas/User'
|
|
66
|
-
'400':
|
|
67
|
-
description: Bad request - invalid input data
|
|
68
|
-
'409':
|
|
69
|
-
description: Conflict - user already exists
|
|
70
|
-
/users/{id}:
|
|
71
|
-
get:
|
|
72
|
-
operationId: getUserById
|
|
73
|
-
summary: Get user by ID
|
|
74
|
-
description: Retrieve a specific user by their unique identifier
|
|
75
|
-
parameters:
|
|
76
|
-
- name: id
|
|
77
|
-
in: path
|
|
78
|
-
required: true
|
|
79
|
-
description: Unique identifier of the user
|
|
80
|
-
schema:
|
|
81
|
-
type: string
|
|
82
|
-
format: uuid
|
|
83
|
-
responses:
|
|
84
|
-
'200':
|
|
85
|
-
description: User found
|
|
86
|
-
content:
|
|
87
|
-
application/json:
|
|
88
|
-
schema:
|
|
89
|
-
$ref: '#/components/schemas/User'
|
|
90
|
-
'404':
|
|
91
|
-
description: User not found
|
|
92
|
-
put:
|
|
93
|
-
operationId: updateUser
|
|
94
|
-
summary: Update user
|
|
95
|
-
description: Update an existing user's information
|
|
96
|
-
parameters:
|
|
97
|
-
- name: id
|
|
98
|
-
in: path
|
|
99
|
-
required: true
|
|
100
|
-
description: Unique identifier of the user
|
|
101
|
-
schema:
|
|
102
|
-
type: string
|
|
103
|
-
format: uuid
|
|
104
|
-
requestBody:
|
|
105
|
-
required: true
|
|
106
|
-
content:
|
|
107
|
-
application/json:
|
|
108
|
-
schema:
|
|
109
|
-
$ref: '#/components/schemas/UpdateUserRequest'
|
|
110
|
-
responses:
|
|
111
|
-
'200':
|
|
112
|
-
description: User updated successfully
|
|
113
|
-
content:
|
|
114
|
-
application/json:
|
|
115
|
-
schema:
|
|
116
|
-
$ref: '#/components/schemas/User'
|
|
117
|
-
'404':
|
|
118
|
-
description: User not found
|
|
119
|
-
'400':
|
|
120
|
-
description: Bad request - invalid input data
|
|
121
|
-
delete:
|
|
122
|
-
operationId: deleteUser
|
|
123
|
-
summary: Delete user
|
|
124
|
-
description: Permanently delete a user from the system
|
|
125
|
-
parameters:
|
|
126
|
-
- name: id
|
|
127
|
-
in: path
|
|
128
|
-
required: true
|
|
129
|
-
description: Unique identifier of the user
|
|
130
|
-
schema:
|
|
131
|
-
type: string
|
|
132
|
-
format: uuid
|
|
133
|
-
responses:
|
|
134
|
-
'204':
|
|
135
|
-
description: User deleted successfully
|
|
136
|
-
'404':
|
|
137
|
-
description: User not found
|
|
138
|
-
/health:
|
|
139
|
-
get:
|
|
140
|
-
operationId: healthCheck
|
|
141
|
-
summary: Health check
|
|
142
|
-
description: Check the health status of the API
|
|
143
|
-
responses:
|
|
144
|
-
'200':
|
|
145
|
-
description: API is healthy
|
|
146
|
-
content:
|
|
147
|
-
application/json:
|
|
148
|
-
schema:
|
|
149
|
-
type: object
|
|
150
|
-
properties:
|
|
151
|
-
status:
|
|
152
|
-
type: string
|
|
153
|
-
enum: [healthy, unhealthy]
|
|
154
|
-
timestamp:
|
|
155
|
-
type: string
|
|
156
|
-
format: date-time
|
|
157
|
-
components:
|
|
158
|
-
schemas:
|
|
159
|
-
User:
|
|
160
|
-
type: object
|
|
161
|
-
required:
|
|
162
|
-
- id
|
|
163
|
-
- email
|
|
164
|
-
- name
|
|
165
|
-
properties:
|
|
166
|
-
id:
|
|
167
|
-
type: string
|
|
168
|
-
format: uuid
|
|
169
|
-
description: Unique identifier for the user
|
|
170
|
-
email:
|
|
171
|
-
type: string
|
|
172
|
-
format: email
|
|
173
|
-
description: User's email address
|
|
174
|
-
name:
|
|
175
|
-
type: string
|
|
176
|
-
description: User's full name
|
|
177
|
-
createdAt:
|
|
178
|
-
type: string
|
|
179
|
-
format: date-time
|
|
180
|
-
description: When the user was created
|
|
181
|
-
updatedAt:
|
|
182
|
-
type: string
|
|
183
|
-
format: date-time
|
|
184
|
-
description: When the user was last updated
|
|
185
|
-
CreateUserRequest:
|
|
186
|
-
type: object
|
|
187
|
-
required:
|
|
188
|
-
- email
|
|
189
|
-
- name
|
|
190
|
-
properties:
|
|
191
|
-
email:
|
|
192
|
-
type: string
|
|
193
|
-
format: email
|
|
194
|
-
description: User's email address
|
|
195
|
-
name:
|
|
196
|
-
type: string
|
|
197
|
-
description: User's full name
|
|
198
|
-
UpdateUserRequest:
|
|
199
|
-
type: object
|
|
200
|
-
properties:
|
|
201
|
-
email:
|
|
202
|
-
type: string
|
|
203
|
-
format: email
|
|
204
|
-
description: User's email address
|
|
205
|
-
name:
|
|
206
|
-
type: string
|
|
207
|
-
description: User's full name
|
|
208
|
-
Pagination:
|
|
209
|
-
type: object
|
|
210
|
-
properties:
|
|
211
|
-
page:
|
|
212
|
-
type: integer
|
|
213
|
-
description: Current page number
|
|
214
|
-
limit:
|
|
215
|
-
type: integer
|
|
216
|
-
description: Number of items per page
|
|
217
|
-
total:
|
|
218
|
-
type: integer
|
|
219
|
-
description: Total number of items
|
|
220
|
-
pages:
|
|
221
|
-
type: integer
|
|
222
|
-
description: Total number of pages
|
package/examples/simple-api.json
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.0",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Simple API",
|
|
5
|
-
"version": "1.0.0"
|
|
6
|
-
},
|
|
7
|
-
"paths": {
|
|
8
|
-
"/products": {
|
|
9
|
-
"get": {
|
|
10
|
-
"operationId": "getProducts",
|
|
11
|
-
"summary": "Get all products",
|
|
12
|
-
"responses": {
|
|
13
|
-
"200": {
|
|
14
|
-
"description": "Success"
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"post": {
|
|
19
|
-
"operationId": "createProduct",
|
|
20
|
-
"summary": "Create product",
|
|
21
|
-
"requestBody": {
|
|
22
|
-
"required": true,
|
|
23
|
-
"content": {
|
|
24
|
-
"application/json": {
|
|
25
|
-
"schema": {
|
|
26
|
-
"type": "object"
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
"responses": {
|
|
32
|
-
"201": {
|
|
33
|
-
"description": "Created"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
package/index.js
DELETED