@voxgig/sdkgen 4.35.2 → 4.36.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.
Files changed (259) hide show
  1. package/bin/voxgig-sdkgen +1 -1
  2. package/dist/cmp/ReadmeTop.js +1 -1
  3. package/dist/cmp/ReadmeTop.js.map +1 -1
  4. package/dist/helpers/flowGuard.js +12 -1
  5. package/dist/helpers/flowGuard.js.map +1 -1
  6. package/dist/helpers/opExample.d.ts +4 -1
  7. package/dist/helpers/opExample.js +11 -1
  8. package/dist/helpers/opExample.js.map +1 -1
  9. package/dist/helpers/opShape.d.ts +2 -1
  10. package/dist/helpers/opShape.js +53 -26
  11. package/dist/helpers/opShape.js.map +1 -1
  12. package/dist/helpers/pointPath.d.ts +2 -1
  13. package/dist/helpers/pointPath.js +17 -0
  14. package/dist/helpers/pointPath.js.map +1 -1
  15. package/dist/helpers/testPolicy.d.ts +48 -2
  16. package/dist/helpers/testPolicy.js +265 -0
  17. package/dist/helpers/testPolicy.js.map +1 -1
  18. package/dist/sdkgen.d.ts +7 -7
  19. package/dist/sdkgen.js +26 -4
  20. package/dist/sdkgen.js.map +1 -1
  21. package/dist/tsconfig.tsbuildinfo +1 -1
  22. package/package.json +1 -1
  23. package/project/.sdk/src/cmp/c/PrepareAuth_c.ts +10 -4
  24. package/project/.sdk/src/cmp/c/ReadmeEntity_c.ts +2 -2
  25. package/project/.sdk/src/cmp/c/ReadmeHowto_c.ts +2 -2
  26. package/project/.sdk/src/cmp/c/ReadmeQuick_c.ts +6 -5
  27. package/project/.sdk/src/cmp/c/ReadmeRef_c.ts +3 -3
  28. package/project/.sdk/src/cmp/c/ReadmeTopQuick_c.ts +2 -2
  29. package/project/.sdk/src/cmp/c/ReadmeTopTest_c.ts +2 -2
  30. package/project/.sdk/src/cmp/c/TestDirect_c.ts +2 -6
  31. package/project/.sdk/src/cmp/clojure/ReadmeEntity_clojure.ts +2 -2
  32. package/project/.sdk/src/cmp/clojure/ReadmeHowto_clojure.ts +2 -2
  33. package/project/.sdk/src/cmp/clojure/ReadmeQuick_clojure.ts +4 -4
  34. package/project/.sdk/src/cmp/clojure/ReadmeRef_clojure.ts +3 -3
  35. package/project/.sdk/src/cmp/clojure/ReadmeTopQuick_clojure.ts +2 -2
  36. package/project/.sdk/src/cmp/clojure/ReadmeTopTest_clojure.ts +2 -2
  37. package/project/.sdk/src/cmp/cpp/ReadmeEntity_cpp.ts +2 -2
  38. package/project/.sdk/src/cmp/cpp/ReadmeHowto_cpp.ts +2 -2
  39. package/project/.sdk/src/cmp/cpp/ReadmeQuick_cpp.ts +4 -4
  40. package/project/.sdk/src/cmp/cpp/ReadmeRef_cpp.ts +3 -3
  41. package/project/.sdk/src/cmp/cpp/ReadmeTopQuick_cpp.ts +2 -2
  42. package/project/.sdk/src/cmp/cpp/ReadmeTopTest_cpp.ts +2 -2
  43. package/project/.sdk/src/cmp/cpp/TestDirect_cpp.ts +2 -6
  44. package/project/.sdk/src/cmp/cpp/TestEntity_cpp.ts +51 -3
  45. package/project/.sdk/src/cmp/csharp/ReadmeEntity_csharp.ts +2 -2
  46. package/project/.sdk/src/cmp/csharp/ReadmeHowto_csharp.ts +2 -2
  47. package/project/.sdk/src/cmp/csharp/ReadmeQuick_csharp.ts +5 -5
  48. package/project/.sdk/src/cmp/csharp/ReadmeRef_csharp.ts +3 -3
  49. package/project/.sdk/src/cmp/csharp/ReadmeTopQuick_csharp.ts +3 -3
  50. package/project/.sdk/src/cmp/csharp/ReadmeTopTest_csharp.ts +2 -2
  51. package/project/.sdk/src/cmp/csharp/TestDirect_csharp.ts +41 -19
  52. package/project/.sdk/src/cmp/csharp/TestEntity_csharp.ts +105 -27
  53. package/project/.sdk/src/cmp/elixir/ReadmeEntity_elixir.ts +2 -2
  54. package/project/.sdk/src/cmp/elixir/ReadmeHowto_elixir.ts +2 -2
  55. package/project/.sdk/src/cmp/elixir/ReadmeQuick_elixir.ts +4 -4
  56. package/project/.sdk/src/cmp/elixir/ReadmeRef_elixir.ts +3 -3
  57. package/project/.sdk/src/cmp/elixir/ReadmeTopQuick_elixir.ts +2 -2
  58. package/project/.sdk/src/cmp/elixir/ReadmeTopTest_elixir.ts +2 -2
  59. package/project/.sdk/src/cmp/go/EntityOperation_go.ts +2 -2
  60. package/project/.sdk/src/cmp/go/Entity_go.ts +4 -3
  61. package/project/.sdk/src/cmp/go/Main_go.ts +2 -2
  62. package/project/.sdk/src/cmp/go/PrepareAuth_go.ts +24 -15
  63. package/project/.sdk/src/cmp/go/ReadmeEntity_go.ts +2 -2
  64. package/project/.sdk/src/cmp/go/ReadmeHowto_go.ts +2 -2
  65. package/project/.sdk/src/cmp/go/ReadmeQuick_go.ts +4 -4
  66. package/project/.sdk/src/cmp/go/ReadmeRef_go.ts +3 -3
  67. package/project/.sdk/src/cmp/go/ReadmeTopTest_go.ts +2 -2
  68. package/project/.sdk/src/cmp/go/TestDirect_go.ts +61 -26
  69. package/project/.sdk/src/cmp/go/TestEntity_go.ts +115 -32
  70. package/project/.sdk/src/cmp/java/ReadmeEntity_java.ts +2 -2
  71. package/project/.sdk/src/cmp/java/ReadmeHowto_java.ts +2 -2
  72. package/project/.sdk/src/cmp/java/ReadmeQuick_java.ts +5 -5
  73. package/project/.sdk/src/cmp/java/ReadmeRef_java.ts +3 -3
  74. package/project/.sdk/src/cmp/java/ReadmeTopQuick_java.ts +3 -3
  75. package/project/.sdk/src/cmp/java/ReadmeTopTest_java.ts +2 -2
  76. package/project/.sdk/src/cmp/java/TestDirect_java.ts +40 -20
  77. package/project/.sdk/src/cmp/java/TestEntity_java.ts +107 -26
  78. package/project/.sdk/src/cmp/js/ReadmeEntity_js.ts +2 -2
  79. package/project/.sdk/src/cmp/js/ReadmeHowto_js.ts +2 -2
  80. package/project/.sdk/src/cmp/js/ReadmeQuick_js.ts +4 -4
  81. package/project/.sdk/src/cmp/js/ReadmeRef_js.ts +3 -3
  82. package/project/.sdk/src/cmp/js/ReadmeTopTest_js.ts +2 -2
  83. package/project/.sdk/src/cmp/js/TestDirect_js.ts +68 -13
  84. package/project/.sdk/src/cmp/js/TestEntity_js.ts +46 -4
  85. package/project/.sdk/src/cmp/kotlin/ReadmeEntity_kotlin.ts +2 -2
  86. package/project/.sdk/src/cmp/kotlin/ReadmeHowto_kotlin.ts +2 -2
  87. package/project/.sdk/src/cmp/kotlin/ReadmeQuick_kotlin.ts +5 -5
  88. package/project/.sdk/src/cmp/kotlin/ReadmeRef_kotlin.ts +3 -3
  89. package/project/.sdk/src/cmp/kotlin/ReadmeTopQuick_kotlin.ts +3 -3
  90. package/project/.sdk/src/cmp/kotlin/ReadmeTopTest_kotlin.ts +2 -2
  91. package/project/.sdk/src/cmp/kotlin/TestDirect_kotlin.ts +41 -21
  92. package/project/.sdk/src/cmp/kotlin/TestEntity_kotlin.ts +99 -22
  93. package/project/.sdk/src/cmp/lua/ReadmeEntity_lua.ts +2 -2
  94. package/project/.sdk/src/cmp/lua/ReadmeHowto_lua.ts +2 -2
  95. package/project/.sdk/src/cmp/lua/ReadmeQuick_lua.ts +4 -4
  96. package/project/.sdk/src/cmp/lua/ReadmeRef_lua.ts +3 -3
  97. package/project/.sdk/src/cmp/lua/ReadmeTopQuick_lua.ts +3 -3
  98. package/project/.sdk/src/cmp/lua/ReadmeTopTest_lua.ts +2 -2
  99. package/project/.sdk/src/cmp/lua/TestDirect_lua.ts +40 -16
  100. package/project/.sdk/src/cmp/lua/TestEntity_lua.ts +108 -30
  101. package/project/.sdk/src/cmp/ocaml/ReadmeEntity_ocaml.ts +2 -2
  102. package/project/.sdk/src/cmp/ocaml/ReadmeHowto_ocaml.ts +2 -2
  103. package/project/.sdk/src/cmp/ocaml/ReadmeQuick_ocaml.ts +4 -4
  104. package/project/.sdk/src/cmp/ocaml/ReadmeRef_ocaml.ts +3 -3
  105. package/project/.sdk/src/cmp/ocaml/ReadmeTopQuick_ocaml.ts +2 -2
  106. package/project/.sdk/src/cmp/ocaml/ReadmeTopTest_ocaml.ts +2 -2
  107. package/project/.sdk/src/cmp/perl/ReadmeEntity_perl.ts +2 -2
  108. package/project/.sdk/src/cmp/perl/ReadmeHowto_perl.ts +2 -2
  109. package/project/.sdk/src/cmp/perl/ReadmeQuick_perl.ts +4 -4
  110. package/project/.sdk/src/cmp/perl/ReadmeRef_perl.ts +3 -3
  111. package/project/.sdk/src/cmp/perl/ReadmeTopQuick_perl.ts +2 -2
  112. package/project/.sdk/src/cmp/perl/ReadmeTopTest_perl.ts +2 -2
  113. package/project/.sdk/src/cmp/perl/TestDirect_perl.ts +35 -16
  114. package/project/.sdk/src/cmp/perl/TestEntity_perl.ts +98 -22
  115. package/project/.sdk/src/cmp/php/ReadmeEntity_php.ts +2 -2
  116. package/project/.sdk/src/cmp/php/ReadmeHowto_php.ts +2 -2
  117. package/project/.sdk/src/cmp/php/ReadmeQuick_php.ts +4 -4
  118. package/project/.sdk/src/cmp/php/ReadmeRef_php.ts +3 -3
  119. package/project/.sdk/src/cmp/php/ReadmeTopQuick_php.ts +2 -2
  120. package/project/.sdk/src/cmp/php/ReadmeTopTest_php.ts +2 -2
  121. package/project/.sdk/src/cmp/php/TestDirect_php.ts +33 -16
  122. package/project/.sdk/src/cmp/php/TestEntity_php.ts +98 -29
  123. package/project/.sdk/src/cmp/py/ReadmeEntity_py.ts +2 -2
  124. package/project/.sdk/src/cmp/py/ReadmeHowto_py.ts +2 -2
  125. package/project/.sdk/src/cmp/py/ReadmeQuick_py.ts +4 -4
  126. package/project/.sdk/src/cmp/py/ReadmeRef_py.ts +3 -3
  127. package/project/.sdk/src/cmp/py/ReadmeTopQuick_py.ts +2 -2
  128. package/project/.sdk/src/cmp/py/ReadmeTopTest_py.ts +2 -2
  129. package/project/.sdk/src/cmp/py/TestDirect_py.ts +39 -16
  130. package/project/.sdk/src/cmp/py/TestEntity_py.ts +90 -27
  131. package/project/.sdk/src/cmp/rb/ReadmeEntity_rb.ts +2 -2
  132. package/project/.sdk/src/cmp/rb/ReadmeHowto_rb.ts +2 -2
  133. package/project/.sdk/src/cmp/rb/ReadmeQuick_rb.ts +4 -4
  134. package/project/.sdk/src/cmp/rb/ReadmeRef_rb.ts +3 -3
  135. package/project/.sdk/src/cmp/rb/ReadmeTopQuick_rb.ts +2 -2
  136. package/project/.sdk/src/cmp/rb/ReadmeTopTest_rb.ts +2 -2
  137. package/project/.sdk/src/cmp/rb/TestClean_rb.ts +1 -1
  138. package/project/.sdk/src/cmp/rb/TestDirect_rb.ts +33 -16
  139. package/project/.sdk/src/cmp/rb/TestEntity_rb.ts +90 -25
  140. package/project/.sdk/src/cmp/rb/fragment/Main.fragment.rb +3 -3
  141. package/project/.sdk/src/cmp/rust/ReadmeEntity_rust.ts +2 -2
  142. package/project/.sdk/src/cmp/rust/ReadmeHowto_rust.ts +2 -2
  143. package/project/.sdk/src/cmp/rust/ReadmeQuick_rust.ts +4 -4
  144. package/project/.sdk/src/cmp/rust/ReadmeRef_rust.ts +3 -3
  145. package/project/.sdk/src/cmp/rust/ReadmeTopQuick_rust.ts +2 -2
  146. package/project/.sdk/src/cmp/rust/ReadmeTopTest_rust.ts +2 -2
  147. package/project/.sdk/src/cmp/rust/TestDirect_rust.ts +40 -12
  148. package/project/.sdk/src/cmp/rust/TestEntity_rust.ts +108 -25
  149. package/project/.sdk/src/cmp/scala/ReadmeEntity_scala.ts +2 -2
  150. package/project/.sdk/src/cmp/scala/ReadmeHowto_scala.ts +2 -2
  151. package/project/.sdk/src/cmp/scala/ReadmeQuick_scala.ts +5 -5
  152. package/project/.sdk/src/cmp/scala/ReadmeRef_scala.ts +3 -3
  153. package/project/.sdk/src/cmp/scala/ReadmeTopQuick_scala.ts +3 -3
  154. package/project/.sdk/src/cmp/scala/ReadmeTopTest_scala.ts +2 -2
  155. package/project/.sdk/src/cmp/scala/TestDirect_scala.ts +2 -6
  156. package/project/.sdk/src/cmp/scala/TestEntity_scala.ts +36 -7
  157. package/project/.sdk/src/cmp/swift/ReadmeEntity_swift.ts +2 -2
  158. package/project/.sdk/src/cmp/swift/ReadmeHowto_swift.ts +2 -2
  159. package/project/.sdk/src/cmp/swift/ReadmeQuick_swift.ts +5 -5
  160. package/project/.sdk/src/cmp/swift/ReadmeRef_swift.ts +3 -3
  161. package/project/.sdk/src/cmp/swift/ReadmeTopQuick_swift.ts +2 -2
  162. package/project/.sdk/src/cmp/swift/ReadmeTopTest_swift.ts +2 -2
  163. package/project/.sdk/src/cmp/ts/ReadmeEntity_ts.ts +2 -2
  164. package/project/.sdk/src/cmp/ts/ReadmeExamplesTest_ts.ts +49 -19
  165. package/project/.sdk/src/cmp/ts/ReadmeHowto_ts.ts +2 -2
  166. package/project/.sdk/src/cmp/ts/ReadmeQuick_ts.ts +4 -4
  167. package/project/.sdk/src/cmp/ts/ReadmeRef_ts.ts +3 -3
  168. package/project/.sdk/src/cmp/ts/ReadmeTopTest_ts.ts +3 -3
  169. package/project/.sdk/src/cmp/ts/TestDirect_ts.ts +54 -23
  170. package/project/.sdk/src/cmp/ts/TestEntity_ts.ts +49 -4
  171. package/project/.sdk/src/cmp/zig/ReadmeEntity_zig.ts +2 -2
  172. package/project/.sdk/src/cmp/zig/ReadmeHowto_zig.ts +2 -2
  173. package/project/.sdk/src/cmp/zig/ReadmeQuick_zig.ts +4 -4
  174. package/project/.sdk/src/cmp/zig/ReadmeRef_zig.ts +3 -3
  175. package/project/.sdk/src/cmp/zig/ReadmeTopQuick_zig.ts +2 -2
  176. package/project/.sdk/src/cmp/zig/ReadmeTopTest_zig.ts +2 -2
  177. package/project/.sdk/tm/c/tests/primary_utility_test.c +37 -0
  178. package/project/.sdk/tm/c/utility/fetcher.c +31 -1
  179. package/project/.sdk/tm/c/utility/make_url.c +6 -2
  180. package/project/.sdk/tm/clojure/src/sdk/core.clj +21 -3
  181. package/project/.sdk/tm/clojure/test/sdk/test/pipeline.clj +34 -0
  182. package/project/.sdk/tm/cpp/test/primary_utility_test.cpp +37 -0
  183. package/project/.sdk/tm/cpp/utility/pipeline.hpp +28 -2
  184. package/project/.sdk/tm/csharp/test/PrimaryUtilityTest.cs +40 -0
  185. package/project/.sdk/tm/csharp/utility/Fetcher.cs +27 -0
  186. package/project/.sdk/tm/csharp/utility/MakeUrl.cs +7 -2
  187. package/project/.sdk/tm/elixir/lib/projectname/utility.ex +30 -3
  188. package/project/.sdk/tm/elixir/test/pipeline_test.exs +23 -0
  189. package/project/.sdk/tm/go/test/feature_corpus_test.go +3 -4
  190. package/project/.sdk/tm/go/test/primary_utility_test.go +28 -0
  191. package/project/.sdk/tm/go/utility/fetcher.go +26 -0
  192. package/project/.sdk/tm/go/utility/make_url.go +5 -2
  193. package/project/.sdk/tm/java/test/FeatureCorpusTest.java +4 -5
  194. package/project/.sdk/tm/java/test/PrimaryUtilityTest.java +49 -0
  195. package/project/.sdk/tm/java/utility/Fetcher.java +24 -0
  196. package/project/.sdk/tm/java/utility/MakeUrl.java +6 -2
  197. package/project/.sdk/tm/js/src/utility/FetcherUtility.js +24 -0
  198. package/project/.sdk/tm/js/src/utility/MakeUrlUtility.js +6 -2
  199. package/project/.sdk/tm/js/test/feature/Corpus.test.js +7 -6
  200. package/project/.sdk/tm/js/test/live-entity.js +18 -6
  201. package/project/.sdk/tm/js/test/live-runner.js +15 -3
  202. package/project/.sdk/tm/js/test/utility/PrimaryUtility.test.js +25 -0
  203. package/project/.sdk/tm/kotlin/test/PrimaryUtilityTest.kt +48 -0
  204. package/project/.sdk/tm/kotlin/utility/Fetcher.kt +20 -0
  205. package/project/.sdk/tm/kotlin/utility/MakeSpecUrl.kt +6 -2
  206. package/project/.sdk/tm/lua/test/pipeline_test.lua +27 -0
  207. package/project/.sdk/tm/lua/test/primary_utility_test.lua +36 -0
  208. package/project/.sdk/tm/lua/utility/fetcher.lua +31 -0
  209. package/project/.sdk/tm/lua/utility/make_url.lua +6 -2
  210. package/project/.sdk/tm/ocaml/Makefile +5 -1
  211. package/project/.sdk/tm/ocaml/sdk_runtime.ml +36 -4
  212. package/project/.sdk/tm/ocaml/test/t_pipeline.ml +22 -0
  213. package/project/.sdk/tm/perl/t/primary_utility.t +22 -0
  214. package/project/.sdk/tm/perl/utility/fetcher.pm +18 -0
  215. package/project/.sdk/tm/perl/utility/make_url.pm +4 -2
  216. package/project/.sdk/tm/php/test/FeatureCorpusTest.php +6 -5
  217. package/project/.sdk/tm/php/test/PipelineTest.php +31 -7
  218. package/project/.sdk/tm/php/utility/Fetcher.php +34 -27
  219. package/project/.sdk/tm/php/utility/MakeOptions.php +2 -1
  220. package/project/.sdk/tm/php/utility/MakeUrl.php +6 -2
  221. package/project/.sdk/tm/py/pkg/utility/fetcher.py +23 -0
  222. package/project/.sdk/tm/py/pkg/utility/make_url.py +5 -2
  223. package/project/.sdk/tm/py/test/test_feature_corpus.py +5 -5
  224. package/project/.sdk/tm/py/test/test_primary_utility.py +21 -0
  225. package/project/.sdk/tm/rb/core/context.rb +1 -1
  226. package/project/.sdk/tm/rb/core/error.rb +20 -1
  227. package/project/.sdk/tm/rb/test/feature_corpus_test.rb +4 -5
  228. package/project/.sdk/tm/rb/test/feature_test.rb +2 -2
  229. package/project/.sdk/tm/rb/test/omni.rb +1 -1
  230. package/project/.sdk/tm/rb/test/pipeline_test.rb +19 -2
  231. package/project/.sdk/tm/rb/test/primary_utility_test.rb +28 -1
  232. package/project/.sdk/tm/rb/utility/fetcher.rb +20 -1
  233. package/project/.sdk/tm/rb/utility/make_error.rb +1 -1
  234. package/project/.sdk/tm/rb/utility/make_url.rb +4 -2
  235. package/project/.sdk/tm/rust/tests/primary_utility_test.rs +34 -0
  236. package/project/.sdk/tm/rust/utility/fetcher.rs +27 -0
  237. package/project/.sdk/tm/rust/utility/make_url.rs +7 -2
  238. package/project/.sdk/tm/scala/sdktest/SdkTestMain.scala +51 -1
  239. package/project/.sdk/tm/scala/utility/Fetcher.scala +16 -0
  240. package/project/.sdk/tm/scala/utility/Make.scala +6 -2
  241. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Fetcher.swift +24 -0
  242. package/project/.sdk/tm/swift/Sources/ProjectNameSDK/utility/Make.swift +6 -2
  243. package/project/.sdk/tm/swift/Tests/ProjectNameSDKTests/PrimaryUtilityTest.swift +34 -0
  244. package/project/.sdk/tm/ts/src/utility/FetcherUtility.ts +24 -0
  245. package/project/.sdk/tm/ts/src/utility/MakeUrlUtility.ts +6 -2
  246. package/project/.sdk/tm/ts/test/feature/Corpus.test.ts +7 -6
  247. package/project/.sdk/tm/ts/test/live-entity.ts +20 -5
  248. package/project/.sdk/tm/ts/test/live-runner.ts +17 -3
  249. package/project/.sdk/tm/ts/test/utility/PrimaryUtility.test.ts +25 -0
  250. package/project/.sdk/tm/zig/core/utility.zig +30 -3
  251. package/project/.sdk/tm/zig/test/primary_utility_test.zig +28 -0
  252. package/project/sdkgen-package.json +1 -1
  253. package/src/cmp/ReadmeTop.ts +3 -3
  254. package/src/helpers/flowGuard.ts +12 -1
  255. package/src/helpers/opExample.ts +16 -1
  256. package/src/helpers/opShape.ts +64 -30
  257. package/src/helpers/pointPath.ts +19 -0
  258. package/src/helpers/testPolicy.ts +316 -2
  259. package/src/sdkgen.ts +37 -5
