n8n-nodes-test-node 1.0.5 → 1.0.7

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # n8n-nodes-test-node
2
2
 
3
- Auto-generated n8n community node for the **HarToOpenApi** API (spec version 1.0.0), built from its OpenAPI document.
3
+ Auto-generated n8n community node for the **Swagger Petstore** API (spec version 1.0.7), built from its OpenAPI document.
4
4
 
5
5
  ## Install
6
6
 
@@ -14,16 +14,25 @@ npm install n8n-nodes-test-node
14
14
 
15
15
  ## What was generated
16
16
 
17
- - 3 resource(s), 3 operation(s).
18
- - Credential type **harToOpenApiApi**, with an editable **Base URL** field (the spec declared no security requirements, so this credential only holds the Base URL).
19
- - Default Base URL: `https://app-analytics-services.com` (override it in the credential's "Base URL" field to point at a different environment)
17
+ - 3 resource(s), 13 operation(s).
18
+ - Credential type **swaggerPetstoreApi**, with an editable **Base URL** field, plus: API Key / Bearer token field(s) per the spec's security scheme.
19
+ - Default Base URL: `https://petstore.swagger.io/v2` (override it in the credential's "Base URL" field to point at a different environment)
20
+ - **7 operation(s) from the spec were left out** because their only auth option isn't usable by this node's credential:
21
+ - `POST /pet/{petId}/uploadImage` (requires "petstore_auth")
22
+ - `PUT /pet` (requires "petstore_auth")
23
+ - `POST /pet` (requires "petstore_auth")
24
+ - `GET /pet/findByStatus` (requires "petstore_auth")
25
+ - `GET /pet/findByTags` (requires "petstore_auth")
26
+ - `POST /pet/{petId}` (requires "petstore_auth")
27
+ - `DELETE /pet/{petId}` (requires "petstore_auth")
20
28
 
21
29
  ## Limitations
22
30
 
23
31
  - Only OpenAPI 3.x is supported.
24
- - Only **API Key** (header or query) and **HTTP Bearer** authentication are supported. OAuth2, Basic Auth, and mutual TLS are not.
32
+ - Supported authentication: **API Key** (header or query), **HTTP Bearer**, **HTTP Basic**, and **OAuth2** (authorization code or client credentials flow only -- not implicit or password grants). Anything else (OpenID Connect, HTTP Digest, mutual TLS) is refused at generation time rather than silently broken.
33
+ - OAuth2 and HTTP Basic each use n8n's own built-in credential mechanism and can't be combined with each other or with API Key/Bearer in one credential. If a spec declares more than one auth *family* as alternatives, this generator picks one deterministically -- **OAuth2 > HTTP Basic > API Key/Bearer** -- and the rest are ignored (logged during generation, and listed above if applicable). Multiple schemes *within* the API Key/Bearer family are still combined into one credential.
34
+ - If some operations require only an unsupported scheme while others are covered by this node's credential (the classic Swagger Petstore spec is a real example -- OAuth2 implicit flow for writes, an API key for some reads), the unsupported operations are left out of the node rather than the whole build failing -- see above for which ones, if any.
25
35
  - Request bodies with nested objects, arrays, or genuine `oneOf`/`anyOf`/`allOf` type unions are exposed as a single raw "Body (JSON)" field rather than individual fields. A nullable/optional primitive field (OpenAPI 3.1's `anyOf: [{type: 'string'}, {type: 'null'}]`, as FastAPI/Pydantic generates for `Optional[str]`) is still recognized as simple and gets its own field.
26
- - If the spec declared more than one supported auth scheme, they were combined into a single credential covering all of them, rather than offering a choice.
27
36
 
28
37
  ## Regenerating
29
38
 
@@ -0,0 +1,9 @@
1
+ import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
+ export declare class SwaggerPetstoreApi implements ICredentialType {
3
+ name: string;
4
+ displayName: string;
5
+ documentationUrl: string;
6
+ properties: INodeProperties[];
7
+ authenticate: IAuthenticateGeneric;
8
+ test: ICredentialTestRequest;
9
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwaggerPetstoreApi = void 0;
4
+ class SwaggerPetstoreApi {
5
+ constructor() {
6
+ this.name = 'swaggerPetstoreApi';
7
+ this.displayName = 'Swagger Petstore API';
8
+ this.documentationUrl = '';
9
+ this.properties = [
10
+ {
11
+ displayName: 'Base URL',
12
+ name: 'baseUrl',
13
+ type: 'string',
14
+ default: 'https://petstore.swagger.io/v2',
15
+ required: true,
16
+ description: 'Base URL every request is sent to. Change this to point the node at a different environment (staging, self-hosted, etc.).',
17
+ },
18
+ {
19
+ displayName: 'api_key (API Key)',
20
+ name: 'apiKey',
21
+ type: 'string',
22
+ typeOptions: { password: true },
23
+ default: '',
24
+ required: true,
25
+ description: 'Sent as the "api_key" header on every request.',
26
+ },
27
+ ];
28
+ this.authenticate = {
29
+ type: 'generic',
30
+ properties: {
31
+ headers: {
32
+ api_key: '={{$credentials.apiKey}}',
33
+ },
34
+ },
35
+ };
36
+ this.test = {
37
+ request: {
38
+ baseURL: '={{$credentials.baseUrl}}',
39
+ url: '/user/logout',
40
+ method: 'GET',
41
+ },
42
+ };
43
+ }
44
+ }
45
+ exports.SwaggerPetstoreApi = SwaggerPetstoreApi;
@@ -1,4 +1,4 @@
1
1
  import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
2
- export declare class HarToOpenApiNode implements INodeType {
2
+ export declare class SwaggerPetstoreNode implements INodeType {
3
3
  description: INodeTypeDescription;
4
4
  }
@@ -0,0 +1,739 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwaggerPetstoreNode = void 0;
4
+ class SwaggerPetstoreNode {
5
+ constructor() {
6
+ this.description = {
7
+ displayName: 'Swagger Petstore',
8
+ name: 'swaggerPetstore',
9
+ icon: 'file:icon.png',
10
+ group: ['transform'],
11
+ version: 1,
12
+ subtitle: '={{$parameter["operation"] + ($parameter["resource"] ? " " + $parameter["resource"] : "")}}',
13
+ description: 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.',
14
+ defaults: {
15
+ name: 'Swagger Petstore',
16
+ },
17
+ inputs: ['main'],
18
+ outputs: ['main'],
19
+ credentials: [
20
+ {
21
+ name: 'swaggerPetstoreApi',
22
+ required: true,
23
+ },
24
+ ],
25
+ requestDefaults: {
26
+ baseURL: '={{$credentials.baseUrl}}',
27
+ headers: {
28
+ Accept: 'application/json',
29
+ },
30
+ },
31
+ properties: [
32
+ {
33
+ displayName: 'Resource',
34
+ name: 'resource',
35
+ type: 'options',
36
+ noDataExpression: true,
37
+ options: [
38
+ { name: 'Pet', value: 'pet' },
39
+ { name: 'Store', value: 'store' },
40
+ { name: 'User', value: 'user' },
41
+ ],
42
+ default: 'pet',
43
+ },
44
+ {
45
+ displayName: 'Operation',
46
+ name: 'operation',
47
+ type: 'options',
48
+ noDataExpression: true,
49
+ options: [
50
+ {
51
+ name: 'Find Pet By ID',
52
+ value: 'getPetById',
53
+ action: 'Find pet by ID',
54
+ description: 'Returns a single pet',
55
+ routing: {
56
+ request: {
57
+ method: 'GET',
58
+ url: '=/pet/{{$parameter["petId"]}}',
59
+ },
60
+ },
61
+ },
62
+ ],
63
+ displayOptions: {
64
+ show: {
65
+ resource: ['pet'],
66
+ },
67
+ },
68
+ default: 'getPetById',
69
+ },
70
+ {
71
+ displayName: 'Operation',
72
+ name: 'operation',
73
+ type: 'options',
74
+ noDataExpression: true,
75
+ options: [
76
+ {
77
+ name: 'Returns Pet Inventories By Status',
78
+ value: 'getInventory',
79
+ action: 'Returns pet inventories by status',
80
+ description: 'Returns a map of status codes to quantities',
81
+ routing: {
82
+ request: {
83
+ method: 'GET',
84
+ url: '=/store/inventory',
85
+ },
86
+ },
87
+ },
88
+ {
89
+ name: 'Place An Order For A Pet',
90
+ value: 'placeOrder',
91
+ action: 'Place an order for a pet',
92
+ description: 'Place an order for a pet',
93
+ routing: {
94
+ request: {
95
+ method: 'POST',
96
+ url: '=/store/order',
97
+ },
98
+ },
99
+ },
100
+ {
101
+ name: 'Find Purchase Order By ID',
102
+ value: 'getOrderById',
103
+ action: 'Find purchase order by ID',
104
+ description: 'For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions',
105
+ routing: {
106
+ request: {
107
+ method: 'GET',
108
+ url: '=/store/order/{{$parameter["orderId"]}}',
109
+ },
110
+ },
111
+ },
112
+ {
113
+ name: 'Delete Purchase Order By ID',
114
+ value: 'deleteOrder',
115
+ action: 'Delete purchase order by ID',
116
+ description: 'For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors',
117
+ routing: {
118
+ request: {
119
+ method: 'DELETE',
120
+ url: '=/store/order/{{$parameter["orderId"]}}',
121
+ },
122
+ },
123
+ },
124
+ ],
125
+ displayOptions: {
126
+ show: {
127
+ resource: ['store'],
128
+ },
129
+ },
130
+ default: 'getInventory',
131
+ },
132
+ {
133
+ displayName: 'Operation',
134
+ name: 'operation',
135
+ type: 'options',
136
+ noDataExpression: true,
137
+ options: [
138
+ {
139
+ name: 'Creates List Of Users With Given Input Array',
140
+ value: 'createUsersWithListInput',
141
+ action: 'Creates list of users with given input array',
142
+ description: 'Creates list of users with given input array',
143
+ routing: {
144
+ request: {
145
+ method: 'POST',
146
+ url: '=/user/createWithList',
147
+ },
148
+ },
149
+ },
150
+ {
151
+ name: 'Get User By User Name',
152
+ value: 'getUserByName',
153
+ action: 'Get user by user name',
154
+ description: 'Get user by user name',
155
+ routing: {
156
+ request: {
157
+ method: 'GET',
158
+ url: '=/user/{{$parameter["username"]}}',
159
+ },
160
+ },
161
+ },
162
+ {
163
+ name: 'Updated User',
164
+ value: 'updateUser',
165
+ action: 'Updated user',
166
+ description: 'This can only be done by the logged in user.',
167
+ routing: {
168
+ request: {
169
+ method: 'PUT',
170
+ url: '=/user/{{$parameter["username"]}}',
171
+ },
172
+ },
173
+ },
174
+ {
175
+ name: 'Delete User',
176
+ value: 'deleteUser',
177
+ action: 'Delete user',
178
+ description: 'This can only be done by the logged in user.',
179
+ routing: {
180
+ request: {
181
+ method: 'DELETE',
182
+ url: '=/user/{{$parameter["username"]}}',
183
+ },
184
+ },
185
+ },
186
+ {
187
+ name: 'Logs User Into The System',
188
+ value: 'loginUser',
189
+ action: 'Logs user into the system',
190
+ description: 'Logs user into the system',
191
+ routing: {
192
+ request: {
193
+ method: 'GET',
194
+ url: '=/user/login',
195
+ },
196
+ },
197
+ },
198
+ {
199
+ name: 'Logs Out Current Logged In User Session',
200
+ value: 'logoutUser',
201
+ action: 'Logs out current logged in user session',
202
+ description: 'Logs out current logged in user session',
203
+ routing: {
204
+ request: {
205
+ method: 'GET',
206
+ url: '=/user/logout',
207
+ },
208
+ },
209
+ },
210
+ {
211
+ name: 'Creates List Of Users With Given Input Array',
212
+ value: 'createUsersWithArrayInput',
213
+ action: 'Creates list of users with given input array',
214
+ description: 'Creates list of users with given input array',
215
+ routing: {
216
+ request: {
217
+ method: 'POST',
218
+ url: '=/user/createWithArray',
219
+ },
220
+ },
221
+ },
222
+ {
223
+ name: 'Create User',
224
+ value: 'createUser',
225
+ action: 'Create user',
226
+ description: 'This can only be done by the logged in user.',
227
+ routing: {
228
+ request: {
229
+ method: 'POST',
230
+ url: '=/user',
231
+ },
232
+ },
233
+ },
234
+ ],
235
+ displayOptions: {
236
+ show: {
237
+ resource: ['user'],
238
+ },
239
+ },
240
+ default: 'createUsersWithListInput',
241
+ },
242
+ {
243
+ displayName: 'Pet Id',
244
+ name: 'petId',
245
+ type: 'number',
246
+ default: 0,
247
+ required: true,
248
+ description: 'ID of pet to return',
249
+ displayOptions: {
250
+ show: {
251
+ resource: ['pet'],
252
+ operation: ['getPetById'],
253
+ },
254
+ },
255
+ },
256
+ {
257
+ displayName: 'Additional Fields',
258
+ name: 'additionalFields',
259
+ type: 'collection',
260
+ placeholder: 'Add Field',
261
+ default: {},
262
+ displayOptions: {
263
+ show: {
264
+ resource: ['store'],
265
+ operation: ['placeOrder'],
266
+ },
267
+ },
268
+ options: [
269
+ {
270
+ displayName: 'Id',
271
+ name: 'id',
272
+ type: 'number',
273
+ default: 0,
274
+ description: '',
275
+ routing: {
276
+ send: {
277
+ type: 'body',
278
+ property: 'id',
279
+ },
280
+ },
281
+ },
282
+ {
283
+ displayName: 'Pet Id',
284
+ name: 'petId',
285
+ type: 'number',
286
+ default: 0,
287
+ description: '',
288
+ routing: {
289
+ send: {
290
+ type: 'body',
291
+ property: 'petId',
292
+ },
293
+ },
294
+ },
295
+ {
296
+ displayName: 'Quantity',
297
+ name: 'quantity',
298
+ type: 'number',
299
+ default: 0,
300
+ description: '',
301
+ routing: {
302
+ send: {
303
+ type: 'body',
304
+ property: 'quantity',
305
+ },
306
+ },
307
+ },
308
+ {
309
+ displayName: 'Ship Date',
310
+ name: 'shipDate',
311
+ type: 'string',
312
+ default: '',
313
+ description: '',
314
+ routing: {
315
+ send: {
316
+ type: 'body',
317
+ property: 'shipDate',
318
+ },
319
+ },
320
+ },
321
+ {
322
+ displayName: 'Status',
323
+ name: 'status',
324
+ type: 'string',
325
+ default: '',
326
+ description: 'Order Status',
327
+ routing: {
328
+ send: {
329
+ type: 'body',
330
+ property: 'status',
331
+ },
332
+ },
333
+ },
334
+ {
335
+ displayName: 'Complete',
336
+ name: 'complete',
337
+ type: 'boolean',
338
+ default: false,
339
+ description: '',
340
+ routing: {
341
+ send: {
342
+ type: 'body',
343
+ property: 'complete',
344
+ },
345
+ },
346
+ },
347
+ ],
348
+ },
349
+ {
350
+ displayName: 'Order Id',
351
+ name: 'orderId',
352
+ type: 'number',
353
+ default: 0,
354
+ required: true,
355
+ description: 'ID of pet that needs to be fetched',
356
+ displayOptions: {
357
+ show: {
358
+ resource: ['store'],
359
+ operation: ['getOrderById'],
360
+ },
361
+ },
362
+ },
363
+ {
364
+ displayName: 'Order Id',
365
+ name: 'orderId',
366
+ type: 'number',
367
+ default: 0,
368
+ required: true,
369
+ description: 'ID of the order that needs to be deleted',
370
+ displayOptions: {
371
+ show: {
372
+ resource: ['store'],
373
+ operation: ['deleteOrder'],
374
+ },
375
+ },
376
+ },
377
+ {
378
+ displayName: 'Body (JSON)',
379
+ name: 'bodyJson',
380
+ type: 'json',
381
+ default: '{}',
382
+ required: true,
383
+ description: "Raw JSON request body. The spec's body schema is too complex to expose as individual fields, so provide the full JSON payload here.",
384
+ displayOptions: {
385
+ show: {
386
+ resource: ['user'],
387
+ operation: ['createUsersWithListInput'],
388
+ },
389
+ },
390
+ routing: {
391
+ request: {
392
+ body: '={{JSON.parse($value)}}',
393
+ },
394
+ },
395
+ },
396
+ {
397
+ displayName: 'Username',
398
+ name: 'username',
399
+ type: 'string',
400
+ default: '',
401
+ required: true,
402
+ description: 'The name that needs to be fetched. Use user1 for testing. ',
403
+ displayOptions: {
404
+ show: {
405
+ resource: ['user'],
406
+ operation: ['getUserByName'],
407
+ },
408
+ },
409
+ },
410
+ {
411
+ displayName: 'Username',
412
+ name: 'username',
413
+ type: 'string',
414
+ default: '',
415
+ required: true,
416
+ description: 'name that need to be updated',
417
+ displayOptions: {
418
+ show: {
419
+ resource: ['user'],
420
+ operation: ['updateUser'],
421
+ },
422
+ },
423
+ },
424
+ {
425
+ displayName: 'Additional Fields',
426
+ name: 'additionalFields',
427
+ type: 'collection',
428
+ placeholder: 'Add Field',
429
+ default: {},
430
+ displayOptions: {
431
+ show: {
432
+ resource: ['user'],
433
+ operation: ['updateUser'],
434
+ },
435
+ },
436
+ options: [
437
+ {
438
+ displayName: 'Id',
439
+ name: 'id',
440
+ type: 'number',
441
+ default: 0,
442
+ description: '',
443
+ routing: {
444
+ send: {
445
+ type: 'body',
446
+ property: 'id',
447
+ },
448
+ },
449
+ },
450
+ {
451
+ displayName: 'Username',
452
+ name: 'username',
453
+ type: 'string',
454
+ default: '',
455
+ description: '',
456
+ routing: {
457
+ send: {
458
+ type: 'body',
459
+ property: 'username',
460
+ },
461
+ },
462
+ },
463
+ {
464
+ displayName: 'First Name',
465
+ name: 'firstName',
466
+ type: 'string',
467
+ default: '',
468
+ description: '',
469
+ routing: {
470
+ send: {
471
+ type: 'body',
472
+ property: 'firstName',
473
+ },
474
+ },
475
+ },
476
+ {
477
+ displayName: 'Last Name',
478
+ name: 'lastName',
479
+ type: 'string',
480
+ default: '',
481
+ description: '',
482
+ routing: {
483
+ send: {
484
+ type: 'body',
485
+ property: 'lastName',
486
+ },
487
+ },
488
+ },
489
+ {
490
+ displayName: 'Email',
491
+ name: 'email',
492
+ type: 'string',
493
+ default: '',
494
+ description: '',
495
+ routing: {
496
+ send: {
497
+ type: 'body',
498
+ property: 'email',
499
+ },
500
+ },
501
+ },
502
+ {
503
+ displayName: 'Password',
504
+ name: 'password',
505
+ type: 'string',
506
+ default: '',
507
+ description: '',
508
+ routing: {
509
+ send: {
510
+ type: 'body',
511
+ property: 'password',
512
+ },
513
+ },
514
+ },
515
+ {
516
+ displayName: 'Phone',
517
+ name: 'phone',
518
+ type: 'string',
519
+ default: '',
520
+ description: '',
521
+ routing: {
522
+ send: {
523
+ type: 'body',
524
+ property: 'phone',
525
+ },
526
+ },
527
+ },
528
+ {
529
+ displayName: 'User Status',
530
+ name: 'userStatus',
531
+ type: 'number',
532
+ default: 0,
533
+ description: 'User Status',
534
+ routing: {
535
+ send: {
536
+ type: 'body',
537
+ property: 'userStatus',
538
+ },
539
+ },
540
+ },
541
+ ],
542
+ },
543
+ {
544
+ displayName: 'Username',
545
+ name: 'username',
546
+ type: 'string',
547
+ default: '',
548
+ required: true,
549
+ description: 'The name that needs to be deleted',
550
+ displayOptions: {
551
+ show: {
552
+ resource: ['user'],
553
+ operation: ['deleteUser'],
554
+ },
555
+ },
556
+ },
557
+ {
558
+ displayName: 'Username',
559
+ name: 'username',
560
+ type: 'string',
561
+ default: '',
562
+ required: true,
563
+ description: 'The user name for login',
564
+ displayOptions: {
565
+ show: {
566
+ resource: ['user'],
567
+ operation: ['loginUser'],
568
+ },
569
+ },
570
+ routing: {
571
+ send: {
572
+ type: 'query',
573
+ property: 'username',
574
+ },
575
+ },
576
+ },
577
+ {
578
+ displayName: 'Password',
579
+ name: 'password',
580
+ type: 'string',
581
+ default: '',
582
+ required: true,
583
+ description: 'The password for login in clear text',
584
+ displayOptions: {
585
+ show: {
586
+ resource: ['user'],
587
+ operation: ['loginUser'],
588
+ },
589
+ },
590
+ routing: {
591
+ send: {
592
+ type: 'query',
593
+ property: 'password',
594
+ },
595
+ },
596
+ },
597
+ {
598
+ displayName: 'Body (JSON)',
599
+ name: 'bodyJson',
600
+ type: 'json',
601
+ default: '{}',
602
+ required: true,
603
+ description: "Raw JSON request body. The spec's body schema is too complex to expose as individual fields, so provide the full JSON payload here.",
604
+ displayOptions: {
605
+ show: {
606
+ resource: ['user'],
607
+ operation: ['createUsersWithArrayInput'],
608
+ },
609
+ },
610
+ routing: {
611
+ request: {
612
+ body: '={{JSON.parse($value)}}',
613
+ },
614
+ },
615
+ },
616
+ {
617
+ displayName: 'Additional Fields',
618
+ name: 'additionalFields',
619
+ type: 'collection',
620
+ placeholder: 'Add Field',
621
+ default: {},
622
+ displayOptions: {
623
+ show: {
624
+ resource: ['user'],
625
+ operation: ['createUser'],
626
+ },
627
+ },
628
+ options: [
629
+ {
630
+ displayName: 'Id',
631
+ name: 'id',
632
+ type: 'number',
633
+ default: 0,
634
+ description: '',
635
+ routing: {
636
+ send: {
637
+ type: 'body',
638
+ property: 'id',
639
+ },
640
+ },
641
+ },
642
+ {
643
+ displayName: 'Username',
644
+ name: 'username',
645
+ type: 'string',
646
+ default: '',
647
+ description: '',
648
+ routing: {
649
+ send: {
650
+ type: 'body',
651
+ property: 'username',
652
+ },
653
+ },
654
+ },
655
+ {
656
+ displayName: 'First Name',
657
+ name: 'firstName',
658
+ type: 'string',
659
+ default: '',
660
+ description: '',
661
+ routing: {
662
+ send: {
663
+ type: 'body',
664
+ property: 'firstName',
665
+ },
666
+ },
667
+ },
668
+ {
669
+ displayName: 'Last Name',
670
+ name: 'lastName',
671
+ type: 'string',
672
+ default: '',
673
+ description: '',
674
+ routing: {
675
+ send: {
676
+ type: 'body',
677
+ property: 'lastName',
678
+ },
679
+ },
680
+ },
681
+ {
682
+ displayName: 'Email',
683
+ name: 'email',
684
+ type: 'string',
685
+ default: '',
686
+ description: '',
687
+ routing: {
688
+ send: {
689
+ type: 'body',
690
+ property: 'email',
691
+ },
692
+ },
693
+ },
694
+ {
695
+ displayName: 'Password',
696
+ name: 'password',
697
+ type: 'string',
698
+ default: '',
699
+ description: '',
700
+ routing: {
701
+ send: {
702
+ type: 'body',
703
+ property: 'password',
704
+ },
705
+ },
706
+ },
707
+ {
708
+ displayName: 'Phone',
709
+ name: 'phone',
710
+ type: 'string',
711
+ default: '',
712
+ description: '',
713
+ routing: {
714
+ send: {
715
+ type: 'body',
716
+ property: 'phone',
717
+ },
718
+ },
719
+ },
720
+ {
721
+ displayName: 'User Status',
722
+ name: 'userStatus',
723
+ type: 'number',
724
+ default: 0,
725
+ description: 'User Status',
726
+ routing: {
727
+ send: {
728
+ type: 'body',
729
+ property: 'userStatus',
730
+ },
731
+ },
732
+ },
733
+ ],
734
+ },
735
+ ],
736
+ };
737
+ }
738
+ }
739
+ exports.SwaggerPetstoreNode = SwaggerPetstoreNode;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "n8n-nodes-test-node",
3
- "version": "1.0.5",
4
- "description": "OpenAPI spec generated from HAR data for app-analytics-services.com on 2026-09-22T00:41:19.746Z",
3
+ "version": "1.0.7",
4
+ "description": "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",
5
5
  "keywords": [
6
6
  "n8n-community-node-package"
7
7
  ],
@@ -16,10 +16,10 @@
16
16
  "n8n": {
17
17
  "n8nNodesApiVersion": 1,
18
18
  "credentials": [
19
- "dist/HarToOpenApiApi.credentials.js"
19
+ "dist/SwaggerPetstoreApi.credentials.js"
20
20
  ],
21
21
  "nodes": [
22
- "dist/HarToOpenApiNode.node.js"
22
+ "dist/SwaggerPetstoreNode.node.js"
23
23
  ]
24
24
  },
25
25
  "devDependencies": {
@@ -1,8 +0,0 @@
1
- import type { ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
2
- export declare class HarToOpenApiApi implements ICredentialType {
3
- name: string;
4
- displayName: string;
5
- documentationUrl: string;
6
- properties: INodeProperties[];
7
- test: ICredentialTestRequest;
8
- }
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HarToOpenApiApi = void 0;
4
- class HarToOpenApiApi {
5
- constructor() {
6
- this.name = 'harToOpenApiApi';
7
- this.displayName = 'HarToOpenApi';
8
- this.documentationUrl = '';
9
- this.properties = [
10
- {
11
- displayName: 'Base URL',
12
- name: 'baseUrl',
13
- type: 'string',
14
- default: 'https://app-analytics-services.com',
15
- required: true,
16
- description: 'Base URL every request is sent to. Change this to point the node at a different environment (staging, self-hosted, etc.).',
17
- },
18
- ];
19
- this.test = {
20
- request: {
21
- baseURL: '={{$credentials.baseUrl}}',
22
- url: '/config/app/1%3A651096464994%3Aios%3A607afef0b9abfb5e42fb3b',
23
- method: 'GET',
24
- },
25
- };
26
- }
27
- }
28
- exports.HarToOpenApiApi = HarToOpenApiApi;
@@ -1,266 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HarToOpenApiNode = void 0;
4
- class HarToOpenApiNode {
5
- constructor() {
6
- this.description = {
7
- displayName: 'HarToOpenApi',
8
- name: 'harToOpenApi',
9
- icon: 'file:icon.png',
10
- group: ['transform'],
11
- version: 1,
12
- subtitle: '={{$parameter["operation"] + ($parameter["resource"] ? " " + $parameter["resource"] : "")}}',
13
- description: 'OpenAPI spec generated from HAR data for app-analytics-services.com on 2026-09-22T00:41:19.746Z',
14
- defaults: {
15
- name: 'HarToOpenApi',
16
- },
17
- inputs: ['main'],
18
- outputs: ['main'],
19
- credentials: [
20
- {
21
- name: 'harToOpenApiApi',
22
- required: true,
23
- },
24
- ],
25
- requestDefaults: {
26
- baseURL: '={{$credentials.baseUrl}}',
27
- headers: {
28
- Accept: 'application/json',
29
- },
30
- },
31
- properties: [
32
- {
33
- displayName: 'Resource',
34
- name: 'resource',
35
- type: 'options',
36
- noDataExpression: true,
37
- options: [
38
- { name: 'A', value: 'a' },
39
- { name: 'Config', value: 'config' },
40
- { name: 'Sdk Exp', value: 'sdkExp' },
41
- ],
42
- default: 'a',
43
- },
44
- {
45
- displayName: 'Operation',
46
- name: 'operation',
47
- type: 'options',
48
- noDataExpression: true,
49
- options: [
50
- {
51
- name: 'Post A',
52
- value: 'postA',
53
- action: 'Post A',
54
- description: 'Post A',
55
- routing: {
56
- request: {
57
- method: 'POST',
58
- url: '=/a',
59
- },
60
- },
61
- },
62
- ],
63
- displayOptions: {
64
- show: {
65
- resource: ['a'],
66
- },
67
- },
68
- default: 'postA',
69
- },
70
- {
71
- displayName: 'Operation',
72
- name: 'operation',
73
- type: 'options',
74
- noDataExpression: true,
75
- options: [
76
- {
77
- name: 'Get Config App 1 3 A 651096464994 3 Aios 3 A 607 Afef 0 B 9 Abfb 5 E 42 Fb 3 B',
78
- value: 'getConfigApp13A6510964649943Aios3A607Afef0B9Abfb5E42Fb3B',
79
- action: 'Get Config App 1 3 A 651096464994 3 Aios 3 A 607 Afef 0 B 9 Abfb 5 E 42 Fb 3 B',
80
- description: 'Get Config App 1 3 A 651096464994 3 Aios 3 A 607 Afef 0 B 9 Abfb 5 E 42 Fb 3 B',
81
- routing: {
82
- request: {
83
- method: 'GET',
84
- url: '=/config/app/1%3A651096464994%3Aios%3A607afef0b9abfb5e42fb3b',
85
- },
86
- },
87
- },
88
- ],
89
- displayOptions: {
90
- show: {
91
- resource: ['config'],
92
- },
93
- },
94
- default: 'getConfigApp13A6510964649943Aios3A607Afef0B9Abfb5E42Fb3B',
95
- },
96
- {
97
- displayName: 'Operation',
98
- name: 'operation',
99
- type: 'options',
100
- noDataExpression: true,
101
- options: [
102
- {
103
- name: 'Post Sdk Exp',
104
- value: 'postSdkExp',
105
- action: 'Post Sdk Exp',
106
- description: 'Post Sdk Exp',
107
- routing: {
108
- request: {
109
- method: 'POST',
110
- url: '=/sdk-exp',
111
- },
112
- },
113
- },
114
- ],
115
- displayOptions: {
116
- show: {
117
- resource: ['sdkExp'],
118
- },
119
- },
120
- default: 'postSdkExp',
121
- },
122
- {
123
- displayName: 'Additional Fields',
124
- name: 'additionalFields',
125
- type: 'collection',
126
- placeholder: 'Add Field',
127
- default: {},
128
- displayOptions: {
129
- show: {
130
- resource: ['a'],
131
- operation: ['postA'],
132
- },
133
- },
134
- options: [
135
- {
136
- displayName: 'Upload Draft Interop Version',
137
- name: 'uploadDraftInteropVersion',
138
- type: 'string',
139
- default: '',
140
- description: 'upload-draft-interop-version',
141
- routing: {
142
- request: {
143
- headers: {
144
- 'upload-draft-interop-version': '={{$value}}',
145
- },
146
- },
147
- },
148
- },
149
- {
150
- displayName: 'Upload Complete',
151
- name: 'uploadComplete',
152
- type: 'string',
153
- default: '',
154
- description: 'upload-complete',
155
- routing: {
156
- request: {
157
- headers: {
158
- 'upload-complete': '={{$value}}',
159
- },
160
- },
161
- },
162
- },
163
- ],
164
- },
165
- {
166
- displayName: 'Additional Fields',
167
- name: 'additionalFields',
168
- type: 'collection',
169
- placeholder: 'Add Field',
170
- default: {},
171
- displayOptions: {
172
- show: {
173
- resource: ['config'],
174
- operation: ['getConfigApp13A6510964649943Aios3A607Afef0B9Abfb5E42Fb3B'],
175
- },
176
- },
177
- options: [
178
- {
179
- displayName: 'Platform',
180
- name: 'platform',
181
- type: 'string',
182
- default: '',
183
- description: 'platform',
184
- routing: {
185
- send: {
186
- type: 'query',
187
- property: 'platform',
188
- },
189
- },
190
- },
191
- {
192
- displayName: 'Runtime Version',
193
- name: 'runtimeVersion',
194
- type: 'number',
195
- default: 0,
196
- description: 'runtime_version',
197
- routing: {
198
- send: {
199
- type: 'query',
200
- property: 'runtime_version',
201
- },
202
- },
203
- },
204
- {
205
- displayName: 'Gmp Version',
206
- name: 'gmpVersion',
207
- type: 'number',
208
- default: 0,
209
- description: 'gmp_version',
210
- routing: {
211
- send: {
212
- type: 'query',
213
- property: 'gmp_version',
214
- },
215
- },
216
- },
217
- ],
218
- },
219
- {
220
- displayName: 'Additional Fields',
221
- name: 'additionalFields',
222
- type: 'collection',
223
- placeholder: 'Add Field',
224
- default: {},
225
- displayOptions: {
226
- show: {
227
- resource: ['sdkExp'],
228
- operation: ['postSdkExp'],
229
- },
230
- },
231
- options: [
232
- {
233
- displayName: 'Upload Draft Interop Version',
234
- name: 'uploadDraftInteropVersion',
235
- type: 'string',
236
- default: '',
237
- description: 'upload-draft-interop-version',
238
- routing: {
239
- request: {
240
- headers: {
241
- 'upload-draft-interop-version': '={{$value}}',
242
- },
243
- },
244
- },
245
- },
246
- {
247
- displayName: 'Upload Complete',
248
- name: 'uploadComplete',
249
- type: 'string',
250
- default: '',
251
- description: 'upload-complete',
252
- routing: {
253
- request: {
254
- headers: {
255
- 'upload-complete': '={{$value}}',
256
- },
257
- },
258
- },
259
- },
260
- ],
261
- },
262
- ],
263
- };
264
- }
265
- }
266
- exports.HarToOpenApiNode = HarToOpenApiNode;