@api-client/core 0.19.9 → 0.19.11

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 (523) hide show
  1. package/LICENSE.md +9 -63
  2. package/Testing.md +1 -1
  3. package/bin/test.ts +1 -12
  4. package/build/src/browser.d.ts +0 -15
  5. package/build/src/browser.d.ts.map +1 -1
  6. package/build/src/browser.js +0 -17
  7. package/build/src/browser.js.map +1 -1
  8. package/build/src/decorators/observed.d.ts.map +1 -1
  9. package/build/src/decorators/observed.js +91 -0
  10. package/build/src/decorators/observed.js.map +1 -1
  11. package/build/src/events/EventTypes.d.ts +0 -6
  12. package/build/src/events/EventTypes.d.ts.map +1 -1
  13. package/build/src/events/EventTypes.js +0 -2
  14. package/build/src/events/EventTypes.js.map +1 -1
  15. package/build/src/events/Events.d.ts +0 -2
  16. package/build/src/events/Events.d.ts.map +1 -1
  17. package/build/src/events/Events.js +0 -2
  18. package/build/src/events/Events.js.map +1 -1
  19. package/build/src/index.d.ts +0 -15
  20. package/build/src/index.d.ts.map +1 -1
  21. package/build/src/index.js +0 -17
  22. package/build/src/index.js.map +1 -1
  23. package/build/src/modeling/ApiModel.d.ts +21 -7
  24. package/build/src/modeling/ApiModel.d.ts.map +1 -1
  25. package/build/src/modeling/ApiModel.js +70 -29
  26. package/build/src/modeling/ApiModel.js.map +1 -1
  27. package/build/src/modeling/Bindings.d.ts +3 -3
  28. package/build/src/modeling/Bindings.d.ts.map +1 -1
  29. package/build/src/modeling/Bindings.js.map +1 -1
  30. package/build/src/modeling/DomainAssociation.d.ts +5 -5
  31. package/build/src/modeling/DomainAssociation.d.ts.map +1 -1
  32. package/build/src/modeling/DomainAssociation.js.map +1 -1
  33. package/build/src/modeling/DomainEntity.d.ts +2 -3
  34. package/build/src/modeling/DomainEntity.d.ts.map +1 -1
  35. package/build/src/modeling/DomainEntity.js +1 -1
  36. package/build/src/modeling/DomainEntity.js.map +1 -1
  37. package/build/src/modeling/DomainProperty.d.ts +2 -3
  38. package/build/src/modeling/DomainProperty.d.ts.map +1 -1
  39. package/build/src/modeling/DomainProperty.js +1 -1
  40. package/build/src/modeling/DomainProperty.js.map +1 -1
  41. package/build/src/modeling/DomainValidation.d.ts +1 -1
  42. package/build/src/modeling/DomainValidation.d.ts.map +1 -1
  43. package/build/src/modeling/DomainValidation.js.map +1 -1
  44. package/build/src/modeling/ExposedEntity.d.ts +14 -0
  45. package/build/src/modeling/ExposedEntity.d.ts.map +1 -1
  46. package/build/src/modeling/ExposedEntity.js +59 -6
  47. package/build/src/modeling/ExposedEntity.js.map +1 -1
  48. package/build/src/modeling/actions/Action.d.ts +11 -1
  49. package/build/src/modeling/actions/Action.d.ts.map +1 -1
  50. package/build/src/modeling/actions/Action.js +21 -3
  51. package/build/src/modeling/actions/Action.js.map +1 -1
  52. package/build/src/modeling/actions/CreateAction.d.ts +2 -1
  53. package/build/src/modeling/actions/CreateAction.d.ts.map +1 -1
  54. package/build/src/modeling/actions/CreateAction.js +2 -2
  55. package/build/src/modeling/actions/CreateAction.js.map +1 -1
  56. package/build/src/modeling/actions/DeleteAction.d.ts +2 -1
  57. package/build/src/modeling/actions/DeleteAction.d.ts.map +1 -1
  58. package/build/src/modeling/actions/DeleteAction.js +2 -2
  59. package/build/src/modeling/actions/DeleteAction.js.map +1 -1
  60. package/build/src/modeling/actions/ListAction.d.ts +2 -1
  61. package/build/src/modeling/actions/ListAction.d.ts.map +1 -1
  62. package/build/src/modeling/actions/ListAction.js +2 -2
  63. package/build/src/modeling/actions/ListAction.js.map +1 -1
  64. package/build/src/modeling/actions/ReadAction.d.ts +2 -1
  65. package/build/src/modeling/actions/ReadAction.d.ts.map +1 -1
  66. package/build/src/modeling/actions/ReadAction.js +2 -2
  67. package/build/src/modeling/actions/ReadAction.js.map +1 -1
  68. package/build/src/modeling/actions/SearchAction.d.ts +2 -1
  69. package/build/src/modeling/actions/SearchAction.d.ts.map +1 -1
  70. package/build/src/modeling/actions/SearchAction.js +2 -2
  71. package/build/src/modeling/actions/SearchAction.js.map +1 -1
  72. package/build/src/modeling/actions/UpdateAction.d.ts +2 -1
  73. package/build/src/modeling/actions/UpdateAction.d.ts.map +1 -1
  74. package/build/src/modeling/actions/UpdateAction.js +2 -2
  75. package/build/src/modeling/actions/UpdateAction.js.map +1 -1
  76. package/build/src/modeling/actions/index.d.ts +2 -1
  77. package/build/src/modeling/actions/index.d.ts.map +1 -1
  78. package/build/src/modeling/actions/index.js +7 -7
  79. package/build/src/modeling/actions/index.js.map +1 -1
  80. package/build/src/modeling/ai/types.d.ts +2 -2
  81. package/build/src/modeling/ai/types.d.ts.map +1 -1
  82. package/build/src/modeling/ai/types.js.map +1 -1
  83. package/build/src/{amf → modeling/amf}/DataValueGenerator.d.ts +1 -1
  84. package/build/src/modeling/amf/DataValueGenerator.d.ts.map +1 -0
  85. package/build/src/{amf → modeling/amf}/DataValueGenerator.js +2 -3
  86. package/build/src/modeling/amf/DataValueGenerator.js.map +1 -0
  87. package/build/src/modeling/amf/ShapeGenerator.d.ts +20 -20
  88. package/build/src/modeling/amf/ShapeGenerator.d.ts.map +1 -1
  89. package/build/src/modeling/amf/ShapeGenerator.js +16 -18
  90. package/build/src/modeling/amf/ShapeGenerator.js.map +1 -1
  91. package/build/src/modeling/amf/core_types.d.ts +9 -0
  92. package/build/src/modeling/amf/core_types.d.ts.map +1 -0
  93. package/build/src/modeling/amf/core_types.js +45 -0
  94. package/build/src/modeling/amf/core_types.js.map +1 -0
  95. package/build/src/modeling/index.d.ts +1 -0
  96. package/build/src/modeling/index.d.ts.map +1 -1
  97. package/build/src/modeling/index.js +1 -0
  98. package/build/src/modeling/index.js.map +1 -1
  99. package/build/src/modeling/types.d.ts +67 -0
  100. package/build/src/modeling/types.d.ts.map +1 -1
  101. package/build/src/modeling/types.js.map +1 -1
  102. package/build/src/modeling/validation/api_model_rules.d.ts +15 -0
  103. package/build/src/modeling/validation/api_model_rules.d.ts.map +1 -0
  104. package/build/src/modeling/validation/api_model_rules.js +599 -0
  105. package/build/src/modeling/validation/api_model_rules.js.map +1 -0
  106. package/build/src/modeling/validation/association_validation.d.ts.map +1 -1
  107. package/build/src/modeling/validation/association_validation.js +1 -3
  108. package/build/src/modeling/validation/association_validation.js.map +1 -1
  109. package/build/src/models/http-flows/LegacyTranslator.js +1 -1
  110. package/build/src/models/http-flows/LegacyTranslator.js.map +1 -1
  111. package/build/src/runtime/http-runner/HttpFlows.js +1 -1
  112. package/build/src/runtime/http-runner/HttpFlows.js.map +1 -1
  113. package/build/tsconfig.tsbuildinfo +1 -1
  114. package/eslint.config.js +0 -2
  115. package/package.json +27 -135
  116. package/src/decorators/observed.ts +91 -0
  117. package/src/events/EventTypes.ts +0 -2
  118. package/src/events/Events.ts +0 -2
  119. package/src/modeling/ApiModel.ts +73 -33
  120. package/src/modeling/Bindings.ts +3 -3
  121. package/src/modeling/DomainAssociation.ts +5 -5
  122. package/src/modeling/DomainEntity.ts +3 -4
  123. package/src/modeling/DomainProperty.ts +3 -4
  124. package/src/modeling/DomainValidation.ts +1 -1
  125. package/src/modeling/ExposedEntity.ts +63 -9
  126. package/src/modeling/actions/Action.ts +25 -2
  127. package/src/modeling/actions/CreateAction.ts +3 -2
  128. package/src/modeling/actions/DeleteAction.ts +3 -2
  129. package/src/modeling/actions/ListAction.ts +3 -2
  130. package/src/modeling/actions/ReadAction.ts +3 -2
  131. package/src/modeling/actions/SearchAction.ts +3 -2
  132. package/src/modeling/actions/UpdateAction.ts +3 -2
  133. package/src/modeling/ai/types.ts +2 -2
  134. package/src/{amf → modeling/amf}/DataValueGenerator.ts +3 -4
  135. package/src/modeling/amf/ShapeGenerator.ts +45 -61
  136. package/src/modeling/amf/core_types.ts +47 -0
  137. package/src/modeling/types.ts +70 -0
  138. package/src/modeling/validation/api_model_rules.ts +640 -0
  139. package/src/modeling/validation/api_model_validation_rules.md +58 -0
  140. package/src/modeling/validation/association_validation.ts +1 -3
  141. package/src/models/http-flows/LegacyTranslator.ts +1 -1
  142. package/src/runtime/http-runner/HttpFlows.ts +1 -1
  143. package/tests/unit/modeling/actions/Action.spec.ts +40 -8
  144. package/tests/unit/modeling/actions/CreateAction.spec.ts +5 -5
  145. package/tests/unit/modeling/actions/DeleteAction.spec.ts +6 -6
  146. package/tests/unit/modeling/actions/ListAction.spec.ts +7 -7
  147. package/tests/unit/modeling/actions/ReadAction.spec.ts +6 -6
  148. package/tests/unit/modeling/actions/SearchAction.spec.ts +6 -6
  149. package/tests/unit/modeling/actions/UpdateAction.spec.ts +6 -6
  150. package/tests/unit/{amf → modeling/amf}/data_value_generator.spec.ts +2 -2
  151. package/tests/unit/modeling/amf/shape_generator.spec.ts +146 -167
  152. package/tests/unit/modeling/api_model.spec.ts +190 -13
  153. package/tests/unit/modeling/api_model_expose_entity.spec.ts +43 -19
  154. package/tests/unit/modeling/api_model_remove_entity.spec.ts +6 -6
  155. package/tests/unit/modeling/domain_asociation.spec.ts +13 -13
  156. package/tests/unit/modeling/exposed_entity.spec.ts +123 -3
  157. package/tests/unit/modeling/exposed_entity_actions.spec.ts +41 -18
  158. package/tests/unit/modeling/exposed_entity_setter_validation.spec.ts +1 -1
  159. package/tests/unit/modeling/rules/restoring_rules.spec.ts +9 -5
  160. package/tests/unit/modeling/validation/api_model_rules.spec.ts +324 -0
  161. package/tests/unit/runtime/runners/http_assertion_runner.spec.ts +1 -1
  162. package/tests/unit/runtime/runners/http_flow_runner.spec.ts +1 -1
  163. package/tests/unit/runtime/runners/project_runner.spec.ts +1 -1
  164. package/tests/unit/runtime/runners/request_runner.spec.ts +1 -1
  165. package/tests/unit/runtime/runners/serial_runner.spec.ts +1 -1
  166. package/tsconfig.browser.json +1 -1
  167. package/tsconfig.node.json +1 -1
  168. package/bin/test-web.ts +0 -6
  169. package/build/src/amf/AmfMixin.d.ts +0 -396
  170. package/build/src/amf/AmfMixin.d.ts.map +0 -1
  171. package/build/src/amf/AmfMixin.js +0 -1138
  172. package/build/src/amf/AmfMixin.js.map +0 -1
  173. package/build/src/amf/AmfSerializer.d.ts +0 -137
  174. package/build/src/amf/AmfSerializer.d.ts.map +0 -1
  175. package/build/src/amf/AmfSerializer.js +0 -1947
  176. package/build/src/amf/AmfSerializer.js.map +0 -1
  177. package/build/src/amf/AmfTypes.d.ts +0 -25
  178. package/build/src/amf/AmfTypes.d.ts.map +0 -1
  179. package/build/src/amf/AmfTypes.js +0 -143
  180. package/build/src/amf/AmfTypes.js.map +0 -1
  181. package/build/src/amf/ApiExampleGenerator.d.ts +0 -40
  182. package/build/src/amf/ApiExampleGenerator.d.ts.map +0 -1
  183. package/build/src/amf/ApiExampleGenerator.js +0 -112
  184. package/build/src/amf/ApiExampleGenerator.js.map +0 -1
  185. package/build/src/amf/ApiMonacoSchemaGenerator.d.ts +0 -68
  186. package/build/src/amf/ApiMonacoSchemaGenerator.d.ts.map +0 -1
  187. package/build/src/amf/ApiMonacoSchemaGenerator.js +0 -248
  188. package/build/src/amf/ApiMonacoSchemaGenerator.js.map +0 -1
  189. package/build/src/amf/ApiSchemaGenerator.d.ts +0 -56
  190. package/build/src/amf/ApiSchemaGenerator.d.ts.map +0 -1
  191. package/build/src/amf/ApiSchemaGenerator.js +0 -94
  192. package/build/src/amf/ApiSchemaGenerator.js.map +0 -1
  193. package/build/src/amf/ApiSchemaValues.d.ts +0 -111
  194. package/build/src/amf/ApiSchemaValues.d.ts.map +0 -1
  195. package/build/src/amf/ApiSchemaValues.js +0 -463
  196. package/build/src/amf/ApiSchemaValues.js.map +0 -1
  197. package/build/src/amf/DataValueGenerator.d.ts.map +0 -1
  198. package/build/src/amf/DataValueGenerator.js.map +0 -1
  199. package/build/src/amf/Parsing.d.ts +0 -48
  200. package/build/src/amf/Parsing.d.ts.map +0 -1
  201. package/build/src/amf/Parsing.js +0 -2
  202. package/build/src/amf/Parsing.js.map +0 -1
  203. package/build/src/amf/Utils.d.ts +0 -37
  204. package/build/src/amf/Utils.d.ts.map +0 -1
  205. package/build/src/amf/Utils.js +0 -169
  206. package/build/src/amf/Utils.js.map +0 -1
  207. package/build/src/amf/data-node/DataNodeBase.d.ts +0 -34
  208. package/build/src/amf/data-node/DataNodeBase.d.ts.map +0 -1
  209. package/build/src/amf/data-node/DataNodeBase.js +0 -77
  210. package/build/src/amf/data-node/DataNodeBase.js.map +0 -1
  211. package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts +0 -15
  212. package/build/src/amf/data-node/JsonDataNodeGenerator.d.ts.map +0 -1
  213. package/build/src/amf/data-node/JsonDataNodeGenerator.js +0 -23
  214. package/build/src/amf/data-node/JsonDataNodeGenerator.js.map +0 -1
  215. package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts +0 -14
  216. package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.d.ts.map +0 -1
  217. package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js +0 -48
  218. package/build/src/amf/data-node/UrlEncodedDataNodeGenerator.js.map +0 -1
  219. package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts +0 -22
  220. package/build/src/amf/data-node/XmlDataNodeGenerator.d.ts.map +0 -1
  221. package/build/src/amf/data-node/XmlDataNodeGenerator.js +0 -34
  222. package/build/src/amf/data-node/XmlDataNodeGenerator.js.map +0 -1
  223. package/build/src/amf/definitions/Amf.d.ts +0 -363
  224. package/build/src/amf/definitions/Amf.d.ts.map +0 -1
  225. package/build/src/amf/definitions/Amf.js +0 -3
  226. package/build/src/amf/definitions/Amf.js.map +0 -1
  227. package/build/src/amf/definitions/Api.d.ts +0 -383
  228. package/build/src/amf/definitions/Api.d.ts.map +0 -1
  229. package/build/src/amf/definitions/Api.js +0 -2
  230. package/build/src/amf/definitions/Api.js.map +0 -1
  231. package/build/src/amf/definitions/Base.d.ts +0 -12
  232. package/build/src/amf/definitions/Base.d.ts.map +0 -1
  233. package/build/src/amf/definitions/Base.js +0 -2
  234. package/build/src/amf/definitions/Base.js.map +0 -1
  235. package/build/src/amf/definitions/Namespace.d.ts +0 -327
  236. package/build/src/amf/definitions/Namespace.d.ts.map +0 -1
  237. package/build/src/amf/definitions/Namespace.js +0 -346
  238. package/build/src/amf/definitions/Namespace.js.map +0 -1
  239. package/build/src/amf/definitions/Shapes.d.ts +0 -312
  240. package/build/src/amf/definitions/Shapes.d.ts.map +0 -1
  241. package/build/src/amf/definitions/Shapes.js +0 -87
  242. package/build/src/amf/definitions/Shapes.js.map +0 -1
  243. package/build/src/amf/models/AmfDataNode.d.ts +0 -67
  244. package/build/src/amf/models/AmfDataNode.d.ts.map +0 -1
  245. package/build/src/amf/models/AmfDataNode.js +0 -192
  246. package/build/src/amf/models/AmfDataNode.js.map +0 -1
  247. package/build/src/amf/shape/ShapeBase.d.ts +0 -74
  248. package/build/src/amf/shape/ShapeBase.d.ts.map +0 -1
  249. package/build/src/amf/shape/ShapeBase.js +0 -93
  250. package/build/src/amf/shape/ShapeBase.js.map +0 -1
  251. package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts +0 -47
  252. package/build/src/amf/shape/ShapeJsonSchemaGenerator.d.ts.map +0 -1
  253. package/build/src/amf/shape/ShapeJsonSchemaGenerator.js +0 -420
  254. package/build/src/amf/shape/ShapeJsonSchemaGenerator.js.map +0 -1
  255. package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts +0 -85
  256. package/build/src/amf/shape/ShapeXmlSchemaGenerator.d.ts.map +0 -1
  257. package/build/src/amf/shape/ShapeXmlSchemaGenerator.js +0 -852
  258. package/build/src/amf/shape/ShapeXmlSchemaGenerator.js.map +0 -1
  259. package/build/src/events/amf/AmfEventTypes.d.ts +0 -7
  260. package/build/src/events/amf/AmfEventTypes.d.ts.map +0 -1
  261. package/build/src/events/amf/AmfEventTypes.js +0 -7
  262. package/build/src/events/amf/AmfEventTypes.js.map +0 -1
  263. package/build/src/events/amf/AmfEvents.d.ts +0 -34
  264. package/build/src/events/amf/AmfEvents.d.ts.map +0 -1
  265. package/build/src/events/amf/AmfEvents.js +0 -63
  266. package/build/src/events/amf/AmfEvents.js.map +0 -1
  267. package/build/src/mocking/RandExp.d.ts +0 -55
  268. package/build/src/mocking/RandExp.d.ts.map +0 -1
  269. package/build/src/mocking/RandExp.js +0 -302
  270. package/build/src/mocking/RandExp.js.map +0 -1
  271. package/build/src/mocking/lib/ret.d.ts +0 -16
  272. package/build/src/mocking/lib/ret.d.ts.map +0 -1
  273. package/build/src/mocking/lib/ret.js +0 -284
  274. package/build/src/mocking/lib/ret.js.map +0 -1
  275. package/data/apis/APIC-187/APIC-187.raml +0 -21
  276. package/data/apis/APIC-187/dataType.raml +0 -132
  277. package/data/apis/APIC-187/example.raml +0 -84
  278. package/data/apis/APIC-188/APIC-188.raml +0 -21
  279. package/data/apis/APIC-188/dataType.raml +0 -132
  280. package/data/apis/APIC-188/example.raml +0 -84
  281. package/data/apis/APIC-233/APIC-233.raml +0 -15
  282. package/data/apis/APIC-391/APIC-391.raml +0 -44
  283. package/data/apis/APIC-391/examples/post-body-request-example.raml +0 -7
  284. package/data/apis/APIC-483/APIC-483.raml +0 -16
  285. package/data/apis/APIC-483/example/list-of-bank-succ.json +0 -32
  286. package/data/apis/APIC-483/schema/response-retrieve-list-bank.json +0 -68
  287. package/data/apis/APIC-487/APIC-487.raml +0 -36
  288. package/data/apis/APIC-655/APIC-655.raml +0 -44
  289. package/data/apis/APIC-655/delivery.json +0 -12
  290. package/data/apis/APIC-689/APIC-689.raml +0 -20
  291. package/data/apis/APIC-690/APIC-690.raml +0 -17
  292. package/data/apis/APIC-690/datatypes/Address.raml +0 -10
  293. package/data/apis/APIC-690/datatypes/Customer.raml +0 -17
  294. package/data/apis/APIC-690/examples/CustomerExample2.raml +0 -17
  295. package/data/apis/APIC-690/examples/CustomersExample.raml +0 -34
  296. package/data/apis/SE-10469/Purchase-Order-oagis-id-dd32f9c6c01048a19e15c423c9c741ae.json +0 -1383
  297. package/data/apis/SE-10469/SE-10469.raml +0 -11
  298. package/data/apis/SE-13092/Examples/PersonExample.raml +0 -7
  299. package/data/apis/SE-13092/SE-13092.raml +0 -37
  300. package/data/apis/SE-13092/datatypes/Address.raml +0 -5
  301. package/data/apis/SE-13092/datatypes/InlineType.raml +0 -5
  302. package/data/apis/SE-13092/datatypes/Person.raml +0 -15
  303. package/data/apis/SE-22063/SE-22063.raml +0 -14
  304. package/data/apis/SE-22063/stock.raml +0 -41
  305. package/data/apis/amf-helper-api/amf-helper-api.raml +0 -1024
  306. package/data/apis/amf-helper-api/examples/comment-example.json +0 -42
  307. package/data/apis/amf-helper-api/examples/commentCreateRequest-example.json +0 -7
  308. package/data/apis/amf-helper-api/examples/commentList-example.json +0 -48
  309. package/data/apis/amf-helper-api/examples/person.json +0 -14
  310. package/data/apis/amf-helper-api/examples/person.raml +0 -13
  311. package/data/apis/amf-helper-api/examples/person.xml +0 -14
  312. package/data/apis/amf-helper-api/libraries/comment-lib.raml +0 -143
  313. package/data/apis/amf-helper-api/library.raml +0 -7
  314. package/data/apis/amf-helper-api/schemas/person.json +0 -104
  315. package/data/apis/amf-helper-api/schemas/person.xsd +0 -26
  316. package/data/apis/amf-helper-api/traits/file.raml +0 -33
  317. package/data/apis/amf-helper-api/traits/pagination.raml +0 -80
  318. package/data/apis/amf-helper-api/traits/results.raml +0 -19
  319. package/data/apis/amf-helper-api/traits/visibility.raml +0 -14
  320. package/data/apis/amf-helper-api/types/app-person.raml +0 -101
  321. package/data/apis/amf-helper-api/types/dimensions.raml +0 -24
  322. package/data/apis/amf-helper-api/types/external-type.raml +0 -7
  323. package/data/apis/amf-helper-api/types/image.raml +0 -23
  324. package/data/apis/amf-helper-api/types/product.raml +0 -52
  325. package/data/apis/amf-helper-api/types/resource.raml +0 -11
  326. package/data/apis/amf-helper-api/types/standard-request.raml +0 -50
  327. package/data/apis/amf-helper-api/types/user.raml +0 -37
  328. package/data/apis/arc-demo-api/arc-demo-api.raml +0 -468
  329. package/data/apis/arc-demo-api/examples/e400.xml +0 -4
  330. package/data/apis/arc-demo-api/examples/e401.xml +0 -4
  331. package/data/apis/arc-demo-api/examples/e404.xml +0 -4
  332. package/data/apis/arc-demo-api/examples/image.xml +0 -5
  333. package/data/apis/arc-demo-api/examples/messages-example.json +0 -22
  334. package/data/apis/arc-demo-api/examples/messages-sent-example.json +0 -15
  335. package/data/apis/arc-demo-api/examples/person.json +0 -14
  336. package/data/apis/arc-demo-api/examples/person.url.encoded +0 -1
  337. package/data/apis/arc-demo-api/examples/person.xml +0 -14
  338. package/data/apis/arc-demo-api/examples/product.xml +0 -9
  339. package/data/apis/arc-demo-api/library.raml +0 -36
  340. package/data/apis/arc-demo-api/resourceTypes/app-person.raml +0 -49
  341. package/data/apis/arc-demo-api/resourceTypes/example-types.raml +0 -45
  342. package/data/apis/arc-demo-api/resourceTypes/image.raml +0 -23
  343. package/data/apis/arc-demo-api/resourceTypes/message-sent-type.raml +0 -23
  344. package/data/apis/arc-demo-api/resourceTypes/message-type.raml +0 -33
  345. package/data/apis/arc-demo-api/resourceTypes/product.raml +0 -52
  346. package/data/apis/arc-demo-api/resourceTypes/resource.raml +0 -11
  347. package/data/apis/arc-demo-api/schemas/error-response.xsd +0 -11
  348. package/data/apis/arc-demo-api/schemas/image.xsd +0 -11
  349. package/data/apis/arc-demo-api/schemas/person.json +0 -104
  350. package/data/apis/arc-demo-api/schemas/person.xsd +0 -26
  351. package/data/apis/arc-demo-api/schemas/product.xsd +0 -17
  352. package/data/apis/arc-demo-api/securitySchemes/basic.raml +0 -5
  353. package/data/apis/arc-demo-api/securitySchemes/oauth_2_0.raml +0 -29
  354. package/data/apis/arc-demo-api/securitySchemes/x-custom.raml +0 -26
  355. package/data/apis/arc-demo-api/traits/adminable.raml +0 -23
  356. package/data/apis/arc-demo-api/traits/pagination.raml +0 -83
  357. package/data/apis/arc-demo-api/traits/rate-limited.raml +0 -9
  358. package/data/apis/async-api/async-api.yaml +0 -96
  359. package/data/apis/example-generator-api/contact-email-example.raml +0 -6
  360. package/data/apis/example-generator-api/contact-example.raml +0 -5
  361. package/data/apis/example-generator-api/contact-fax-example.raml +0 -5
  362. package/data/apis/example-generator-api/contact-website-example.raml +0 -2
  363. package/data/apis/example-generator-api/example-1.raml +0 -6
  364. package/data/apis/example-generator-api/example-2.raml +0 -9
  365. package/data/apis/example-generator-api/example-3.raml +0 -4
  366. package/data/apis/example-generator-api/example-4.raml +0 -2
  367. package/data/apis/example-generator-api/example-5.raml +0 -4
  368. package/data/apis/example-generator-api/example-6.raml +0 -2
  369. package/data/apis/example-generator-api/example-7.raml +0 -5
  370. package/data/apis/example-generator-api/example-generator-api.raml +0 -423
  371. package/data/apis/example-generator-api/example.json +0 -14
  372. package/data/apis/example-generator-api/example.xml +0 -15
  373. package/data/apis/example-generator-api/example.xsd +0 -26
  374. package/data/apis/example-generator-api/examples/employee.raml +0 -7
  375. package/data/apis/example-generator-api/examples/employees.raml +0 -7
  376. package/data/apis/example-generator-api/linked-named-example.raml +0 -21
  377. package/data/apis/example-generator-api/named-example-with-link.raml +0 -5
  378. package/data/apis/example-generator-api/named-example.raml +0 -9
  379. package/data/apis/example-generator-api/user-json-example.raml +0 -17
  380. package/data/apis/example-generator-api/user-raml-example.raml +0 -37
  381. package/data/apis/example-generator-api/user.json +0 -8
  382. package/data/apis/example-generator-api/user.raml +0 -18
  383. package/data/apis/example-generator-api/users-json-example.raml +0 -17
  384. package/data/apis/example-generator-api/users-raml-example.raml +0 -32
  385. package/data/apis/example-generator-api/users.json +0 -8
  386. package/data/apis/expanded-api/expanded-api.raml +0 -8
  387. package/data/apis/flattened-api/flattened-api.raml +0 -8
  388. package/data/apis/multiple-servers/multiple-servers.yaml +0 -112
  389. package/data/apis/oas-3-api/oas-3-api.yaml +0 -356
  390. package/data/apis/oas-date/oas-date.yaml +0 -28
  391. package/data/apis/oas-types/oas-types.yaml +0 -159
  392. package/data/apis/oas-unions/oas-unions.yaml +0 -75
  393. package/data/apis/petstore/petstore.yaml +0 -954
  394. package/data/apis/raml-date/raml-date.raml +0 -28
  395. package/data/apis/recursive/recursive.raml +0 -14
  396. package/data/apis/schema-api/examples/person.json +0 -14
  397. package/data/apis/schema-api/examples/person.raml +0 -14
  398. package/data/apis/schema-api/examples/person.url.encoded +0 -1
  399. package/data/apis/schema-api/examples/person.xml +0 -14
  400. package/data/apis/schema-api/library/demo-types.raml +0 -43
  401. package/data/apis/schema-api/schema-api.raml +0 -656
  402. package/data/apis/schema-api/schemas/person.json +0 -104
  403. package/data/apis/schema-api/schemas/person.xsd +0 -26
  404. package/data/apis/schema-api/types/DemoPerson.raml +0 -67
  405. package/data/apis/secured-api/oauth-2-custom-settings.raml +0 -143
  406. package/data/apis/secured-api/oauth2-header-delivery.raml +0 -13
  407. package/data/apis/secured-api/oauth2-no-delivery.raml +0 -8
  408. package/data/apis/secured-api/oauth2-no-grants.raml +0 -12
  409. package/data/apis/secured-api/oauth2-pkce.raml +0 -13
  410. package/data/apis/secured-api/oauth2-query-delivery.raml +0 -13
  411. package/data/apis/secured-api/oauth_1_0.raml +0 -8
  412. package/data/apis/secured-api/oauth_1_0_no-settings.raml +0 -3
  413. package/data/apis/secured-api/oauth_1_0_no-signature.raml +0 -7
  414. package/data/apis/secured-api/oauth_1_0_signature.raml +0 -8
  415. package/data/apis/secured-api/passthrough-querystring.raml +0 -16
  416. package/data/apis/secured-api/passthrough.raml +0 -24
  417. package/data/apis/secured-api/secured-api.raml +0 -231
  418. package/data/apis/secured-api/x-custom.raml +0 -33
  419. package/data/apis/secured-api/x-other.raml +0 -29
  420. package/data/apis/secured-api/x-query-string.raml +0 -16
  421. package/data/apis/tracked-examples/datatypes/employee.raml +0 -5
  422. package/data/apis/tracked-examples/examples/employee.raml +0 -4
  423. package/data/apis/tracked-examples/examples/employees.raml +0 -8
  424. package/data/apis/tracked-examples/tracked-to-linked.raml +0 -28
  425. package/data/model.js +0 -129
  426. package/data/models/APIC-187.json +0 -11416
  427. package/data/models/APIC-188.json +0 -11416
  428. package/data/models/APIC-233.json +0 -539
  429. package/data/models/APIC-391.json +0 -1903
  430. package/data/models/APIC-483.json +0 -3110
  431. package/data/models/APIC-487.json +0 -1225
  432. package/data/models/APIC-655.json +0 -3145
  433. package/data/models/APIC-689.json +0 -797
  434. package/data/models/APIC-690.json +0 -5992
  435. package/data/models/SE-10469.json +0 -22898
  436. package/data/models/SE-13092.json +0 -2769
  437. package/data/models/SE-22063.json +0 -2314
  438. package/data/models/amf-helper-api.json +0 -84457
  439. package/data/models/arc-demo-api.json +0 -52041
  440. package/data/models/async-api.json +0 -3227
  441. package/data/models/example-generator-api.json +0 -45209
  442. package/data/models/expanded-api.json +0 -251
  443. package/data/models/flattened-api.json +0 -251
  444. package/data/models/multiple-servers.json +0 -2769
  445. package/data/models/oas-3-api.json +0 -10590
  446. package/data/models/oas-date.json +0 -637
  447. package/data/models/oas-types.json +0 -5352
  448. package/data/models/oas-unions.json +0 -1935
  449. package/data/models/petstore.json +0 -27712
  450. package/data/models/raml-date.json +0 -1114
  451. package/data/models/recursive.json +0 -610
  452. package/data/models/schema-api.json +0 -35527
  453. package/data/models/secured-api.json +0 -21071
  454. package/data/models/tracked-to-linked.json +0 -1914
  455. package/src/amf/AmfMixin.ts +0 -1726
  456. package/src/amf/AmfSerializer.ts +0 -2358
  457. package/src/amf/AmfTypes.ts +0 -147
  458. package/src/amf/ApiExampleGenerator.ts +0 -122
  459. package/src/amf/ApiMonacoSchemaGenerator.ts +0 -332
  460. package/src/amf/ApiSchemaGenerator.ts +0 -115
  461. package/src/amf/ApiSchemaValues.ts +0 -509
  462. package/src/amf/Parsing.ts +0 -50
  463. package/src/amf/Utils.ts +0 -172
  464. package/src/amf/data-node/DataNodeBase.ts +0 -83
  465. package/src/amf/data-node/JsonDataNodeGenerator.ts +0 -24
  466. package/src/amf/data-node/README.md +0 -3
  467. package/src/amf/data-node/UrlEncodedDataNodeGenerator.ts +0 -49
  468. package/src/amf/data-node/XmlDataNodeGenerator.ts +0 -46
  469. package/src/amf/definitions/Amf.ts +0 -440
  470. package/src/amf/definitions/Api.ts +0 -445
  471. package/src/amf/definitions/Base.ts +0 -13
  472. package/src/amf/definitions/Namespace.ts +0 -357
  473. package/src/amf/definitions/Shapes.ts +0 -438
  474. package/src/amf/models/AmfDataNode.ts +0 -210
  475. package/src/amf/shape/README.md +0 -4
  476. package/src/amf/shape/ShapeBase.ts +0 -174
  477. package/src/amf/shape/ShapeJsonSchemaGenerator.ts +0 -457
  478. package/src/amf/shape/ShapeXmlSchemaGenerator.ts +0 -933
  479. package/src/events/amf/AmfEventTypes.ts +0 -6
  480. package/src/events/amf/AmfEvents.ts +0 -78
  481. package/src/mocking/RandExp.ts +0 -335
  482. package/src/mocking/lib/ret.ts +0 -279
  483. package/tests/unit/amf/APIC-187.spec.ts +0 -41
  484. package/tests/unit/amf/APIC-188.spec.ts +0 -30
  485. package/tests/unit/amf/APIC-233.spec.ts +0 -32
  486. package/tests/unit/amf/APIC-391.spec.ts +0 -39
  487. package/tests/unit/amf/APIC-487.spec.ts +0 -44
  488. package/tests/unit/amf/APIC-655.spec.ts +0 -41
  489. package/tests/unit/amf/APIC-689.spec.ts +0 -28
  490. package/tests/unit/amf/APIC-690.spec.ts +0 -93
  491. package/tests/unit/amf/AmfLoader.ts +0 -538
  492. package/tests/unit/amf/AmfMixin.spec.ts +0 -1707
  493. package/tests/unit/amf/ApiExampleGenerator.spec.ts +0 -250
  494. package/tests/unit/amf/ApiMonacoSchemaGenerator.spec.ts +0 -183
  495. package/tests/unit/amf/ApiSchemaValues.spec.ts +0 -602
  496. package/tests/unit/amf/Namepsace.spec.ts +0 -494
  497. package/tests/unit/amf/SE-10469.spec.ts +0 -35
  498. package/tests/unit/amf/SE-13092.spec.ts +0 -64
  499. package/tests/unit/amf/SE-22063.spec.ts +0 -45
  500. package/tests/unit/amf/raml-examples.spec.ts +0 -43
  501. package/tests/unit/amf/schema_gen_array.spec.ts +0 -199
  502. package/tests/unit/amf/schema_gen_oas.spec.ts +0 -140
  503. package/tests/unit/amf/schema_gen_object.spec.ts +0 -279
  504. package/tests/unit/amf/schema_gen_scalar.spec.ts +0 -143
  505. package/tests/unit/amf/schema_gen_union.spec.ts +0 -401
  506. package/tests/unit/amf/schema_gen_unknown.spec.ts +0 -42
  507. package/tests/unit/amf/schema_gen_xml.spec.ts +0 -726
  508. package/tests/unit/amf/serializer/APIC-483.spec.ts +0 -36
  509. package/tests/unit/amf/serializer/Anotations.spec.ts +0 -50
  510. package/tests/unit/amf/serializer/Api.spec.ts +0 -210
  511. package/tests/unit/amf/serializer/Documentation.spec.ts +0 -52
  512. package/tests/unit/amf/serializer/Endpoints.spec.ts +0 -172
  513. package/tests/unit/amf/serializer/Operations.spec.ts +0 -330
  514. package/tests/unit/amf/serializer/Parameters.spec.ts +0 -149
  515. package/tests/unit/amf/serializer/PayloadExamples.spec.ts +0 -152
  516. package/tests/unit/amf/serializer/Security.spec.ts +0 -626
  517. package/tests/unit/amf/serializer/Server.spec.ts +0 -78
  518. package/tests/unit/amf/serializer/Shapes.spec.ts +0 -304
  519. package/tests/unit/amf/serializer/SourceMaps.spec.ts +0 -52
  520. package/tests/unit/amf/shapes/ShapeXmlSchemaGenerator.spec.ts +0 -28
  521. package/tests/unit/amf/tracked-to-linked.spec.ts +0 -90
  522. package/tests/unit/amf/xml-data-processing.spec.ts +0 -217
  523. package/tests/unit/events/amf.spec.ts +0 -151