@@ -31,6 +31,9 @@ import {
31
31
  phpEntityAccessor,
32
32
  invalidRequest,
33
33
  liveFlowNeeds, liveStrict, liveStrictNote,
34
+ liveRouteExamples, liveStepExamples, flowLoadRoute, flowLoadReadsRecord,
35
+ liveGetOnly, liveExcludedLines, liveExcludedSummary, LIVE_GETONLY_ENV,
36
+ liveEntity,
34
37
  } from '@voxgig/sdkgen'
35
38
 
36
39
  import { formatPhpValue } from './utility_php'
@@ -61,7 +64,9 @@ function liveFlowGate(entity: any, needs: any, entidEnv: string, accessor: strin
61
64
  out += ' $client = $setup["client"];\n'
62
65
  if (null != needs.discover) {
63
66
  const match = Object.entries(needs.discover)
64
- .map(([k, v]: any) => `${JSON.stringify(k)} => $setup["idmap"][${JSON.stringify(v)}] ?? null`).join(', ')
67
+ .map(([k, v]: any) => `${JSON.stringify(k)} => $setup["idmap"][${JSON.stringify(v)}] ?? null`)
68
+ .concat(liveRouteExamples(entity, 'list', Object.keys(needs.discover))
69
+ .map(([k, ex]) => `${JSON.stringify(k)} => ${formatPhpValue(ex)}`)).join(', ')
65
70
  out += ` if (!empty($setup["live"])) {
66
71
  Runner::live_existing($setup, self::LIVE_STRICT, ${JSON.stringify(entity.name)},
67
72
  fn() => $client->${accessor}(null)->list([${match}], null));
@@ -91,7 +96,7 @@ const TestEntity = cmp(function TestEntity(props: any) {
91
96
  const model: Model = ctx$.model
92
97
 
93
98
  const target = props.target
94
- const entity: ModelEntity = props.entity
99
+ const entity: ModelEntity = liveEntity(ctx$, props.entity)
95
100
 
96
101
  // The stream test streams the "list" op with no match and asserts a 3-item
97
102
  // collection, so it only applies to an entity whose list a bare call can
@@ -144,7 +149,6 @@ const TestEntity = cmp(function TestEntity(props: any) {
144
149
  const genCtx: GenCtx = { model, entity, flow: basicflow, PROJUPPER, accessor }
145
150
 
146
151
  const strict = liveStrict(model, target.name)
147
- const needs = liveFlowNeeds(entity, basicflow)
148
152
  const entidEnv = PROJUPPER + '_TEST_' + envToken(entity.name) + '_ENTID'
149
153
 
150
154
  File({ name: entity.Name + 'EntityTest.' + target.ext }, () => {
@@ -223,13 +227,16 @@ ${failureTests(model, entity, accessor)}${validateListTest(model, entity, access
223
227
  return;
224
228
  }
225
229
  }
226
- ${liveFlowGate(entity, needs, entidEnv, accessor, strict)}
227
230
  `)
228
231
 
229
- // Check if the flow has a create step
230
- const flowHasCreate = allSteps.some((s: any) => s.o === 'create')
231
- if (!flowHasCreate) {
232
- Content(` // Bootstrap entity data from existing test data.
232
+ const flowBody = (flow: any) => {
233
+ const steps = flowSteps(flow) as any[]
234
+ Content(liveFlowGate(entity, liveFlowNeeds(entity, flow), entidEnv, accessor, strict) + '\n')
235
+
236
+ // Check if the flow has a create step
237
+ const flowHasCreate = steps.some((s: any) => s.o === 'create')
238
+ if (!flowHasCreate) {
239
+ Content(` // Bootstrap entity data from existing test data.
233
240
  $${entity.name}_ref01_data_raw = Vs::items(Helpers::to_map(
234
241
  Vs::getpath($setup["data"], "existing.${entity.name}")));
235
242
  $${entity.name}_ref01_data = null;
@@ -237,30 +244,55 @@ ${liveFlowGate(entity, needs, entidEnv, accessor, strict)}
237
244
  $${entity.name}_ref01_data = Helpers::to_map($${entity.name}_ref01_data_raw[0][1]);
238
245
  }
239
246
 
247
+ `)
248
+ }
249
+
250
+ // Model-driven step iteration
251
+ each(steps, (step: any, index: any) => {
252
+ // Never emit a REMOVE (or its removed-item verify LIST) without a
253
+ // preceding CREATE: a coherent CRUD flow only removes what it created,
254
+ // so a create-less remove would mutate pre-existing (live) data.
255
+ if (!flowHasCreate) {
256
+ if ('remove' === step.o) { return }
257
+ if ('list' === step.o &&
258
+ (step.v || []).some((v: any) => 'ItemNotExists' === v.apply)) { return }
259
+ }
260
+ const opgen: OpGen = GENERATE_OP[step.o]
261
+ if (opgen) {
262
+ opgen({ ...genCtx, flow }, step, index)
263
+ Content('\n')
264
+ }
265
+ })
266
+
267
+ Content(strict ? '' : ` } catch (\\Throwable $e) {
268
+ Runner::live_observe($e, $setup, self::LIVE_STRICT);
269
+ }
240
270
  `)
241
271
  }
242
272
 
243
- // Model-driven step iteration
244
- each(flowSteps(basicflow), (step: any, index: any) => {
245
- // Never emit a REMOVE (or its removed-item verify LIST) without a
246
- // preceding CREATE: a coherent CRUD flow only removes what it created,
247
- // so a create-less remove would mutate pre-existing (live) data.
248
- if (!flowHasCreate) {
249
- if ('remove' === step.o) { return }
250
- if ('list' === step.o &&
251
- (step.v || []).some((v: any) => 'ItemNotExists' === v.apply)) { return }
273
+ const getOnly = liveGetOnly(entity, basicflow)
274
+ if (null != getOnly) {
275
+ Content(` if (!empty($setup["live"]) && getenv(${formatPhpValue(LIVE_GETONLY_ENV)}) === "TRUE") {
276
+ ${liveExcludedLines(getOnly).map((line) =>
277
+ ' fwrite(STDOUT, ' + formatPhpValue(line) + ' . "\\n");\n').join('')}`)
278
+ if (0 === flowSteps(getOnly.flow).length) {
279
+ Content(` $this->markTestSkipped(${formatPhpValue(liveExcludedSummary(getOnly))});
280
+ }
281
+
282
+ `)
252
283
  }
253
- const opgen: OpGen = GENERATE_OP[step.o]
254
- if (opgen) {
255
- opgen(genCtx, step, index)
256
- Content('\n')
284
+ else {
285
+ flowBody(getOnly.flow)
286
+ Content(` return;
287
+ }
288
+
289
+ `)
257
290
  }
258
- })
291
+ }
259
292
 
260
- Content(`${strict ? '' : ` } catch (\\Throwable $e) {
261
- Runner::live_observe($e, $setup, self::LIVE_STRICT);
262
- }
263
- `} }
293
+ flowBody(basicflow)
294
+
295
+ Content(` }
264
296
  }
265
297
 
266
298
  `)
