@voxgig/create-sdkgen 0.16.5 → 0.17.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voxgig/create-sdkgen",
3
- "version": "0.16.5",
3
+ "version": "0.17.0",
4
4
  "main": "dist/create-sdkgen.js",
5
5
  "type": "commonjs",
6
6
  "types": "dist/create-sdkgen.d.ts",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@voxgig/util": "0.5.4",
56
- "aontu": "0.48.2",
56
+ "aontu": "0.50.0",
57
57
  "chokidar": "5.0.0",
58
58
  "jostraca": "0.31.2",
59
59
  "shape": "10.1.3"
@@ -7,4 +7,20 @@ basic: set: [
7
7
  { ctx: { opname:remove }, out: DELETE }
8
8
 
9
9
  { ctx: { opname:bad } }
10
+
11
+ # The point's method comes from the API definition and wins over the
12
+ # op-name convention: POST-only APIs expose `update` and `remove` as POST,
13
+ # and PATCH-based APIs expose `update` as PATCH.
14
+ { ctx: { opname:update, point: { method: POST } }, out: POST }
15
+ { ctx: { opname:update, point: { method: PATCH } }, out: PATCH }
16
+ { ctx: { opname:remove, point: { method: POST } }, out: POST }
17
+ { ctx: { opname:load, point: { method: POST } }, out: POST }
18
+ { ctx: { opname:create, point: { method: POST } }, out: POST }
19
+
20
+ # A lowercase method is normalised to the canonical uppercase verb.
21
+ { ctx: { opname:update, point: { method: post } }, out: POST }
22
+
23
+ # No usable method on the point falls back to the op-name convention.
24
+ { ctx: { opname:update, point: { method: "" } }, out: PUT }
25
+ { ctx: { opname:remove, point: { } }, out: DELETE }
10
26
  ]
@@ -17375,6 +17375,76 @@
17375
17375
  "ctx": {
17376
17376
  "opname": "bad"
17377
17377
  }
17378
+ },
17379
+ {
17380
+ "ctx": {
17381
+ "opname": "update",
17382
+ "point": {
17383
+ "method": "POST"
17384
+ }
17385
+ },
17386
+ "out": "POST"
17387
+ },
17388
+ {
17389
+ "ctx": {
17390
+ "opname": "update",
17391
+ "point": {
17392
+ "method": "PATCH"
17393
+ }
17394
+ },
17395
+ "out": "PATCH"
17396
+ },
17397
+ {
17398
+ "ctx": {
17399
+ "opname": "remove",
17400
+ "point": {
17401
+ "method": "POST"
17402
+ }
17403
+ },
17404
+ "out": "POST"
17405
+ },
17406
+ {
17407
+ "ctx": {
17408
+ "opname": "load",
17409
+ "point": {
17410
+ "method": "POST"
17411
+ }
17412
+ },
17413
+ "out": "POST"
17414
+ },
17415
+ {
17416
+ "ctx": {
17417
+ "opname": "create",
17418
+ "point": {
17419
+ "method": "POST"
17420
+ }
17421
+ },
17422
+ "out": "POST"
17423
+ },
17424
+ {
17425
+ "ctx": {
17426
+ "opname": "update",
17427
+ "point": {
17428
+ "method": "post"
17429
+ }
17430
+ },
17431
+ "out": "POST"
17432
+ },
17433
+ {
17434
+ "ctx": {
17435
+ "opname": "update",
17436
+ "point": {
17437
+ "method": ""
17438
+ }
17439
+ },
17440
+ "out": "PUT"
17441
+ },
17442
+ {
17443
+ "ctx": {
17444
+ "opname": "remove",
17445
+ "point": {}
17446
+ },
17447
+ "out": "DELETE"
17378
17448
  }
17379
17449
  ]
17380
17450
  }
@@ -17846,4 +17916,4 @@
17846
17916
  }
17847
17917
  }
17848
17918
  }
17849
- }
17919
+ }