@zuplo/openapi-tools 7.11.0 → 7.11.1

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.
@@ -1,399 +0,0 @@
1
- import assert from "node:assert";
2
- import fs from "node:fs/promises";
3
- import path from "node:path";
4
- import { describe, it } from "node:test";
5
- import { fileURLToPath } from "node:url";
6
- import { ZUPLO_OPEN_API_ROUTE_KEY, } from "./interfaces.js";
7
- import { mergeOpenApiDocumentOnOperationId, mergeOpenApiDocuments, } from "./merge.js";
8
- import { addOperationIdsAsNecessary, getOperationKey, } from "./operation-utils.js";
9
- import { parseOpenApiFileFromString } from "./parsing.js";
10
- import { BASE_TEMPLATE } from "./url-utils.js";
11
- const __filename = fileURLToPath(import.meta.url);
12
- const __dirname = path.dirname(__filename);
13
- // Test fixtures are in the package root
14
- // When running from dist/, __dirname is packages/openapi-tools/dist
15
- // so we go up one level to get to packages/openapi-tools, then into test-fixtures
16
- const testFixturesPath = path.join(__dirname, "..", "test-fixtures");
17
- describe("OpenAPI Merge Utils", () => {
18
- it("should generate merge changes between two different oas files", async () => {
19
- const toImportPath = path.join(testFixturesPath, "toimport.oas.json");
20
- const toImportContent = await fs.readFile(toImportPath, "utf-8");
21
- const toImportOpenApiSpec = parseOpenApiFileFromString(".json", toImportContent);
22
- const baseRoutesPath = path.join(testFixturesPath, "base-routes-on-import-tests.oas.json");
23
- const baseRoutesContent = await fs.readFile(baseRoutesPath, "utf-8");
24
- const originalDocument = parseOpenApiFileFromString(".json", baseRoutesContent);
25
- const { created, merged, retained } = mergeOpenApiDocuments(originalDocument, toImportOpenApiSpec, "path-method");
26
- const expectedMergedResult = new Set().add("post>/v2/second/{userUid}/nature");
27
- const expectedRetainedResult = new Set().add("post>/v1/second/{userUid}/nature");
28
- assert.deepStrictEqual(created, new Set());
29
- assert.deepStrictEqual(merged, expectedMergedResult);
30
- assert.deepStrictEqual(retained, expectedRetainedResult);
31
- });
32
- it("should generate merge changes between a oas file and the default base template", async () => {
33
- const toImportPath = path.join(testFixturesPath, "toimport.oas.json");
34
- const toImportContent = await fs.readFile(toImportPath, "utf-8");
35
- const toImportOpenApiSpec = parseOpenApiFileFromString(".json", toImportContent);
36
- const originalDocument = parseOpenApiFileFromString(".json", BASE_TEMPLATE);
37
- const { created, merged, retained } = mergeOpenApiDocuments(originalDocument, toImportOpenApiSpec, "path-method");
38
- assert.deepStrictEqual(created, new Set().add("post>/v2/second/{userUid}/nature"));
39
- assert.deepStrictEqual(merged, new Set());
40
- assert.deepStrictEqual(retained, new Set());
41
- });
42
- it("should generate missing operation ids", async () => {
43
- const woOperationIdsPath = path.join(testFixturesPath, "base-routes-wo-operation-ids.oas.json");
44
- const woOperationIdsContent = await fs.readFile(woOperationIdsPath, "utf-8");
45
- const oasDocument = parseOpenApiFileFromString(".json", woOperationIdsContent);
46
- addOperationIdsAsNecessary(oasDocument);
47
- assert.ok(oasDocument.paths);
48
- assert.ok(oasDocument.paths["/v2/second/{userUid}/nature"]?.post?.operationId);
49
- });
50
- it("should not change existing operation ids", async () => {
51
- const baseRoutesPath = path.join(testFixturesPath, "base-routes-on-import-tests.oas.json");
52
- const baseRoutesContent = await fs.readFile(baseRoutesPath, "utf-8");
53
- const oasDocument = parseOpenApiFileFromString(".json", baseRoutesContent);
54
- addOperationIdsAsNecessary(oasDocument);
55
- assert.ok(oasDocument.paths);
56
- const paths = oasDocument.paths;
57
- assert.strictEqual(paths["/v1/second/{userUid}/nature"]?.post?.operationId, "12345");
58
- assert.strictEqual(paths["/v2/second/{userUid}/nature"]?.post?.operationId, "67920");
59
- });
60
- it("should successfully parse a yaml open api file", async () => {
61
- const toImportPath = path.join(testFixturesPath, "toimportv2.yaml");
62
- const toImportContent = await fs.readFile(toImportPath, "utf-8");
63
- const toImportOpenApiSpec = parseOpenApiFileFromString(".yaml", toImportContent);
64
- assert.ok(toImportOpenApiSpec);
65
- assert.deepStrictEqual(toImportOpenApiSpec.info, {
66
- title: "Protect API",
67
- description: "Buy & sell",
68
- version: "0.2.0",
69
- contact: {
70
- name: "Zuplo YAML Test",
71
- url: "https://zuplo.com/",
72
- email: "test@example.com",
73
- },
74
- });
75
- assert.deepStrictEqual(toImportOpenApiSpec.servers, [
76
- {
77
- url: "https://api.zuplo.com",
78
- description: "Production",
79
- },
80
- ]);
81
- assert.deepStrictEqual(toImportOpenApiSpec.tags, [
82
- { name: "Order" },
83
- { name: "Organization" },
84
- { name: "Site" },
85
- { name: "Supervisor" },
86
- ]);
87
- assert.ok(toImportOpenApiSpec.paths);
88
- const paths = toImportOpenApiSpec.paths;
89
- assert.ok(paths["/v1/orders"]);
90
- assert.ok(paths["/v1/orders/wa/{waaaa}"]);
91
- assert.ok(paths["/v1/orders/{order}"]);
92
- assert.ok(paths["/v1/orgs/{organization}"]);
93
- assert.deepStrictEqual(paths["/v1/sites"], {
94
- get: {
95
- operationId: "get-sites",
96
- summary: "Get Sites",
97
- description: "Sites are locations",
98
- tags: ["Site"],
99
- responses: {
100
- "200": {
101
- description: "OK",
102
- content: {
103
- "application/json": {
104
- schema: {
105
- type: "array",
106
- items: {
107
- $ref: "#/components/schemas/Site",
108
- },
109
- },
110
- },
111
- },
112
- headers: {
113
- "Cache-Control": {
114
- required: true,
115
- schema: {
116
- type: "string",
117
- },
118
- description: "Responses are cacheable following standard HTTP headers.",
119
- },
120
- },
121
- },
122
- },
123
- },
124
- });
125
- assert.ok(toImportOpenApiSpec.components);
126
- });
127
- });
128
- // Test fixtures for OperationID merge tests
129
- const emptyOpenApi = {
130
- openapi: "3.0.0",
131
- info: {
132
- title: "Test",
133
- version: "1.0.0",
134
- },
135
- paths: {},
136
- };
137
- const basicOpenApi = {
138
- openapi: "3.0.0",
139
- info: {
140
- title: "Test",
141
- version: "1.0.0",
142
- },
143
- paths: {
144
- "/test": {
145
- get: {
146
- operationId: "getTest",
147
- },
148
- },
149
- },
150
- };
151
- const openApiWithOperationIdsMissing = {
152
- openapi: "3.0.0",
153
- info: {
154
- title: "Test",
155
- version: "1.0.0",
156
- },
157
- components: {},
158
- paths: {
159
- "/test": {
160
- get: {
161
- responses: {
162
- "200": {
163
- description: "OK",
164
- },
165
- },
166
- },
167
- },
168
- },
169
- };
170
- const openApiWithMatchingPathMethodButDifferentOperationId = {
171
- openapi: "3.0.0",
172
- info: {
173
- title: "Test",
174
- version: "1.0.0",
175
- },
176
- paths: {
177
- "/test": {
178
- get: {
179
- operationId: "get_test",
180
- },
181
- },
182
- },
183
- };
184
- const openApiWithSomePathsAndMethods = {
185
- openapi: "3.0.0",
186
- info: {
187
- title: "Test",
188
- version: "1.0.0",
189
- },
190
- paths: {
191
- "/test": {
192
- get: {
193
- operationId: "getTest",
194
- deprecated: true,
195
- "x-zuplo-route": {
196
- corsPolicy: "none",
197
- handler: {
198
- export: "urlForwardHandler",
199
- module: "$import(@zuplo/runtime)",
200
- options: {
201
- baseUrl: "https://echo.zuplo.io",
202
- },
203
- },
204
- },
205
- },
206
- delete: {
207
- operationId: "deleteTest",
208
- "x-zuplo-route": {
209
- corsPolicy: "none",
210
- handler: {
211
- export: "urlForwardHandler",
212
- module: "$import(@zuplo/runtime)",
213
- options: {
214
- baseUrl: "https://echo.zuplo.io",
215
- },
216
- },
217
- },
218
- },
219
- post: {
220
- operationId: "postTest",
221
- "x-zuplo-route": {
222
- corsPolicy: "none",
223
- handler: {
224
- export: "urlForwardHandler",
225
- module: "$import(@zuplo/runtime)",
226
- options: {
227
- baseUrl: "https://echo.zuplo.io",
228
- },
229
- },
230
- },
231
- },
232
- },
233
- "/humans": {
234
- delete: {
235
- operationId: "deleteHuman",
236
- "x-zuplo-route": {
237
- corsPolicy: "none",
238
- handler: {
239
- export: "urlForwardHandler",
240
- module: "$import(@zuplo/runtime)",
241
- options: {
242
- baseUrl: "https://echo.zuplo.io",
243
- },
244
- },
245
- },
246
- },
247
- },
248
- "/humans/{id}": {
249
- parameters: [
250
- {
251
- name: "id",
252
- in: "path",
253
- required: true,
254
- schema: {
255
- type: "string",
256
- },
257
- },
258
- ],
259
- get: {
260
- operationId: "getHuman",
261
- "x-zuplo-route": {
262
- corsPolicy: "none",
263
- handler: {
264
- export: "urlForwardHandler",
265
- module: "$import(@zuplo/runtime)",
266
- options: {
267
- baseUrl: "https://echo.zuplo.io",
268
- },
269
- },
270
- },
271
- },
272
- },
273
- },
274
- };
275
- const newOpenApiWithSomePathsAndMethods = {
276
- openapi: "3.0.0",
277
- info: {
278
- title: "Test",
279
- version: "1.0.0",
280
- },
281
- paths: {
282
- "/test": {
283
- get: {
284
- operationId: "getTest",
285
- deprecated: false, // Changed deprecated to false
286
- },
287
- post: {
288
- operationId: "postTest",
289
- summary: "Create a new test", // Added summary
290
- // route definition is missing
291
- },
292
- },
293
- "/humans": {
294
- post: {
295
- operationId: "createHuman",
296
- },
297
- delete: {
298
- operationId: "deleteHuman",
299
- },
300
- },
301
- "/humans/{humanId}": {
302
- // Changed path parameter name
303
- parameters: [
304
- {
305
- name: "humanId",
306
- in: "path",
307
- required: true,
308
- schema: {
309
- type: "string",
310
- },
311
- },
312
- ],
313
- get: {
314
- operationId: "getHuman",
315
- },
316
- },
317
- },
318
- };
319
- describe("OpenAPI OperationID Merge Tests", () => {
320
- it("Doesn't change the original document when merging two empty OpenAPI files", () => {
321
- const { mergedDocument, created, merged, retained } = mergeOpenApiDocumentOnOperationId(emptyOpenApi, emptyOpenApi);
322
- assert.strictEqual(created.size, 0, "No operations should be created");
323
- assert.strictEqual(merged.size, 0, "No operations should be merged");
324
- assert.strictEqual(retained.size, 0, "No operations should be retained");
325
- assert.deepStrictEqual(mergedDocument, emptyOpenApi, "The original document should not be changed");
326
- });
327
- it("Retains existing operations when merging in an empty OpenAPI file", () => {
328
- const { mergedDocument, created, merged, retained } = mergeOpenApiDocumentOnOperationId(basicOpenApi, emptyOpenApi);
329
- assert.strictEqual(created.size, 0, "No operations should be created");
330
- assert.strictEqual(merged.size, 0, "No operations should be merged");
331
- assert.deepStrictEqual(retained, new Set(["getTest"]), "The existing operation should be retained");
332
- assert.deepStrictEqual(mergedDocument, basicOpenApi, "The original document should not be changed");
333
- });
334
- it("Creates new operations when merging into an empty OpenAPI file", () => {
335
- const { mergedDocument, created, merged, retained } = mergeOpenApiDocumentOnOperationId(emptyOpenApi, basicOpenApi);
336
- assert.strictEqual(merged.size, 0, "No operations should be merged");
337
- assert.strictEqual(retained.size, 0, "No operations should be retained");
338
- assert.deepStrictEqual(created, new Set(["getTest"]), "The new operation should be created");
339
- assert.deepStrictEqual(mergedDocument, basicOpenApi, "The merged document should match the new document");
340
- });
341
- it("Throws when operations are missing operationId", () => {
342
- assert.throws(() => {
343
- mergeOpenApiDocumentOnOperationId(basicOpenApi, openApiWithOperationIdsMissing);
344
- }, {
345
- message: `OperationId is required for all operations. OperationId missing on ${getOperationKey("get", "/test")}. Please add an operationId to all operations before merging.`,
346
- });
347
- });
348
- it("Throws when operation already exists at path+method and operationIds do not match", () => {
349
- assert.throws(() => {
350
- mergeOpenApiDocumentOnOperationId(basicOpenApi, openApiWithMatchingPathMethodButDifferentOperationId);
351
- }, {
352
- message: `Operation 'get_test' has a matching path/method to an existing operation at ${getOperationKey("get", "/test")}, but a different operationId. Either update the operationId on the existing operation or remove it entirely.`,
353
- });
354
- });
355
- it("Creates new operations when merging into an OpenAPI file with operations", () => {
356
- const { mergedDocument, created } = mergeOpenApiDocumentOnOperationId(openApiWithSomePathsAndMethods, newOpenApiWithSomePathsAndMethods);
357
- assert.deepStrictEqual(created, new Set(["createHuman"]), "The new operations should be created");
358
- assert.deepStrictEqual(mergedDocument?.paths?.["/humans"]?.post, { operationId: "createHuman" }, "The new operation should be created");
359
- });
360
- it("Retains old operations when new document does not include those operations", () => {
361
- const { mergedDocument, retained } = mergeOpenApiDocumentOnOperationId(openApiWithSomePathsAndMethods, newOpenApiWithSomePathsAndMethods);
362
- assert.deepStrictEqual(retained, new Set(["deleteTest"]), "The existing operations should be retained");
363
- assert.deepStrictEqual(mergedDocument?.paths?.["/test"]?.delete, openApiWithSomePathsAndMethods?.paths?.["/test"]?.delete, "The existing operation should be retained");
364
- });
365
- it("Merges operations and updates properties", () => {
366
- const { mergedDocument, merged } = mergeOpenApiDocumentOnOperationId(openApiWithSomePathsAndMethods, newOpenApiWithSomePathsAndMethods);
367
- assert.deepStrictEqual(merged, new Set(["getTest", "postTest", "deleteHuman", "getHuman"]), "The operations should be merged");
368
- assert.strictEqual(mergedDocument?.paths?.["/test"]?.get?.deprecated, false, "The operation's 'deprecated' property should be updated");
369
- assert.deepStrictEqual(mergedDocument?.paths?.["/test"]?.post?.summary, "Create a new test", "The operation's 'summary' property should be updated");
370
- assert.deepStrictEqual(mergedDocument?.paths?.["/humans"]?.delete?.[ZUPLO_OPEN_API_ROUTE_KEY], openApiWithSomePathsAndMethods?.paths?.["/humans"]?.delete?.[ZUPLO_OPEN_API_ROUTE_KEY], "Merged operation with no changes should be the same");
371
- assert.strictEqual(mergedDocument?.paths?.["/humans/{id}"]?.get, undefined, "The old operation should not exist in the merged document");
372
- // NOTE: Parameters at the path level are not merged since operationId
373
- // merging implies only operations are merged
374
- assert.deepStrictEqual(mergedDocument?.paths?.["/humans/{humanId}"], {
375
- get: {
376
- operationId: "getHuman",
377
- "x-zuplo-route": {
378
- corsPolicy: "none",
379
- handler: {
380
- export: "urlForwardHandler",
381
- module: "$import(@zuplo/runtime)",
382
- options: {
383
- baseUrl: "https://echo.zuplo.io",
384
- },
385
- },
386
- },
387
- },
388
- }, "The new operation should exist in the merged document");
389
- });
390
- it("Retains zuplo config when merging operations", () => {
391
- const { mergedDocument, merged } = mergeOpenApiDocumentOnOperationId(openApiWithSomePathsAndMethods, newOpenApiWithSomePathsAndMethods);
392
- assert.deepStrictEqual(merged, new Set(["getTest", "postTest", "deleteHuman", "getHuman"]), "The operations should be merged");
393
- assert.deepStrictEqual(mergedDocument?.paths?.["/test"]?.get?.[ZUPLO_OPEN_API_ROUTE_KEY], openApiWithSomePathsAndMethods?.paths?.["/test"]?.get?.[ZUPLO_OPEN_API_ROUTE_KEY], "The existing zuplo config should be retained");
394
- assert.deepStrictEqual(mergedDocument?.paths?.["/test"]?.post?.[ZUPLO_OPEN_API_ROUTE_KEY], openApiWithSomePathsAndMethods?.paths?.["/test"]?.post?.[ZUPLO_OPEN_API_ROUTE_KEY], "The existing zuplo config should be retained");
395
- assert.deepStrictEqual(mergedDocument?.paths?.["/humans"]?.delete?.[ZUPLO_OPEN_API_ROUTE_KEY], openApiWithSomePathsAndMethods?.paths?.["/humans"]?.delete?.[ZUPLO_OPEN_API_ROUTE_KEY], "The existing zuplo config should be retained");
396
- assert.deepStrictEqual(mergedDocument?.paths?.["/humans/{humanId}"]?.get?.[ZUPLO_OPEN_API_ROUTE_KEY], openApiWithSomePathsAndMethods?.paths?.["/humans/{id}"]?.get?.[ZUPLO_OPEN_API_ROUTE_KEY], "The existing zuplo config should be retained");
397
- });
398
- });
399
- //# sourceMappingURL=merge.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"merge.spec.js","sourceRoot":"","sources":["../src/merge.spec.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,wBAAwB,GAEzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,iCAAiC,EACjC,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,0BAA0B,EAC1B,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACl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B,EACD,8CAA8C,CAC/C,CAAC;QACF,MAAM,CAAC,eAAe,CACpB,cAAc,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,wBAAwB,CAAC,EACtE,8BAA8B,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAC1D,wBAAwB,CACzB,EACD,8CAA8C,CAC/C,CAAC;QACF,MAAM,CAAC,eAAe,CACpB,cAAc,EAAE,KAAK,EAAE,CAAC,mBAAmB,CAAC,EAAE,GAAG,EAAE,CACjD,wBAAwB,CACzB,EACD,8BAA8B,EAAE,KAAK,EAAE,CAAC,cAAc,CAAC,EAAE,GAAG,EAAE,CAC5D,wBAAwB,CACzB,EACD,8CAA8C,CAC/C,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=overlay.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"overlay.spec.d.ts","sourceRoot":"","sources":["../src/overlay.spec.ts"],"names":[],"mappings":""}