@@ -445,6 +477,7 @@ const generateList: OpGen = (ctx, step, index) => {
445
477
  Content(` ];
446
478
  `)
447
479
  }
480
+ Content(liveFill(entity, step, matchvar))
448
481
 
449
482
  Content(`
450
483
  $${listvar}_result = $${entvar}->list($${matchvar}, null);
@@ -587,7 +620,7 @@ const generateLoad: OpGen = (ctx, step, index) => {
587
620
  Content(` $${entvar} = $client->${accessor}(null);
588
621
  `)
589
622
  }
590
- if (!hasSrcData && hasEntId) {
623
+ if (!hasSrcData && (hasEntId || flowLoadReadsRecord(entity, step))) {
591
624
  Content(` $${srcdatavar}_raw = Vs::items(Helpers::to_map(
592
625
  Vs::getpath($setup["data"], "existing.${entity.name}")));
593
626
  $${srcdatavar} = null;
@@ -600,7 +633,7 @@ const generateLoad: OpGen = (ctx, step, index) => {
600
633
  Content(` $${matchvar} = [
601
634
  "id" => $${srcdatavar}["id"],
602
635
  ];
603
- ${parentMatch(step, matchvar)} $${datavar}_loaded = $${entvar}->load($${matchvar}, null);
636
+ ${loadMatch(entity, step, matchvar, srcdatavar)}${liveFill(entity, step, matchvar)} $${datavar}_loaded = $${entvar}->load($${matchvar}, null);
604
637
  $${datavar}_load_result = Helpers::to_map(is_object($${datavar}_loaded) && method_exists($${datavar}_loaded, 'data_get') ? $${datavar}_loaded->data_get() : $${datavar}_loaded);
605
638
  $this->assertNotNull($${datavar}_load_result);
606
639
  $this->assertEquals($${datavar}_load_result["id"], $${srcdatavar}["id"]);
@@ -608,7 +641,7 @@ ${parentMatch(step, matchvar)} $${datavar}_loaded = $${entvar}->load($${m
608
641
  }
609
642
  else {
610
643
  Content(` $${matchvar} = [];
611
- ${parentMatch(step, matchvar)} $${datavar}_loaded = $${entvar}->load($${matchvar}, null);
644
+ ${loadMatch(entity, step, matchvar, srcdatavar)}${liveFill(entity, step, matchvar)} $${datavar}_loaded = $${entvar}->load($${matchvar}, null);
612
645
  $this->assertNotNull($${datavar}_loaded);
613
646
  `)
614
647
  }
@@ -648,6 +681,15 @@ ${parentMatch(step, matchvar)} $${entvar}->remove($${matchvar}, null);
648
681
  // A child's route names its parents, and an entity no earlier step has
649
682
  // filled knows none of them, so the call itself gives each parent id. A live
650
683
  // ENTID may key a parent by its field name, the fixture by its own name.
684
+ // A live step sends each example its route requires and the step leaves unbound.
685
+ function liveFill(entity: any, step: any, matchvar: string): string {
686
+ const fills = liveStepExamples(entity, step)
687
+ return 0 === fills.length ? '' : ` if (!empty($setup["live"])) {
688
+ ${fills.map(([k, ex]) => ` $${matchvar}[${JSON.stringify(k)}] = ${formatPhpValue(ex)};\n`).join('')} }
689
+ `
690
+ }
691
+
692
+
651
693
  function parentMatch(step: any, matchvar: string): string {
652
694
  return Object.entries(step.m || {})
653
695
  .filter(([k]: any) => k !== 'id' && !k.endsWith('$'))
@@ -655,6 +697,33 @@ function parentMatch(step: any, matchvar: string): string {
655
697
  `).join('')
656
698
  }
657
699
 
700
+ // A load of a known record fills its route from that record, and from the
701
+ // step's binding where the record holds no scalar for it. A record only the
702
+ // fixture holds replaces the step's binding offline.
703
+ function loadMatch(entity: any, step: any, matchvar: string, srcdatavar: string): string {
704
+ const route = flowLoadRoute(entity, step)
705
+ if (null == route) {
706
+ return parentMatch(step, matchvar)
707
+ }
708
+ if (route.offline) {
709
+ const own = route.args.filter((arg) => null != arg.field)
710
+ return parentMatch(step, matchvar) + (0 === own.length ? '' : ` if (empty($setup["live"])) {
711
+ ${own.map((arg) => ` if (is_scalar($${srcdatavar}["${arg.field}"] ?? null)) {
712
+ $${matchvar}["${arg.name}"] = $${srcdatavar}["${arg.field}"];
713
+ }
714
+ `).join('')} }
715
+ `)
716
+ }
717
+ return route.args.map((arg) => {
718
+ const bound = arg.idmap.map((key) => `$setup["idmap"]["${key}"]`).join(' ?? ') + ' ?? null'
719
+ const own = `$${srcdatavar}["${arg.field}"]`
720
+ return ` $${matchvar}["${arg.name}"] = ${null == arg.field ? bound :
721
+ `is_scalar(${own} ?? null) ? ${own} : (${bound})`};
722
+ `
723
+ }).join('')
724
+ }
725
+
726
+
658
727
  const GENERATE_OP: Record<string, OpGen> = {
659
728
  create: generateCreate,
660
729
  list: generateList,
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, each, Content, canonToType, canonKey, canonScalarKey, entityIdField, opRequestShape, safeVarName, exampleVarName, opNeedsAction, listMatchArg, matchExampleItems, litString } from '@voxgig/sdkgen'
2
+ import { cmp, each, Content, canonToType, canonKey, canonScalarKey, entityIdField, safeVarName, exampleVarName, opNeedsAction, listMatchArg, matchExampleItems, litString, requestExampleItems } from '@voxgig/sdkgen'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -145,7 +145,7 @@ ${eVar}s = client.${entity.Name}().list(${listMatchArg('py', entity)})
145
145
  // required id and parent keys like page_id — with a real, executable
146
146
  // literal (the doc test RUNS this block, so a comment placeholder
147
147
  // would break it).
148
- const createItems = opRequestShape(entity, 'create').items
148
+ const createItems = requestExampleItems(entity, 'create')
149
149
  .filter((it: any) => !it.optional)
150
150
  Content(`#### Example: Create
151
151
 
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, pickExampleEntity, opRequestShape, safeVarName, exampleVarName, requiredItems, litPair, matchExampleItems } from '@voxgig/sdkgen'
2
+ import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, pickExampleEntity, safeVarName, exampleVarName, requiredItems, litPair, matchExampleItems, requestExampleItems } from '@voxgig/sdkgen'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -41,7 +41,7 @@ const ReadmeHowto = cmp(function ReadmeHowto(props: any) {
41
41
  ? `{${items.map((it: any) => litPair('py', it.name, isMatchOp && it.name === idF ? '"test01"' : pyLit(it.type))).join(', ')}}`
42
42
  : ''
43
43
  } else if (exampleEntity && ('create' === primaryOp || 'update' === primaryOp || 'patch' === primaryOp)) {
44
- const items = opRequestShape(exampleEntity, primaryOp).items
44
+ const items = requestExampleItems(exampleEntity, primaryOp)
45
45
  .filter((it: any) => it.name !== idF && it.name !== 'id')
46
46
  const required = items.filter((it: any) => !it.optional)
47
47
  const chosen = required.length ? required : items.slice(0, 3)
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, each, Content, isAuthActive, envName, canonKey, canonScalarKey, opRequestShape, entityIdField, entityDataIdField, entityOps, safeVarName, exampleVarName, serverVariables, listMatchArg, matchExampleItems, requiredItems, litString } from '@voxgig/sdkgen'
2
+ import { cmp, each, Content, isAuthActive, envName, canonKey, canonScalarKey, opRequestShape, entityIdField, entityDataIdField, entityOps, safeVarName, exampleVarName, serverVariables, listMatchArg, matchExampleItems, requiredItems, litString, requestExampleItems, sendsId } from '@voxgig/sdkgen'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -152,7 +152,7 @@ except Exception as err:
152
152
  }
153
153
 
154
154
  const examplePairs = (opname: string): string[] => {
155
- const items = opRequestShape(exampleEntity, opname).items
155
+ const items = requestExampleItems(exampleEntity, opname)
156
156
  .filter((it: any) => (it.name !== idF && it.name !== 'id') ||
157
157
  ('create' === opname && !it.optional))
158
158
  const required = items.filter((it: any) => !it.optional)
@@ -187,7 +187,7 @@ created = client.${eName}().create({${examplePairs('create').join(', ')}})
187
187
  `)
188
188
  }