@@ -1 +0,0 @@
1
- {"version":3,"file":"AmfTypes.js","sourceRoot":"","sources":["../../../src/amf/AmfTypes.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAEzD,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,WAAW;IAChD,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ;IAC7C,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK;IAC3B,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK;IAC1C,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,aA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IAAI,KAAK,UAAU,EAAE,CAAC;QACxB,OAAO,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAA;IAC3C,CAAC;IACD,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,OAAO,YAAY,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,YAAY,CAAA;IAC1D,CAAC;IACD,IAAI,IAAI,KAAK,QAAQ,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;QAClE,OAAO,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,YAAY,CAAA;IAC/C,CAAC;IACD,OAAO,YAAY,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAA;IACvC,kBAAkB;IAClB,mBAAmB;IACnB,yDAAyD;IACzD,mBAAmB;IACnB,8DAA8D;IAC9D,aAAa;IACb,2EAA2E;IAC3E,sDAAsD;IACtD,QAAQ;IACR,yDAAyD;IACzD,yDAAyD;IACzD,WAAW;IACX,8CAA8C;IAC9C,IAAI;AACN,CAAC","sourcesContent":["import { type DomainPropertyType } from '../modeling/DataFormat.js'\nimport { PropertyWebBindings } from '../modeling/Bindings.js'\nimport { AmfNamespace } from './definitions/Namespace.js'\n\nexport const IAmfScalarTypes = [\n AmfNamespace.aml.vocabularies.shapes.ScalarShape,\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfArrayTypes = [\n AmfNamespace.aml.vocabularies.shapes.ArrayShape,\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfNodeTypes = [\n AmfNamespace.w3.shacl.NodeShape,\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfPropertyTypes = [\n AmfNamespace.w3.shacl.PropertyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfNilTypes = [\n AmfNamespace.aml.vocabularies.shapes.NilShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfUnionTypes = [\n AmfNamespace.aml.vocabularies.shapes.UnionShape,\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfFileTypes = [\n AmfNamespace.aml.vocabularies.shapes.FileShape,\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfAnyTypes = [\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfSchemaTypes = [\n AmfNamespace.aml.vocabularies.shapes.SchemaShape,\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfTupleTypes = [\n AmfNamespace.aml.vocabularies.shapes.TupleShape,\n AmfNamespace.aml.vocabularies.shapes.ArrayShape,\n AmfNamespace.aml.vocabularies.shapes.AnyShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfRecursiveTypes = [\n AmfNamespace.aml.vocabularies.shapes.RecursiveShape,\n AmfNamespace.w3.shacl.Shape,\n AmfNamespace.aml.vocabularies.shapes.Shape,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfXmlSerializationTypes = [\n AmfNamespace.aml.vocabularies.shapes.XMLSerializer,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\n\nexport const IAmfScalarNodeTypes = [\n AmfNamespace.aml.vocabularies.data.Scalar,\n AmfNamespace.aml.vocabularies.data.Node,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfArrayNodeTypes = [\n AmfNamespace.aml.vocabularies.data.Array,\n AmfNamespace.w3.rdfSchema.Seq,\n AmfNamespace.aml.vocabularies.data.Node,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfObjectNodeTypes = [\n AmfNamespace.aml.vocabularies.data.Object,\n AmfNamespace.aml.vocabularies.data.Node,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\nexport const IAmfExampleTypes = [\n AmfNamespace.aml.vocabularies.apiContract.Example,\n AmfNamespace.aml.vocabularies.document.DomainElement,\n]\n\n/**\n * Translates the DomainProperty type to an AMF data type.\n * @param type The property data type\n * @returns AMF shape dataType\n */\nexport function modelTypeToAmfDataType(type: DomainPropertyType, bindings?: PropertyWebBindings): string {\n if (type === 'number') {\n if (bindings?.format === 'int32' || bindings?.format === 'int64') {\n return AmfNamespace.w3.xmlSchema.integer\n }\n return AmfNamespace.w3.xmlSchema.number\n }\n if (type === 'boolean') {\n return AmfNamespace.aml.vocabularies.shapes.boolean\n }\n if (type === 'date') {\n return AmfNamespace.w3.xmlSchema.date\n }\n if (type === 'datetime') {\n return AmfNamespace.w3.xmlSchema.dateTime\n }\n if (type === 'time') {\n return AmfNamespace.aml.vocabularies.shapes.dateTimeOnly\n }\n if (type === 'binary' && bindings && bindings.format === 'base64') {\n return AmfNamespace.w3.xmlSchema.base64Binary\n }\n return AmfNamespace.w3.xmlSchema.string\n // switch (type) {\n // // case 'nil':\n // // return AmfNamespace.aml.vocabularies.shapes.nil\n // // case 'any':\n // // return AmfNamespace.aml.vocabularies.shapes.AnyShape\n // default:\n // if (type === 'binary' && bindings && bindings.format === 'base64') {\n // return AmfNamespace.w3.xmlSchema.base64Binary\n // }\n // // if (bindings && bindings.format === 'binary') {\n // // return AmfNamespace.w3.xmlSchema.base64Binary\n // // }\n // return AmfNamespace.w3.xmlSchema.string\n // }\n}\n"]}
@@ -1,40 +0,0 @@
1
- import { IApiDataExample, IApiDataNode, IShapeUnion } from './definitions/Shapes.js';
2
- /**
3
- * A class that processes AMF's Example object to read the example value
4
- * or to generate the example for the given media type.
5
- */
6
- export declare class ApiExampleGenerator {
7
- /**
8
- * Reads or generates an example.
9
- * When the `mime` is set then it tries to "guess" whether the mime type corresponds to the value.
10
- * If it doesn't then it generates the example from the structured value, when possible.
11
- * @param example The structured value of the example
12
- * @param mime The optional mime type of the example. When not set it
13
- * won't generate example from the structured value.
14
- * @param shape The optional shape containing this example to use with the
15
- * XML examples which needs wrapping into an element.
16
- * @returns The read or generated example.
17
- */
18
- read(example: IApiDataExample, mime?: string, shape?: IShapeUnion): string | number | false | null | undefined;
19
- /**
20
- * Employs some basic heuristics to determine whether the given mime type patches the content.
21
- * @param mime The mime type for the value.
22
- * @param value The value.
23
- * @returns True when the value matches the mime type.
24
- */
25
- mimeMatches(mime: string, value?: string): boolean;
26
- /**
27
- * Generates the example for the given structured value and the media type.
28
- * @param mime The mime type for the value.
29
- * @param structuredValue The structuredValue of the example.
30
- * @param shape The optional shape containing this example to use with the
31
- * XML examples which needs wrapping into an element.
32
- * @returns The generated example or null if couldn't process the data.
33
- */
34
- fromStructuredValue(mime: string, structuredValue: IApiDataNode, shape?: IShapeUnion): string | number | false | null | undefined;
35
- /**
36
- * Wraps the generated XML example into an element according to the `shape` properties.
37
- */
38
- wrapXmlValue(value?: string | number | false | null | undefined, shape?: IShapeUnion): string | number | false | null | undefined;
39
- }
40
- //# sourceMappingURL=ApiExampleGenerator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiExampleGenerator.d.ts","sourceRoot":"","sources":["../../../src/amf/ApiExampleGenerator.ts"],"names":[],"mappings":"AAKA,OAAO,EAAkB,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEpG;;;GAGG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;;;;;OAUG;IACH,IAAI,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS;IAoB9G;;;;;OAKG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO;IAelD;;;;;;;OAOG;IACH,mBAAmB,CACjB,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,YAAY,EAC7B,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS;IA6B7C;;OAEG;IACH,YAAY,CACV,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,EAClD,KAAK,CAAC,EAAE,WAAW,GAClB,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS;CAU9C"}
@@ -1,112 +0,0 @@
1
- import { AmfNamespace as ns } from './definitions/Namespace.js';
2
- import { JsonDataNodeGenerator } from './data-node/JsonDataNodeGenerator.js';
3
- import { XmlDataNodeGenerator } from './data-node/XmlDataNodeGenerator.js';
4
- import { UrlEncodedDataNodeGenerator } from './data-node/UrlEncodedDataNodeGenerator.js';
5
- import { formatXmlValue } from './Utils.js';
6
- /**
7
- * A class that processes AMF's Example object to read the example value
8
- * or to generate the example for the given media type.
9
- */
10
- export class ApiExampleGenerator {
11
- /**
12
- * Reads or generates an example.
13
- * When the `mime` is set then it tries to "guess" whether the mime type corresponds to the value.
14
- * If it doesn't then it generates the example from the structured value, when possible.
15
- * @param example The structured value of the example
16
- * @param mime The optional mime type of the example. When not set it
17
- * won't generate example from the structured value.
18
- * @param shape The optional shape containing this example to use with the
19
- * XML examples which needs wrapping into an element.
20
- * @returns The read or generated example.
21
- */
22
- read(example, mime, shape) {
23
- const { value, structuredValue } = example;
24
- if (!value && !structuredValue) {
25
- return undefined;
26
- }
27
- if (structuredValue && !value && mime) {
28
- return this.fromStructuredValue(mime, structuredValue, shape);
29
- }
30
- if (!mime) {
31
- return value;
32
- }
33
- if (this.mimeMatches(mime, value)) {
34
- return value;
35
- }
36
- if (structuredValue) {
37
- return this.fromStructuredValue(mime, structuredValue, shape);
38
- }
39
- return undefined;
40
- }
41
- /**
42
- * Employs some basic heuristics to determine whether the given mime type patches the content.
43
- * @param mime The mime type for the value.
44
- * @param value The value.
45
- * @returns True when the value matches the mime type.
46
- */
47
- mimeMatches(mime, value) {
48
- const trimmed = String(value).trim();
49
- if (mime.includes('json')) {
50
- // JSON string has to start with either of these characters
51
- return trimmed[0] === '{' || trimmed[0] === '[';
52
- }
53
- if (mime.includes('xml')) {
54
- return trimmed.startsWith('<');
55
- }
56
- if (mime.includes('x-www-form-urlencoded')) {
57
- return trimmed.includes('=') || trimmed.includes('&');
58
- }
59
- return true;
60
- }
61
- /**
62
- * Generates the example for the given structured value and the media type.
63
- * @param mime The mime type for the value.
64
- * @param structuredValue The structuredValue of the example.
65
- * @param shape The optional shape containing this example to use with the
66
- * XML examples which needs wrapping into an element.
67
- * @returns The generated example or null if couldn't process the data.
68
- */
69
- fromStructuredValue(mime, structuredValue, shape) {
70
- if (mime.includes('json')) {
71
- const generator = new JsonDataNodeGenerator();
72
- return generator.generate(structuredValue);
73
- }
74
- let shapeName;
75
- if (shape && shape.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {
76
- shapeName = shape.name;
77
- }
78
- else if (shape && shape.types.includes(ns.aml.vocabularies.shapes.ArrayShape)) {
79
- const typed = shape;
80
- if (typed.items && typed.items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {
81
- shapeName = typed.items.name || shape.name;
82
- }
83
- }
84
- if (mime.includes('xml')) {
85
- const generator = new XmlDataNodeGenerator();
86
- let value = generator.generate(structuredValue, shapeName);
87
- if (shape && !shapeName) {
88
- value = this.wrapXmlValue(value, shape);
89
- }
90
- return value;
91
- }
92
- if (mime.includes('x-www-form-urlencoded')) {
93
- const generator = new UrlEncodedDataNodeGenerator();
94
- return generator.generate(structuredValue, shapeName);
95
- }
96
- return undefined;
97
- }
98
- /**
99
- * Wraps the generated XML example into an element according to the `shape` properties.
100
- */
101
- wrapXmlValue(value, shape) {
102
- if (!value || !shape) {
103
- return value;
104
- }
105
- const { name } = shape;
106
- const parts = [`<${name}>`];
107
- parts.push(formatXmlValue(' ', String(value).trim()));
108
- parts.push(`</${name}>`);
109
- return parts.join('\n');
110
- }
111
- }
112
- //# sourceMappingURL=ApiExampleGenerator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiExampleGenerator.js","sourceRoot":"","sources":["../../../src/amf/ApiExampleGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,4BAA4B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAA;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAG3C;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;;;;;;;;OAUG;IACH,IAAI,CAAC,OAAwB,EAAE,IAAa,EAAE,KAAmB;Q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AAK,EAAE,KAAK,CAAC,CAAA;YACzC,CAAC;YACD,OAAO,KAAK,CAAA;QACd,CAAC;QACD,IAAI,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,EAAE,CAAC;YAC3C,MAAM,SAAS,GAAG,IAAI,2BAA2B,EAAE,CAAA;YACnD,OAAO,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,SAAS,CAAC,CAAA;QACvD,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;IAED;;OAEG;IACH,YAAY,CACV,KAAkD,EAClD,KAAmB;QAEnB,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;YACrB,OAAO,KAAK,CAAA;QACd,CAAC;QACD,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAA;QACtB,MAAM,KAAK,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,CAAA;QAC3B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAA;QACtD,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,GAAG,CAAC,CAAA;QACxB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;CACF","sourcesContent":["import { AmfNamespace as ns } from './definitions/Namespace.js'\nimport { JsonDataNodeGenerator } from './data-node/JsonDataNodeGenerator.js'\nimport { XmlDataNodeGenerator } from './data-node/XmlDataNodeGenerator.js'\nimport { UrlEncodedDataNodeGenerator } from './data-node/UrlEncodedDataNodeGenerator.js'\nimport { formatXmlValue } from './Utils.js'\nimport { IApiArrayShape, IApiDataExample, IApiDataNode, IShapeUnion } from './definitions/Shapes.js'\n\n/**\n * A class that processes AMF's Example object to read the example value\n * or to generate the example for the given media type.\n */\nexport class ApiExampleGenerator {\n /**\n * Reads or generates an example.\n * When the `mime` is set then it tries to \"guess\" whether the mime type corresponds to the value.\n * If it doesn't then it generates the example from the structured value, when possible.\n * @param example The structured value of the example\n * @param mime The optional mime type of the example. When not set it\n * won't generate example from the structured value.\n * @param shape The optional shape containing this example to use with the\n * XML examples which needs wrapping into an element.\n * @returns The read or generated example.\n */\n read(example: IApiDataExample, mime?: string, shape?: IShapeUnion): string | number | false | null | undefined {\n const { value, structuredValue } = example\n if (!value && !structuredValue) {\n return undefined\n }\n if (structuredValue && !value && mime) {\n return this.fromStructuredValue(mime, structuredValue, shape)\n }\n if (!mime) {\n return value\n }\n if (this.mimeMatches(mime, value)) {\n return value\n }\n if (structuredValue) {\n return this.fromStructuredValue(mime, structuredValue, shape)\n }\n return undefined\n }\n\n /**\n * Employs some basic heuristics to determine whether the given mime type patches the content.\n * @param mime The mime type for the value.\n * @param value The value.\n * @returns True when the value matches the mime type.\n */\n mimeMatches(mime: string, value?: string): boolean {\n const trimmed = String(value).trim()\n if (mime.includes('json')) {\n // JSON string has to start with either of these characters\n return trimmed[0] === '{' || trimmed[0] === '['\n }\n if (mime.includes('xml')) {\n return trimmed.startsWith('<')\n }\n if (mime.includes('x-www-form-urlencoded')) {\n return trimmed.includes('=') || trimmed.includes('&')\n }\n return true\n }\n\n /**\n * Generates the example for the given structured value and the media type.\n * @param mime The mime type for the value.\n * @param structuredValue The structuredValue of the example.\n * @param shape The optional shape containing this example to use with the\n * XML examples which needs wrapping into an element.\n * @returns The generated example or null if couldn't process the data.\n */\n fromStructuredValue(\n mime: string,\n structuredValue: IApiDataNode,\n shape?: IShapeUnion\n ): string | number | false | null | undefined {\n if (mime.includes('json')) {\n const generator = new JsonDataNodeGenerator()\n return generator.generate(structuredValue)\n }\n let shapeName\n if (shape && shape.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n shapeName = shape.name\n } else if (shape && shape.types.includes(ns.aml.vocabularies.shapes.ArrayShape)) {\n const typed = shape as IApiArrayShape\n if (typed.items && typed.items.types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n shapeName = typed.items.name || shape.name\n }\n }\n if (mime.includes('xml')) {\n const generator = new XmlDataNodeGenerator()\n let value = generator.generate(structuredValue, shapeName)\n if (shape && !shapeName) {\n value = this.wrapXmlValue(value, shape)\n }\n return value\n }\n if (mime.includes('x-www-form-urlencoded')) {\n const generator = new UrlEncodedDataNodeGenerator()\n return generator.generate(structuredValue, shapeName)\n }\n return undefined\n }\n\n /**\n * Wraps the generated XML example into an element according to the `shape` properties.\n */\n wrapXmlValue(\n value?: string | number | false | null | undefined,\n shape?: IShapeUnion\n ): string | number | false | null | undefined {\n if (!value || !shape) {\n return value\n }\n const { name } = shape\n const parts = [`<${name}>`]\n parts.push(formatXmlValue(' ', String(value).trim()))\n parts.push(`</${name}>`)\n return parts.join('\\n')\n }\n}\n"]}
@@ -1,68 +0,0 @@
1
- import { IApiArrayShape, IApiNodeShape, IApiPropertyShape, IApiScalarShape, IShapeUnion } from './definitions/Shapes.js';
2
- export interface IMonacoSchema {
3
- uri: string;
4
- schema: IMonacoProperty;
5
- fileMatch?: string[];
6
- }
7
- export interface IMonacoProperty {
8
- $id?: string;
9
- title: string;
10
- type: string;
11
- description?: string;
12
- readOnly?: boolean;
13
- writeOnly?: boolean;
14
- }
15
- export interface IMonacoScalarProperty extends IMonacoProperty {
16
- default?: string;
17
- pattern?: string;
18
- format?: string;
19
- exclusiveMaximum?: boolean;
20
- exclusiveMinimum?: boolean;
21
- maxLength?: number;
22
- minLength?: number;
23
- minimum?: number;
24
- maximum?: number;
25
- multipleOf?: number;
26
- enum?: string[];
27
- }
28
- export interface IMonacoObjectProperty extends IMonacoProperty {
29
- properties: Record<string, IMonacoProperty>;
30
- required: string[];
31
- additionalProperties?: boolean;
32
- minProperties?: number;
33
- maxProperties?: number;
34
- }
35
- export interface IMonacoArrayProperty extends IMonacoProperty {
36
- additionalItems?: boolean;
37
- items: {
38
- anyOf: IMonacoProperty[];
39
- };
40
- uniqueItems?: boolean;
41
- minItems?: number;
42
- maxItems?: number;
43
- required: string[];
44
- }
45
- /**
46
- * A class to generate JSON schema from an ApiShapeUnion declaration to use with the Monaco editor schemas.
47
- */
48
- export declare class ApiMonacoSchemaGenerator {
49
- schemas: IMonacoSchema[];
50
- /**
51
- * @param parentUri The URI for the fileMatch property.
52
- */
53
- generate(schema: IShapeUnion, parentUri: string): IMonacoSchema[];
54
- /**
55
- * @param parentUri The URI for the fileMatch property.
56
- */
57
- fromNodeShape(schema: IApiNodeShape, parentUri?: string): IMonacoSchema[];
58
- appendSchemaProperty(content: IMonacoObjectProperty, property: IApiPropertyShape): void;
59
- rangeToPropertySchema(range: IShapeUnion): IMonacoScalarProperty | IMonacoObjectProperty | IMonacoArrayProperty | undefined;
60
- scalarRangeToPropertySchema(schema: IApiScalarShape): IMonacoScalarProperty;
61
- /**
62
- * Translates AMF data type to JSON schema data type.
63
- */
64
- schemaTypeToJsonDataType(schemaType?: string): string;
65
- nodeShapeRangeToPropertySchema(schema: IApiNodeShape): IMonacoObjectProperty;
66
- arrayShapeRangeToPropertySchema(schema: IApiArrayShape): IMonacoArrayProperty;
67
- }
68
- //# sourceMappingURL=ApiMonacoSchemaGenerator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiMonacoSchemaGenerator.d.ts","sourceRoot":"","sources":["../../../src/amf/ApiMonacoSchemaGenerator.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,aAAa,EACb,iBAAiB,EAEjB,eAAe,EACf,WAAW,EACZ,MAAM,yBAAyB,CAAA;AAGhC,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,eAAe,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC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E,aAAa,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,aAAa,EAAE;IAwBzE,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAcvF,qBAAqB,CACnB,KAAK,EAAE,WAAW,GACjB,qBAAqB,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,SAAS;IAcnF,2BAA2B,CAAC,MAAM,EAAE,eAAe,GAAG,qBAAqB;IAyF3E;;OAEG;IACH,wBAAwB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM;IAwBrD,8BAA8B,CAAC,MAAM,EAAE,aAAa,GAAG,qBAAqB;IAiC5E,+BAA+B,CAAC,MAAM,EAAE,cAAc,GAAG,oBAAoB;CAsC9E"}
@@ -1,248 +0,0 @@
1
- import { AmfNamespace as ns } from './definitions/Namespace.js';
2
- import { collectNodeProperties } from './Utils.js';
3
- function cleanName(name) {
4
- if (!name) {
5
- return '';
6
- }
7
- return name.replace('?', '');
8
- }
9
- /**
10
- * A class to generate JSON schema from an ApiShapeUnion declaration to use with the Monaco editor schemas.
11
- */
12
- export class ApiMonacoSchemaGenerator {
13
- schemas = [];
14
- /**
15
- * @param parentUri The URI for the fileMatch property.
16
- */
17
- generate(schema, parentUri) {
18
- this.schemas = [];
19
- if (!schema) {
20
- return [];
21
- }
22
- const { types } = schema;
23
- if (types.includes(ns.w3.shacl.NodeShape)) {
24
- return this.fromNodeShape(schema, parentUri);
25
- }
26
- return [];
27
- }
28
- /**
29
- * @param parentUri The URI for the fileMatch property.
30
- */
31
- fromNodeShape(schema, parentUri) {
32
- const { id, name } = schema;
33
- const properties = collectNodeProperties(schema);
34
- const content = {
35
- title: cleanName(name),
36
- type: 'object',
37
- properties: {},
38
- required: [],
39
- };
40
- const result = {
41
- uri: id,
42
- schema: content,
43
- };
44
- if (parentUri) {
45
- result.fileMatch = [parentUri];
46
- }
47
- this.schemas.push(result);
48
- if (!Array.isArray(properties) || !properties.length) {
49
- return this.schemas;
50
- }
51
- properties.forEach((property) => this.appendSchemaProperty(content, property));
52
- return this.schemas;
53
- }
54
- appendSchemaProperty(content, property) {
55
- const { name, range, minCount } = property;
56
- if (!range) {
57
- return;
58
- }
59
- const value = this.rangeToPropertySchema(range);
60
- if (value && name) {
61
- content.properties[name] = value;
62
- if (minCount === 1) {
63
- content.required.push(name);
64
- }
65
- }
66
- }
67
- rangeToPropertySchema(range) {
68
- const { types } = range;
69
- if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {
70
- return this.scalarRangeToPropertySchema(range);
71
- }
72
- if (types.includes(ns.w3.shacl.NodeShape)) {
73
- return this.nodeShapeRangeToPropertySchema(range);
74
- }
75
- if (types.includes(ns.aml.vocabularies.shapes.ArrayShape)) {
76
- return this.arrayShapeRangeToPropertySchema(range);
77
- }
78
- return undefined;
79
- }
80
- scalarRangeToPropertySchema(schema) {
81
- const { values, description, name, displayName, defaultValueStr, exclusiveMaximum, exclusiveMinimum, minimum, maximum, minLength, maxLength, id, multipleOf, pattern, readOnly, writeOnly, } = schema;
82
- const type = this.schemaTypeToJsonDataType(schema.dataType);
83
- const result = {
84
- $id: id,
85
- type,
86
- title: cleanName(displayName || name),
87
- };
88
- if (description) {
89
- result.description = description;
90
- }
91
- if (defaultValueStr) {
92
- result.default = defaultValueStr;
93
- }
94
- if (typeof exclusiveMaximum === 'boolean') {
95
- result.exclusiveMaximum = exclusiveMaximum;
96
- }
97
- if (typeof exclusiveMinimum === 'boolean') {
98
- result.exclusiveMinimum = exclusiveMinimum;
99
- }
100
- if (typeof maxLength === 'number') {
101
- result.maxLength = maxLength;
102
- }
103
- if (typeof minLength === 'number') {
104
- result.minLength = minLength;
105
- }
106
- if (typeof minimum === 'number') {
107
- result.minimum = minimum;
108
- }
109
- if (typeof maximum === 'number') {
110
- result.maximum = maximum;
111
- }
112
- if (typeof multipleOf === 'number') {
113
- result.multipleOf = multipleOf;
114
- }
115
- if (typeof pattern === 'string') {
116
- result.pattern = pattern;
117
- }
118
- if (typeof readOnly === 'boolean') {
119
- result.readOnly = readOnly;
120
- }
121
- if (typeof writeOnly === 'boolean') {
122
- result.writeOnly = writeOnly;
123
- }
124
- switch (schema.dataType) {
125
- case ns.aml.vocabularies.shapes.dateTimeOnly:
126
- result.format = 'date-time';
127
- break;
128
- case ns.w3.xmlSchema.date:
129
- result.format = 'date';
130
- break;
131
- case ns.w3.xmlSchema.time:
132
- result.format = 'time';
133
- break;
134
- default:
135
- }
136
- if (Array.isArray(values) && values.length) {
137
- // enum properties
138
- result.enum = [];
139
- values.forEach((value) => {
140
- const { types } = value;
141
- if (types.includes(ns.aml.vocabularies.data.Scalar)) {
142
- const typed = value;
143
- if (typed.value) {
144
- ;
145
- result.enum.push(typed.value);
146
- }
147
- }
148
- });
149
- }
150
- return result;
151
- }
152
- /**
153
- * Translates AMF data type to JSON schema data type.
154
- */
155
- schemaTypeToJsonDataType(schemaType) {
156
- switch (schemaType) {
157
- case ns.aml.vocabularies.shapes.number:
158
- case ns.aml.vocabularies.shapes.integer:
159
- case ns.aml.vocabularies.shapes.float:
160
- case ns.aml.vocabularies.shapes.long:
161
- case ns.aml.vocabularies.shapes.double:
162
- case ns.w3.xmlSchema.number:
163
- case ns.w3.xmlSchema.integer:
164
- case ns.w3.xmlSchema.float:
165
- case ns.w3.xmlSchema.long:
166
- case ns.w3.xmlSchema.double:
167
- return 'number';
168
- case ns.w3.xmlSchema.boolean:
169
- case ns.aml.vocabularies.shapes.boolean:
170
- return 'boolean';
171
- case ns.aml.vocabularies.shapes.nil:
172
- case ns.w3.xmlSchema.nil:
173
- return 'null';
174
- default:
175
- return 'string';
176
- }
177
- }
178
- nodeShapeRangeToPropertySchema(schema) {
179
- const { description, name, displayName, id, readOnly, writeOnly, closed, minProperties, maxProperties } = schema;
180
- const properties = collectNodeProperties(schema);
181
- const result = {
182
- $id: id,
183
- type: 'object',
184
- title: cleanName(displayName || name),
185
- properties: {},
186
- required: [],
187
- };
188
- if (description) {
189
- result.description = description;
190
- }
191
- if (typeof readOnly === 'boolean') {
192
- result.readOnly = readOnly;
193
- }
194
- if (typeof writeOnly === 'boolean') {
195
- result.writeOnly = writeOnly;
196
- }
197
- if (typeof closed === 'boolean') {
198
- result.additionalProperties = !closed;
199
- }
200
- if (typeof minProperties === 'number') {
201
- result.minProperties = minProperties;
202
- }
203
- if (typeof maxProperties === 'number') {
204
- result.maxProperties = maxProperties;
205
- }
206
- properties.forEach((property) => this.appendSchemaProperty(result, property));
207
- return result;
208
- }
209
- arrayShapeRangeToPropertySchema(schema) {
210
- const { description, name, displayName, id, readOnly, writeOnly, items, minItems, maxItems, uniqueItems } = schema;
211
- const result = {
212
- $id: id,
213
- type: 'array',
214
- title: cleanName(displayName || name),
215
- items: {
216
- anyOf: [],
217
- },
218
- required: [],
219
- additionalItems: false,
220
- };
221
- if (description) {
222
- result.description = description;
223
- }
224
- if (typeof readOnly === 'boolean') {
225
- result.readOnly = readOnly;
226
- }
227
- if (typeof writeOnly === 'boolean') {
228
- result.writeOnly = writeOnly;
229
- }
230
- if (typeof uniqueItems === 'boolean') {
231
- result.uniqueItems = uniqueItems;
232
- }
233
- if (items) {
234
- const value = this.rangeToPropertySchema(items);
235
- if (value) {
236
- result.items.anyOf.push(value);
237
- }
238
- }
239
- if (typeof minItems === 'number') {
240
- result.minItems = minItems;
241
- }
242
- if (typeof maxItems === 'number') {
243
- result.maxItems = maxItems;
244
- }
245
- return result;
246
- }
247
- }
248
- //# sourceMappingURL=ApiMonacoSchemaGenerator.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiMonacoSchemaGenerator.js","sourceRoot":"","sources":["../../../src/amf/ApiMonacoSchemaGenerator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,EAAE,EAAE,MAAM,4BAA4B,CAAA;AAS/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAkDlD,SAAS,SAAS,CAAC,IAAa;IAC9B,IAAI,CAAC,IAAI,EAA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AC;QACH,CAAC;QACD,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAC5B,CAAC;QACD,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjC,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAC5B,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF","sourcesContent":["import { AmfNamespace as ns } from './definitions/Namespace.js'\nimport {\n IApiArrayShape,\n IApiNodeShape,\n IApiPropertyShape,\n IApiScalarNode,\n IApiScalarShape,\n IShapeUnion,\n} from './definitions/Shapes.js'\nimport { collectNodeProperties } from './Utils.js'\n\nexport interface IMonacoSchema {\n uri: string\n schema: IMonacoProperty\n fileMatch?: string[]\n}\n\nexport interface IMonacoProperty {\n $id?: string\n title: string\n type: string\n description?: string\n readOnly?: boolean\n writeOnly?: boolean\n}\n\nexport interface IMonacoScalarProperty extends IMonacoProperty {\n default?: string\n pattern?: string\n format?: string\n exclusiveMaximum?: boolean\n exclusiveMinimum?: boolean\n maxLength?: number\n minLength?: number\n minimum?: number\n maximum?: number\n multipleOf?: number\n enum?: string[]\n}\n\nexport interface IMonacoObjectProperty extends IMonacoProperty {\n properties: Record<string, IMonacoProperty>\n required: string[]\n additionalProperties?: boolean\n minProperties?: number\n maxProperties?: number\n}\n\nexport interface IMonacoArrayProperty extends IMonacoProperty {\n additionalItems?: boolean\n items: {\n anyOf: IMonacoProperty[]\n }\n uniqueItems?: boolean\n minItems?: number\n maxItems?: number\n required: string[]\n}\n\nfunction cleanName(name?: string): string {\n if (!name) {\n return ''\n }\n return name.replace('?', '')\n}\n\n/**\n * A class to generate JSON schema from an ApiShapeUnion declaration to use with the Monaco editor schemas.\n */\nexport class ApiMonacoSchemaGenerator {\n schemas: IMonacoSchema[] = []\n\n /**\n * @param parentUri The URI for the fileMatch property.\n */\n generate(schema: IShapeUnion, parentUri: string): IMonacoSchema[] {\n this.schemas = []\n if (!schema) {\n return []\n }\n const { types } = schema\n if (types.includes(ns.w3.shacl.NodeShape)) {\n return this.fromNodeShape(schema as IApiNodeShape, parentUri)\n }\n return []\n }\n\n /**\n * @param parentUri The URI for the fileMatch property.\n */\n fromNodeShape(schema: IApiNodeShape, parentUri?: string): IMonacoSchema[] {\n const { id, name } = schema\n const properties = collectNodeProperties(schema)\n const content: IMonacoObjectProperty = {\n title: cleanName(name),\n type: 'object',\n properties: {},\n required: [],\n }\n const result: IMonacoSchema = {\n uri: id,\n schema: content,\n }\n if (parentUri) {\n result.fileMatch = [parentUri]\n }\n this.schemas.push(result)\n if (!Array.isArray(properties) || !properties.length) {\n return this.schemas\n }\n properties.forEach((property) => this.appendSchemaProperty(content, property))\n return this.schemas\n }\n\n appendSchemaProperty(content: IMonacoObjectProperty, property: IApiPropertyShape): void {\n const { name, range, minCount } = property\n if (!range) {\n return\n }\n const value = this.rangeToPropertySchema(range)\n if (value && name) {\n content.properties[name] = value\n if (minCount === 1) {\n content.required.push(name)\n }\n }\n }\n\n rangeToPropertySchema(\n range: IShapeUnion\n ): IMonacoScalarProperty | IMonacoObjectProperty | IMonacoArrayProperty | undefined {\n const { types } = range\n if (types.includes(ns.aml.vocabularies.shapes.ScalarShape)) {\n return this.scalarRangeToPropertySchema(range as IApiScalarShape)\n }\n if (types.includes(ns.w3.shacl.NodeShape)) {\n return this.nodeShapeRangeToPropertySchema(range as IApiNodeShape)\n }\n if (types.includes(ns.aml.vocabularies.shapes.ArrayShape)) {\n return this.arrayShapeRangeToPropertySchema(range as IApiArrayShape)\n }\n return undefined\n }\n\n scalarRangeToPropertySchema(schema: IApiScalarShape): IMonacoScalarProperty {\n const {\n values,\n description,\n name,\n displayName,\n defaultValueStr,\n exclusiveMaximum,\n exclusiveMinimum,\n minimum,\n maximum,\n minLength,\n maxLength,\n id,\n multipleOf,\n pattern,\n readOnly,\n writeOnly,\n } = schema\n const type = this.schemaTypeToJsonDataType(schema.dataType)\n const result: IMonacoScalarProperty = {\n $id: id,\n type,\n title: cleanName(displayName || name),\n }\n if (description) {\n result.description = description\n }\n if (defaultValueStr) {\n result.default = defaultValueStr\n }\n if (typeof exclusiveMaximum === 'boolean') {\n result.exclusiveMaximum = exclusiveMaximum\n }\n if (typeof exclusiveMinimum === 'boolean') {\n result.exclusiveMinimum = exclusiveMinimum\n }\n if (typeof maxLength === 'number') {\n result.maxLength = maxLength\n }\n if (typeof minLength === 'number') {\n result.minLength = minLength\n }\n if (typeof minimum === 'number') {\n result.minimum = minimum\n }\n if (typeof maximum === 'number') {\n result.maximum = maximum\n }\n if (typeof multipleOf === 'number') {\n result.multipleOf = multipleOf\n }\n if (typeof pattern === 'string') {\n result.pattern = pattern\n }\n if (typeof readOnly === 'boolean') {\n result.readOnly = readOnly\n }\n if (typeof writeOnly === 'boolean') {\n result.writeOnly = writeOnly\n }\n switch (schema.dataType) {\n case ns.aml.vocabularies.shapes.dateTimeOnly:\n result.format = 'date-time'\n break\n case ns.w3.xmlSchema.date:\n result.format = 'date'\n break\n case ns.w3.xmlSchema.time:\n result.format = 'time'\n break\n default:\n }\n if (Array.isArray(values) && values.length) {\n // enum properties\n result.enum = []\n values.forEach((value) => {\n const { types } = value\n if (types.includes(ns.aml.vocabularies.data.Scalar)) {\n const typed = value as IApiScalarNode\n if (typed.value) {\n ;(result.enum as string[]).push(typed.value)\n }\n }\n })\n }\n return result\n }\n\n /**\n * Translates AMF data type to JSON schema data type.\n */\n schemaTypeToJsonDataType(schemaType?: string): string {\n switch (schemaType) {\n case ns.aml.vocabularies.shapes.number:\n case ns.aml.vocabularies.shapes.integer:\n case ns.aml.vocabularies.shapes.float:\n case ns.aml.vocabularies.shapes.long:\n case ns.aml.vocabularies.shapes.double:\n case ns.w3.xmlSchema.number:\n case ns.w3.xmlSchema.integer:\n case ns.w3.xmlSchema.float:\n case ns.w3.xmlSchema.long:\n case ns.w3.xmlSchema.double:\n return 'number'\n case ns.w3.xmlSchema.boolean:\n case ns.aml.vocabularies.shapes.boolean:\n return 'boolean'\n case ns.aml.vocabularies.shapes.nil:\n case ns.w3.xmlSchema.nil:\n return 'null'\n default:\n return 'string'\n }\n }\n\n nodeShapeRangeToPropertySchema(schema: IApiNodeShape): IMonacoObjectProperty {\n const { description, name, displayName, id, readOnly, writeOnly, closed, minProperties, maxProperties } = schema\n const properties = collectNodeProperties(schema)\n\n const result: IMonacoObjectProperty = {\n $id: id,\n type: 'object',\n title: cleanName(displayName || name),\n properties: {},\n required: [],\n }\n if (description) {\n result.description = description\n }\n if (typeof readOnly === 'boolean') {\n result.readOnly = readOnly\n }\n if (typeof writeOnly === 'boolean') {\n result.writeOnly = writeOnly\n }\n if (typeof closed === 'boolean') {\n result.additionalProperties = !closed\n }\n if (typeof minProperties === 'number') {\n result.minProperties = minProperties\n }\n if (typeof maxProperties === 'number') {\n result.maxProperties = maxProperties\n }\n properties.forEach((property) => this.appendSchemaProperty(result, property))\n return result\n }\n\n arrayShapeRangeToPropertySchema(schema: IApiArrayShape): IMonacoArrayProperty {\n const { description, name, displayName, id, readOnly, writeOnly, items, minItems, maxItems, uniqueItems } = schema\n const result: IMonacoArrayProperty = {\n $id: id,\n type: 'array',\n title: cleanName(displayName || name),\n items: {\n anyOf: [],\n },\n required: [],\n additionalItems: false,\n }\n if (description) {\n result.description = description\n }\n if (typeof readOnly === 'boolean') {\n result.readOnly = readOnly\n }\n if (typeof writeOnly === 'boolean') {\n result.writeOnly = writeOnly\n }\n if (typeof uniqueItems === 'boolean') {\n result.uniqueItems = uniqueItems\n }\n if (items) {\n const value = this.rangeToPropertySchema(items)\n if (value) {\n result.items.anyOf.push(value)\n }\n }\n if (typeof minItems === 'number') {\n result.minItems = minItems\n }\n if (typeof maxItems === 'number') {\n result.maxItems = maxItems\n }\n return result\n }\n}\n"]}
@@ -1,56 +0,0 @@
1
- import { IApiDataExample, IApiPropertyShape, IShapeUnion } from './definitions/Shapes.js';
2
- import { ShapeBase, IShapeRenderOptions } from './shape/ShapeBase.js';
3
- export interface ISchemaExample extends IApiDataExample {
4
- /**
5
- * The value to render as the example value.
6
- */
7
- renderValue?: string | number | boolean | null | undefined;
8
- label?: string;
9
- }
10
- /**
11
- * A class that processes AMF's Shape to auto-generate a schema from examples/type for a given media type.
12
- * This should be used when examples for the Shape are not available but the application still needs to
13
- * render an example or a schema from the Shape.
14
- * If examples can be found directly in the shape, use the `ApiExampleGenerator` instead.
15
- */
16
- export declare class ApiSchemaGenerator {
17
- mime: string;
18
- opts: Readonly<IShapeRenderOptions>;
19
- generator?: ShapeBase;
20
- /**
21
- *
22
- * @param mime The example mime type to format the generated example.
23
- * @param opts Optional configuration.
24
- */
25
- constructor(mime: string, opts?: IShapeRenderOptions);
26
- /**
27
- * @param shape The Shape definition
28
- * @param mime The mime type for the value.
29
- * @returns Customized Example with the `renderValue` that is the generated Example value.
30
- */
31
- static asExample(shape: IShapeUnion, mime: string, opts?: IShapeRenderOptions): ISchemaExample | undefined;
32
- /**
33
- * @param shape The Shape definition
34
- * @param mime The mime type for the value.
35
- * @returns The generated schema
36
- */
37
- static asSchema(shape: IShapeUnion, mime: string, opts?: IShapeRenderOptions): string | number | boolean | null | undefined;
38
- /**
39
- * Generates the schema from the AMF shape.
40
- *
41
- * @param shape The Shape definition
42
- */
43
- generate(shape: IShapeUnion | IApiPropertyShape<IShapeUnion>): string | number | boolean | null | undefined;
44
- /**
45
- * @link {#generate()}
46
- * @param shape The Shape definition
47
- */
48
- toValue(shape: IShapeUnion): string | number | boolean | null | undefined;
49
- /**
50
- * Generates an API Example object with the value to render.
51
- * @param shape The Shape definition
52
- * @returns Customized Example with the `renderValue` that is the generated Example value.
53
- */
54
- toExample(shape: IShapeUnion): ISchemaExample | undefined;
55
- }
56
- //# sourceMappingURL=ApiSchemaGenerator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ApiSchemaGenerator.d.ts","sourceRoot":"","sources":["../../../src/amf/ApiSchemaGenerator.ts"],"names":[],"mappings":"AACA,OAAO,EAAgB,eAA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