189
189
  if (opnames.includes('update')) {
190
- const updatePairs = (idF ? [`${litString('py', idF)}: ${idValueFor('update')}`] : []).concat(examplePairs('update'))
190
+ const updatePairs = (sendsId(exampleEntity, 'update', idF) ? [`${litString('py', idF)}: ${idValueFor('update')}`] : []).concat(examplePairs('update'))
191
191
  const fromCreated = null != dataIdF && opnames.includes('create')
192
192
  Content(`# Update${fromCreated ? " — the created entity's record holds its id" : ''}
193
193
  client.${eName}().update({${updatePairs.join(', ')}})
@@ -195,7 +195,7 @@ client.${eName}().update({${updatePairs.join(', ')}})
195
195
  `)
196
196
  }
197
197
  if (opnames.includes('patch')) {
198
- const patchPairs = (idF ? [`${litString('py', idF)}: ${idValueFor('patch')}`] : []).concat(examplePairs('patch'))
198
+ const patchPairs = (sendsId(exampleEntity, 'patch', idF) ? [`${litString('py', idF)}: ${idValueFor('patch')}`] : []).concat(examplePairs('patch'))
199
199
  Content(`# Patch — sends only the fields given
200
200
  client.${eName}().patch({${patchPairs.join(', ')}})
201
201
 
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, each, Content, canonToType, canonKey, canonScalarKey, File, isAuthActive, entityIdField, opRequestShape, safeVarName, exampleVarName, targetFeatures, opNeedsAction, bodyNote, listMatchArg, entityClassName, entityCollection, matchExampleItems, litString } from '@voxgig/sdkgen'
2
+ import { cmp, each, Content, canonToType, canonKey, canonScalarKey, File, isAuthActive, entityIdField, safeVarName, exampleVarName, targetFeatures, opNeedsAction, bodyNote, listMatchArg, entityClassName, entityCollection, matchExampleItems, litString, requestExampleItems } from '@voxgig/sdkgen'
3
3
  import { ReadmeRefFeatures } from '@voxgig/sdkgen'
4
4
 
5
5
  import {
@@ -295,7 +295,7 @@ for ${eVar} in results:
295
295
  // a required id and parent keys like page_id — with a real,
296
296
  // executable literal (the doc test RUNS this block, so a comment
297
297
  // placeholder would break it).
298
- const createItems = opRequestShape(ent, 'create').items
298
+ const createItems = requestExampleItems(ent, 'create')
299
299
  .filter((it: any) => !it.optional)
300
300
  Content(`\`\`\`python
301
301
  result = client.${ent.Name}().create({
@@ -312,7 +312,7 @@ result = client.${ent.Name}().create({
312
312
  else if ('update' === opname || 'patch' === opname) {
313
313
  // The id key plus every REQUIRED data member — the same shape the
314
314
  // runtime validates — then the patch-fields note.
315
- const updateItems = opRequestShape(ent, opname).items
315
+ const updateItems = requestExampleItems(ent, opname)
316
316
  .filter((it: any) => !it.optional || it.name === idF)
317
317
  .sort((a: any, b: any) =>
318
318
  (a.name === idF ? 0 : 1) - (b.name === idF ? 0 : 1))
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, safeVarName, exampleVarName, serverVariables, listMatchArg, matchExampleItems, litString } from '@voxgig/sdkgen'
2
+ import { cmp, Content, isAuthActive, envName, canonKey, canonScalarKey, entityIdField, opRequestShape, safeVarName, exampleVarName, serverVariables, listMatchArg, matchExampleItems, litString, entityOps } from '@voxgig/sdkgen'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -57,7 +57,7 @@ client = ${ctor}
57
57
  // Sanitise the local variable name — an entity whose lowercased name is a
58
58
  // Python keyword (e.g. `class`) would otherwise emit uncompilable code.
59
59
  const eVar = exampleVarName(eName.toLowerCase(), 'py')
60
- const opnames = Object.keys(exampleEntity.op || {})
60
+ const opnames = entityOps(exampleEntity)
61
61
  const idF = entityIdField(exampleEntity)
62
62
 
63
63
  let hasCall = false
@@ -1,5 +1,5 @@
1
1
 
2
- import { cmp, Content, canonKey, canonScalarKey, entityIdField, pickExampleEntity, opRequestShape, safeVarName, exampleVarName, requiredItems, litPair, matchExampleItems } from '@voxgig/sdkgen'
2
+ import { cmp, Content, canonKey, canonScalarKey, entityIdField, pickExampleEntity, safeVarName, exampleVarName, requiredItems, litPair, matchExampleItems, requestExampleItems } from '@voxgig/sdkgen'
3
3
 
4
4
  import {
5
5
  KIT,
@@ -49,7 +49,7 @@ client = ${model.const.Name}SDK.test()
49
49
  litPair('py', it.name, isMatchOp && it.name === idF ? '"test01"' : pyLit(it.type))).join(', ')}}`
50
50
  : ''
51
51
  } else if ('create' === primaryOp || 'update' === primaryOp || 'patch' === primaryOp) {
52
- const items = opRequestShape(exampleEntity, primaryOp).items
52
+ const items = requestExampleItems(exampleEntity, primaryOp)
53
53
  .filter((it: any) => it.name !== idF && it.name !== 'id')
54
54
  const required = items.filter((it: any) => !it.optional)
55
55
  const chosen = required.length ? required : items.slice(0, 3)
@@ -15,10 +15,15 @@ import {
15
15
  serverVarEnv,
16
16
  serverVariables, envName, envToken,
17
17
  pointParts,
18
+ pointPlaceholders,
18
19
  liveStrict,
19
20
  liveStrictNote,
20
21
  pointIsGraphql,
21
22
  graphqlDirectSkip,
23
+ liveExampleIds,
24
+ liveQueryExamples,
25
+ liveEntity,
26
+ liveDirectGetOnly, liveExcludedLines, liveExcludedSummary, LIVE_GETONLY_ENV,
22
27
  } from '@voxgig/sdkgen'
23
28
 
24
29
 
@@ -61,6 +66,17 @@ function normalizePathParams(
61
66
 
62
67
 
63
68
  // Blocked without the ids its request needs, rather than sent with None.
69
+ // A GET-only live run excludes a test needing an id that only a write gives.
70
+ function getOnlyKeysBlock(model: any, entity: any, test: string, keys: string[]): string {
71
+ return liveDirectGetOnly(model, entity, test, keys).map((miss) =>
72
+ ` if setup["live"] and os.environ.get(${JSON.stringify(LIVE_GETONLY_ENV)}) == "TRUE" and setup["idmap"].get(${JSON.stringify(miss.key)}) is None:
73
+ print(${JSON.stringify(liveExcludedLines({ excluded: [miss] })[0])})
74
+ pytest.skip(${JSON.stringify(liveExcludedSummary({ excluded: [miss] }))})
75
+
76
+ `).join('')
77
+ }
78
+
79
+
64
80
  function liveKeysBlock(keys: string[], entidEnvVar: string): string {
65
81
  return 0 === keys.length ? '' : ` if setup["live"]:
66
82
  for _live_key in [${keys.map((k) => JSON.stringify(k)).join(', ')}]:
@@ -76,7 +92,7 @@ const TestDirect = cmp(function TestDirect(props: any) {
76
92
  const model: Model = ctx$.model
77
93
 
78
94
  const target = props.target
79
- const entity: ModelEntity = props.entity
95
+ const entity: ModelEntity = liveEntity(ctx$, props.entity)
80
96
 
81
97
  const PROJECTNAME = envName(model)
82
98
 
@@ -121,12 +137,7 @@ const TestDirect = cmp(function TestDirect(props: any) {
121
137
  // actually appear in the URL template should drive direct-test path-param
122
138
  // setup and URL-substitution asserts; otherwise the SDK silently drops
123
139
  // them and the URL-includes assert fails.
124
- const _pathPlaceholders = new Set<string>()
125
- for (const part of pointParts(loadPoint)) {
126
- if (typeof part === 'string' && part.startsWith('{') && part.endsWith('}')) {
127
- _pathPlaceholders.add(part.slice(1, -1))
128
- }
129
- }
140
+ const _pathPlaceholders = new Set<string>(pointPlaceholders(loadPoint))
130
141
  const _renameMap = (loadPoint?.r?.param || {}) as Record<string, string>
131
142
  const _renamedPlaceholders = new Set<string>()
132
143
  for (const ph of _pathPlaceholders) {
@@ -142,11 +153,8 @@ const TestDirect = cmp(function TestDirect(props: any) {
142
153
  const listPath = listPoint ? normalizePathParams(pointParts(listPoint), listPoint?.g?.params || [], listPoint?.r?.param) : ''
143
154
  const listParams = listPoint?.g?.params || []
144
155
 
145
- const loadQuery = loadPoint?.g?.query || []
146
- const loadLiveQueryEntries = loadQuery
147
- .filter((q: any) => q.r && undefined !== q.ex && null !== q.ex)
148
- const loadLiveQueryLines = loadLiveQueryEntries
149
- .map((q: any) => ` query["${q.n}"] = ${JSON.stringify(q.ex)}`)
156
+ const loadLiveQueryLines = liveQueryExamples(loadPoint)
157
+ .map(([name, ex]) => ` query["${name}"] = ${pyLit(ex)}`)
150
158
  .join('\n')
151
159
 
152
160
  // Path params with spec-provided examples — when ALL load params have
@@ -160,6 +168,10 @@ const TestDirect = cmp(function TestDirect(props: any) {
160
168
 
161
169
  const entidEnvVar = `${PROJECTNAME}_TEST_${envToken(entity.name)}_ENTID`
162
170
 
171
+ const exampleIds = liveExampleIds(entity)
172
+ const listLiveQueryLines = liveQueryExamples(listPoint)
173
+ .map(([name, ex]) => ` query["${name}"] = ${pyLit(ex)}\n`).join('')
174
+
163
175
  // The *_ENTID key a live test reads a parameter's value from.
164
176
  const liveKey = (param: any): string =>
165
177
  ('id' === param.n ? entity.name : param.n.replace(/_id$/, '')) + '01'
@@ -169,6 +181,7 @@ const TestDirect = cmp(function TestDirect(props: any) {
169
181
  Content(`# ${entity.Name} direct test
170
182
 
171
183
  import json
184
+ import os
172
185
  import pytest
173
186
 
174
187
  from ${model.const.Name.toLowerCase()}_sdk.utility.voxgig_struct import voxgig_struct as vs
@@ -207,10 +220,11 @@ class Test${entity.Name}Direct:
207
220
  if _skip:
208
221
  pytest.skip(_reason or "skipped via sdk-test-control.json")
209
222
  return
210
- ${liveKeysBlock(listLiveIdKeys, entidEnvVar)} client = setup["client"]
223
+ ${getOnlyKeysBlock(model, entity, 'direct-list-' + entity.name, listLiveIdKeys)}${liveKeysBlock(listLiveIdKeys, entidEnvVar)} client = setup["client"]
211
224
 
212
225
  params = {}
213
- `)
226
+ query = {}
227
+ ${listLiveQueryLines ? ' if setup["live"]:\n' + listLiveQueryLines : ''}`)
214
228
  listParams.forEach((lp: any, i: number) => {
215
229
  Content(` if setup["live"]:
216
230
  params["${lp.n}"] = setup["idmap"].get("${liveKey(lp)}")
@@ -223,6 +237,7 @@ ${liveKeysBlock(listLiveIdKeys, entidEnvVar)} client = setup["client"]
223
237
  "path": "${listPath}",
224
238
  "method": "GET",
225
239
  "params": params,
240
+ "query": query,
226
241
  })
227
242
  if setup["live"]:
228
243
  if not _live_ok(result):
@@ -257,7 +272,7 @@ ${liveKeysBlock(listLiveIdKeys, entidEnvVar)} client = setup["client"]
257
272
  if _skip:
258
273
  pytest.skip(_reason or "skipped via sdk-test-control.json")
259
274
  return
260
- ${liveKeysBlock([...new Set(loadLiveIdKeys)], entidEnvVar)} client = setup["client"]
275
+ ${getOnlyKeysBlock(model, entity, 'direct-load-' + entity.name, [...new Set(loadLiveIdKeys)])}${liveKeysBlock([...new Set(loadLiveIdKeys)], entidEnvVar)} client = setup["client"]
261
276
 
262
277
  params = {}
263
278
  query = {}
@@ -348,7 +363,10 @@ def _${entity.name}_direct_setup(mockres):
348
363
  })
349
364
  client = ${model.const.Name}SDK(merged_opts)
350
365
  idmap = env.get("${entidEnvVar}")
351
- return {
366
+ ${0 === exampleIds.length ? '' : ` # A path parameter's example stands in for an id *_ENTID does not give.
367
+ idmap = {${exampleIds.map(([key, ex]) => `${JSON.stringify(key)}: ${pyLit(ex)}`).join(', ')},
368
+ **(idmap if isinstance(idmap, dict) else {})}
369
+ `} return {
352
370
  "client": client,
353
371
  "calls": calls,
354
372
  "live": True,
@@ -383,6 +401,11 @@ def _${entity.name}_direct_setup(mockres):
383
401
  })
384
402
 
385
403
 
404
+ function pyLit(value: any): string {
405
+ return true === value ? 'True' : false === value ? 'False' : JSON.stringify(value)
406
+ }
407
+
408
+
386
409
  export {
387
410
  TestDirect
388
411
  }