@speclynx/apidom-ls 2.11.6 → 2.12.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 (256) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/apidom-ls.browser.min.js +3 -3
  3. package/package.json +35 -30
  4. package/src/config/arazzo/JSONSchema/{description--no-script-tags.cjs → lint/description--no-script-tags.cjs} +2 -2
  5. package/src/config/arazzo/JSONSchema/{description--no-script-tags.mjs → lint/description--no-script-tags.mjs} +2 -2
  6. package/src/config/arazzo/JSONSchema/lint/index.cjs +81 -0
  7. package/src/config/arazzo/JSONSchema/lint/index.mjs +72 -0
  8. package/src/config/arazzo/JSONSchema/{title--no-script-tags.cjs → lint/title--no-script-tags.cjs} +2 -2
  9. package/src/config/arazzo/JSONSchema/{title--no-script-tags.mjs → lint/title--no-script-tags.mjs} +2 -2
  10. package/src/config/arazzo/JSONSchema/meta.cjs +2 -2
  11. package/src/config/arazzo/JSONSchema/meta.mjs +1 -1
  12. package/src/config/arazzo/arazzoSpecification1/lint/$self--format-uri.cjs +23 -0
  13. package/src/config/arazzo/arazzoSpecification1/lint/$self--format-uri.mjs +16 -0
  14. package/src/config/arazzo/arazzoSpecification1/lint/$self--no-fragment.cjs +23 -0
  15. package/src/config/arazzo/arazzoSpecification1/lint/$self--no-fragment.mjs +16 -0
  16. package/src/config/{ads/info/lint/title--type.cjs → arazzo/arazzoSpecification1/lint/$self--type.cjs} +8 -6
  17. package/src/config/{ads/info/lint/description--type.mjs → arazzo/arazzoSpecification1/lint/$self--type.mjs} +8 -6
  18. package/src/config/arazzo/arazzoSpecification1/lint/{allowed-fields.cjs → allowed-fields-1-0.cjs} +4 -3
  19. package/src/config/arazzo/arazzoSpecification1/lint/{allowed-fields.mjs → allowed-fields-1-0.mjs} +4 -4
  20. package/src/config/arazzo/{failureAction/lint/allowed-fields.cjs → arazzoSpecification1/lint/allowed-fields-1-1.cjs} +4 -4
  21. package/src/config/arazzo/arazzoSpecification1/lint/allowed-fields-1-1.mjs +14 -0
  22. package/src/config/arazzo/arazzoSpecification1/lint/arazzo--pattern.cjs +2 -2
  23. package/src/config/arazzo/arazzoSpecification1/lint/arazzo--pattern.mjs +2 -2
  24. package/src/config/arazzo/arazzoSpecification1/lint/index.cjs +6 -2
  25. package/src/config/arazzo/arazzoSpecification1/lint/index.mjs +6 -2
  26. package/src/config/arazzo/config.cjs +6 -4
  27. package/src/config/arazzo/config.mjs +4 -2
  28. package/src/config/arazzo/criterion/lint/type--equals.cjs +1 -1
  29. package/src/config/arazzo/criterion/lint/type--equals.mjs +1 -1
  30. package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/index.cjs +7 -3
  31. package/src/config/arazzo/expressionType/lint/index.mjs +12 -0
  32. package/src/config/arazzo/{criterionExpressionType/lint/type--equals.cjs → expressionType/lint/type--equals-1-0.cjs} +5 -4
  33. package/src/config/arazzo/{criterionExpressionType/lint/type--equals.mjs → expressionType/lint/type--equals-1-0.mjs} +5 -5
  34. package/src/config/arazzo/expressionType/lint/type--equals-1-1.cjs +23 -0
  35. package/src/config/arazzo/expressionType/lint/type--equals-1-1.mjs +16 -0
  36. package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--required.cjs +1 -1
  37. package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--required.mjs +1 -1
  38. package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--type.cjs +1 -1
  39. package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/type--type.mjs +1 -1
  40. package/src/config/arazzo/expressionType/lint/version--equals-jsonpath.cjs +30 -0
  41. package/src/config/arazzo/expressionType/lint/version--equals-jsonpath.mjs +23 -0
  42. package/src/config/arazzo/expressionType/lint/version--equals-jsonpointer.cjs +30 -0
  43. package/src/config/arazzo/expressionType/lint/version--equals-jsonpointer.mjs +23 -0
  44. package/src/config/arazzo/expressionType/lint/version--equals-xpath.cjs +30 -0
  45. package/src/config/arazzo/expressionType/lint/version--equals-xpath.mjs +23 -0
  46. package/src/config/arazzo/{criterionExpressionType/lint/version--required.cjs → expressionType/lint/version--required-1-0.cjs} +9 -4
  47. package/src/config/arazzo/expressionType/lint/version--required-1-0.mjs +26 -0
  48. package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/version--type.cjs +1 -1
  49. package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/version--type.mjs +1 -1
  50. package/src/config/arazzo/failureAction/lint/allowed-fields-1-0.cjs +27 -0
  51. package/src/config/arazzo/failureAction/lint/allowed-fields-1-0.mjs +19 -0
  52. package/src/config/arazzo/failureAction/lint/allowed-fields-1-1.cjs +25 -0
  53. package/src/config/arazzo/failureAction/lint/{allowed-fields.mjs → allowed-fields-1-1.mjs} +9 -5
  54. package/src/config/arazzo/failureAction/lint/index.cjs +8 -2
  55. package/src/config/arazzo/failureAction/lint/index.mjs +8 -2
  56. package/src/config/arazzo/failureAction/lint/name--required.cjs +4 -0
  57. package/src/config/arazzo/failureAction/lint/name--required.mjs +4 -0
  58. package/src/config/arazzo/failureAction/lint/parameters--only-workflow-id.cjs +28 -0
  59. package/src/config/arazzo/failureAction/lint/parameters--only-workflow-id.mjs +21 -0
  60. package/src/config/arazzo/failureAction/lint/parameters--type.cjs +23 -0
  61. package/src/config/arazzo/failureAction/lint/parameters--type.mjs +16 -0
  62. package/src/config/arazzo/failureAction/lint/step-id--pattern.cjs +26 -0
  63. package/src/config/arazzo/failureAction/lint/step-id--pattern.mjs +18 -0
  64. package/src/config/arazzo/failureAction/lint/type--required.cjs +4 -0
  65. package/src/config/arazzo/failureAction/lint/type--required.mjs +4 -0
  66. package/src/config/arazzo/failureAction/lint/workflow-id--pattern.cjs +35 -0
  67. package/src/config/arazzo/failureAction/lint/workflow-id--pattern.mjs +27 -0
  68. package/src/config/arazzo/failureAction/lint/workflow-id--source-type-consistency.cjs +23 -0
  69. package/src/config/arazzo/failureAction/lint/workflow-id--source-type-consistency.mjs +16 -0
  70. package/src/config/arazzo/parameter/lint/allowed-fields.cjs +4 -0
  71. package/src/config/arazzo/parameter/lint/allowed-fields.mjs +4 -0
  72. package/src/config/arazzo/parameter/lint/name--required.cjs +4 -0
  73. package/src/config/arazzo/parameter/lint/name--required.mjs +4 -0
  74. package/src/config/arazzo/parameter/lint/value--required.cjs +4 -0
  75. package/src/config/arazzo/parameter/lint/value--required.mjs +4 -0
  76. package/src/config/arazzo/payloadReplacement/lint/allowed-fields-1-0.cjs +23 -0
  77. package/src/config/arazzo/payloadReplacement/lint/allowed-fields-1-0.mjs +15 -0
  78. package/src/config/arazzo/{successAction/lint/allowed-fields.cjs → payloadReplacement/lint/allowed-fields-1-1.cjs} +4 -4
  79. package/src/config/arazzo/{successAction/lint/allowed-fields.mjs → payloadReplacement/lint/allowed-fields-1-1.mjs} +5 -5
  80. package/src/config/arazzo/payloadReplacement/lint/index.cjs +5 -2
  81. package/src/config/arazzo/payloadReplacement/lint/index.mjs +5 -2
  82. package/src/config/arazzo/payloadReplacement/lint/target-selector-type--equals.cjs +30 -0
  83. package/src/config/arazzo/payloadReplacement/lint/target-selector-type--equals.mjs +23 -0
  84. package/src/config/arazzo/payloadReplacement/lint/target-selector-type--type.cjs +31 -0
  85. package/src/config/arazzo/payloadReplacement/lint/target-selector-type--type.mjs +24 -0
  86. package/src/config/arazzo/{payloadReplacement → selector}/lint/allowed-fields.cjs +2 -2
  87. package/src/config/arazzo/{payloadReplacement → selector}/lint/allowed-fields.mjs +3 -3
  88. package/src/config/arazzo/selector/lint/context--type.cjs +23 -0
  89. package/src/config/arazzo/selector/lint/context--type.mjs +16 -0
  90. package/src/config/arazzo/selector/lint/index.cjs +18 -0
  91. package/src/config/arazzo/selector/lint/index.mjs +10 -0
  92. package/src/config/arazzo/selector/lint/selector--type.cjs +23 -0
  93. package/src/config/arazzo/selector/lint/selector--type.mjs +16 -0
  94. package/src/config/arazzo/selector/lint/type--equals.cjs +30 -0
  95. package/src/config/arazzo/selector/lint/type--equals.mjs +23 -0
  96. package/src/config/arazzo/selector/lint/type--type.cjs +31 -0
  97. package/src/config/arazzo/selector/lint/type--type.mjs +24 -0
  98. package/src/config/{ads/info → arazzo/selector}/meta.cjs +1 -5
  99. package/src/config/arazzo/selector/meta.mjs +5 -0
  100. package/src/config/arazzo/sourceDescription/lint/index.cjs +3 -2
  101. package/src/config/arazzo/sourceDescription/lint/index.mjs +3 -2
  102. package/src/config/arazzo/sourceDescription/lint/name--pattern.cjs +2 -2
  103. package/src/config/arazzo/sourceDescription/lint/name--pattern.mjs +2 -2
  104. package/src/config/arazzo/sourceDescription/lint/{type--equals.cjs → type--equals-1-0.cjs} +3 -3
  105. package/src/config/arazzo/sourceDescription/lint/{type--equals.mjs → type--equals-1-0.mjs} +4 -4
  106. package/src/config/arazzo/sourceDescription/lint/type--equals-1-1.cjs +23 -0
  107. package/src/config/arazzo/sourceDescription/lint/type--equals-1-1.mjs +16 -0
  108. package/src/config/arazzo/step/lint/action--equals.cjs +23 -0
  109. package/src/config/arazzo/step/lint/action--equals.mjs +16 -0
  110. package/src/config/{ads/info/lint/description--type.cjs → arazzo/step/lint/action--type.cjs} +8 -6
  111. package/src/config/arazzo/step/lint/action--type.mjs +16 -0
  112. package/src/config/arazzo/step/lint/{allowed-fields.cjs → allowed-fields-1-0.cjs} +5 -3
  113. package/src/config/arazzo/step/lint/{allowed-fields.mjs → allowed-fields-1-0.mjs} +5 -4
  114. package/src/config/arazzo/step/lint/allowed-fields-1-1.cjs +21 -0
  115. package/src/config/arazzo/step/lint/allowed-fields-1-1.mjs +14 -0
  116. package/src/config/arazzo/step/lint/channel-path--mutually-exclusive.cjs +28 -0
  117. package/src/config/arazzo/step/lint/channel-path--mutually-exclusive.mjs +21 -0
  118. package/src/config/arazzo/step/lint/channel-path--type.cjs +23 -0
  119. package/src/config/arazzo/step/lint/channel-path--type.mjs +16 -0
  120. package/src/config/arazzo/step/lint/correlation-id--only-action-receive.cjs +34 -0
  121. package/src/config/arazzo/step/lint/correlation-id--only-action-receive.mjs +26 -0
  122. package/src/config/arazzo/step/lint/correlation-id--requires-action.cjs +30 -0
  123. package/src/config/arazzo/step/lint/correlation-id--requires-action.mjs +22 -0
  124. package/src/config/arazzo/step/lint/depends-on--resolved.cjs +32 -0
  125. package/src/config/arazzo/step/lint/depends-on--resolved.mjs +24 -0
  126. package/src/config/arazzo/step/lint/depends-on--source-type-consistency.cjs +23 -0
  127. package/src/config/arazzo/step/lint/depends-on--source-type-consistency.mjs +16 -0
  128. package/src/config/arazzo/step/lint/depends-on--type.cjs +23 -0
  129. package/src/config/arazzo/step/lint/depends-on--type.mjs +16 -0
  130. package/src/config/arazzo/step/lint/depends-on--unique.cjs +23 -0
  131. package/src/config/arazzo/step/lint/depends-on--unique.mjs +16 -0
  132. package/src/config/arazzo/step/lint/index.cjs +20 -3
  133. package/src/config/arazzo/step/lint/index.mjs +20 -3
  134. package/src/config/arazzo/step/lint/operation-id--mutually-exclusive.cjs +2 -2
  135. package/src/config/arazzo/step/lint/operation-id--mutually-exclusive.mjs +2 -2
  136. package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-0.cjs +25 -0
  137. package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-0.mjs +17 -0
  138. package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-1.cjs +23 -0
  139. package/src/config/arazzo/step/lint/operation-id--source-type-consistency-1-1.mjs +16 -0
  140. package/src/config/arazzo/step/lint/operation-path--mutually-exclusive.cjs +2 -2
  141. package/src/config/arazzo/step/lint/operation-path--mutually-exclusive.mjs +2 -2
  142. package/src/config/arazzo/step/lint/{outputs--values-type.cjs → outputs--values-type-1-0.cjs} +5 -3
  143. package/src/config/arazzo/step/lint/{outputs--values-type.mjs → outputs--values-type-1-0.mjs} +5 -4
  144. package/src/config/arazzo/step/lint/outputs--values-type-1-1.cjs +24 -0
  145. package/src/config/arazzo/step/lint/outputs--values-type-1-1.mjs +16 -0
  146. package/src/config/arazzo/step/lint/step-id--pattern.cjs +2 -2
  147. package/src/config/arazzo/step/lint/step-id--pattern.mjs +2 -2
  148. package/src/config/arazzo/step/lint/timeout--type.cjs +23 -0
  149. package/src/config/arazzo/step/lint/timeout--type.mjs +16 -0
  150. package/src/config/arazzo/step/lint/workflow-id--mutually-exclusive.cjs +2 -2
  151. package/src/config/arazzo/step/lint/workflow-id--mutually-exclusive.mjs +2 -2
  152. package/src/config/arazzo/step/lint/workflow-id--pattern.cjs +34 -0
  153. package/src/config/arazzo/step/lint/workflow-id--pattern.mjs +26 -0
  154. package/src/config/arazzo/step/lint/workflow-id--source-type-consistency.cjs +23 -0
  155. package/src/config/arazzo/step/lint/workflow-id--source-type-consistency.mjs +16 -0
  156. package/src/config/arazzo/successAction/lint/allowed-fields-1-0.cjs +27 -0
  157. package/src/config/arazzo/successAction/lint/allowed-fields-1-0.mjs +19 -0
  158. package/src/config/arazzo/successAction/lint/allowed-fields-1-1.cjs +25 -0
  159. package/src/config/arazzo/successAction/lint/allowed-fields-1-1.mjs +18 -0
  160. package/src/config/arazzo/successAction/lint/index.cjs +8 -2
  161. package/src/config/arazzo/successAction/lint/index.mjs +8 -2
  162. package/src/config/arazzo/successAction/lint/name--required.cjs +4 -0
  163. package/src/config/arazzo/successAction/lint/name--required.mjs +4 -0
  164. package/src/config/arazzo/successAction/lint/parameters--only-workflow-id.cjs +28 -0
  165. package/src/config/arazzo/successAction/lint/parameters--only-workflow-id.mjs +21 -0
  166. package/src/config/arazzo/successAction/lint/parameters--type.cjs +23 -0
  167. package/src/config/arazzo/successAction/lint/parameters--type.mjs +16 -0
  168. package/src/config/arazzo/successAction/lint/step-id--pattern.cjs +26 -0
  169. package/src/config/arazzo/successAction/lint/step-id--pattern.mjs +18 -0
  170. package/src/config/arazzo/successAction/lint/type--required.cjs +4 -0
  171. package/src/config/arazzo/successAction/lint/type--required.mjs +4 -0
  172. package/src/config/arazzo/successAction/lint/workflow-id--pattern.cjs +35 -0
  173. package/src/config/arazzo/successAction/lint/workflow-id--pattern.mjs +27 -0
  174. package/src/config/arazzo/successAction/lint/workflow-id--source-type-consistency.cjs +23 -0
  175. package/src/config/arazzo/successAction/lint/workflow-id--source-type-consistency.mjs +16 -0
  176. package/src/config/arazzo/target-specs.cjs +33 -5
  177. package/src/config/arazzo/target-specs.mjs +32 -4
  178. package/src/config/arazzo/workflow/lint/depends-on--source-type-consistency.cjs +23 -0
  179. package/src/config/arazzo/workflow/lint/depends-on--source-type-consistency.mjs +16 -0
  180. package/src/config/arazzo/workflow/lint/index.cjs +4 -2
  181. package/src/config/arazzo/workflow/lint/index.mjs +4 -2
  182. package/src/config/arazzo/workflow/lint/{outputs--values-type.cjs → outputs--values-type-1-0.cjs} +5 -3
  183. package/src/config/arazzo/workflow/lint/{outputs--values-type.mjs → outputs--values-type-1-0.mjs} +5 -4
  184. package/src/config/arazzo/workflow/lint/outputs--values-type-1-1.cjs +24 -0
  185. package/src/config/arazzo/workflow/lint/outputs--values-type-1-1.mjs +16 -0
  186. package/src/config/arazzo/workflow/lint/workflow-id--pattern.cjs +2 -2
  187. package/src/config/arazzo/workflow/lint/workflow-id--pattern.mjs +2 -2
  188. package/src/config/codes.cjs +50 -17
  189. package/src/config/codes.mjs +50 -17
  190. package/src/config/config.cjs +6 -8
  191. package/src/config/config.mjs +0 -2
  192. package/src/config/openapi/schema/lint.cjs +5 -1
  193. package/src/config/openapi/schema/lint.mjs +5 -1
  194. package/src/config/symbols.cjs +3 -4
  195. package/src/config/symbols.mjs +1 -2
  196. package/src/config/tokens.cjs +5 -6
  197. package/src/config/tokens.mjs +1 -2
  198. package/src/index.cjs +7 -0
  199. package/src/index.mjs +1 -0
  200. package/src/services/completion/completion-service.cjs +1 -1
  201. package/src/services/completion/completion-service.mjs +1 -1
  202. package/src/services/hover/hover-service.cjs +1 -1
  203. package/src/services/hover/hover-service.mjs +1 -1
  204. package/src/services/validation/linter-functions.cjs +150 -1
  205. package/src/services/validation/linter-functions.mjs +151 -2
  206. package/src/services/validation/providers/arazzo-11-json-schema-validation-provider.cjs +852 -0
  207. package/src/services/validation/providers/arazzo-11-json-schema-validation-provider.mjs +845 -0
  208. package/src/services/validation/validation-service.cjs +12 -4
  209. package/src/services/validation/validation-service.mjs +12 -4
  210. package/src/utils/utils.cjs +5 -1
  211. package/src/utils/utils.mjs +5 -1
  212. package/types/apidom-ls.d.ts +82 -17
  213. package/src/config/ads/config.cjs +0 -25
  214. package/src/config/ads/config.mjs +0 -18
  215. package/src/config/ads/info/completion.cjs +0 -31
  216. package/src/config/ads/info/completion.mjs +0 -25
  217. package/src/config/ads/info/documentation.cjs +0 -14
  218. package/src/config/ads/info/documentation.mjs +0 -8
  219. package/src/config/ads/info/lint/allowed-fields.cjs +0 -19
  220. package/src/config/ads/info/lint/allowed-fields.mjs +0 -12
  221. package/src/config/ads/info/lint/index.cjs +0 -13
  222. package/src/config/ads/info/lint/index.mjs +0 -6
  223. package/src/config/ads/info/lint/title--required.cjs +0 -27
  224. package/src/config/ads/info/lint/title--required.mjs +0 -20
  225. package/src/config/ads/info/lint/title--type.mjs +0 -14
  226. package/src/config/ads/info/meta.mjs +0 -9
  227. package/src/config/ads/main/completion.cjs +0 -72
  228. package/src/config/ads/main/completion.mjs +0 -66
  229. package/src/config/ads/main/documentation.cjs +0 -23
  230. package/src/config/ads/main/documentation.mjs +0 -17
  231. package/src/config/ads/main/lint/allowed-fields.cjs +0 -19
  232. package/src/config/ads/main/lint/allowed-fields.mjs +0 -12
  233. package/src/config/ads/main/lint/index.cjs +0 -14
  234. package/src/config/ads/main/lint/index.mjs +0 -7
  235. package/src/config/ads/main/lint/info--required.cjs +0 -27
  236. package/src/config/ads/main/lint/info--required.mjs +0 -20
  237. package/src/config/ads/main/lint/info--type.cjs +0 -21
  238. package/src/config/ads/main/lint/info--type.mjs +0 -14
  239. package/src/config/ads/main/lint/version--pattern.cjs +0 -27
  240. package/src/config/ads/main/lint/version--pattern.mjs +0 -20
  241. package/src/config/ads/main/lint/version--required.cjs +0 -27
  242. package/src/config/ads/main/lint/version--required.mjs +0 -20
  243. package/src/config/ads/main/meta.cjs +0 -16
  244. package/src/config/ads/main/meta.mjs +0 -9
  245. package/src/config/ads/symbols.cjs +0 -8
  246. package/src/config/ads/symbols.mjs +0 -2
  247. package/src/config/ads/tokens.cjs +0 -8
  248. package/src/config/ads/tokens.mjs +0 -2
  249. package/src/config/arazzo/JSONSchema/lint.cjs +0 -77
  250. package/src/config/arazzo/JSONSchema/lint.mjs +0 -68
  251. package/src/config/arazzo/criterionExpressionType/lint/index.mjs +0 -8
  252. package/src/config/arazzo/criterionExpressionType/lint/version--required.mjs +0 -22
  253. /package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/allowed-fields.cjs +0 -0
  254. /package/src/config/arazzo/{criterionExpressionType → expressionType}/lint/allowed-fields.mjs +0 -0
  255. /package/src/config/arazzo/{criterionExpressionType → expressionType}/meta.cjs +0 -0
  256. /package/src/config/arazzo/{criterionExpressionType → expressionType}/meta.mjs +0 -0
@@ -1,6 +1,5 @@
1
1
  import configAsyncAPI from "./asyncapi/config.mjs";
2
2
  import configOpenAPI from "./openapi/config.mjs";
3
- import configADS from "./ads/config.mjs";
4
3
  import configJSONSchema202012 from "./json-schema/2020-12/config.mjs";
5
4
  import configArazzo from "./arazzo/config.mjs";
6
5
  import configOverlay from "./overlay/config.mjs";
@@ -16,7 +15,6 @@ export function config() {
16
15
  metadataMaps: {
17
16
  openapi: configOpenAPI,
18
17
  asyncapi: configAsyncAPI,
19
- ads: configADS,
20
18
  arazzo: configArazzo,
21
19
  overlay: configOverlay,
22
20
  'json-schema-2020-12': configJSONSchema202012
@@ -86,7 +86,11 @@ var _writeOnlyType = _interopRequireDefault(require("../../common/schema/lint/wr
86
86
  var _exampleDeprecated = _interopRequireDefault(require("../../common/schema/lint/example--deprecated.cjs"));
87
87
  var _typeArrayNonItems = _interopRequireDefault(require("../../common/schema/lint/type--array-non-items.cjs"));
88
88
  var _targetSpecs2 = require("../target-specs.cjs");
89
- // below are older rule variants that need to be replaced
89
+ // below are older rule variants that need to be replaced.
90
+ // $id and $ref are deliberately absent: the composed JSON Schema 2020-12 rules
91
+ // above already cover them (codes 8030100 / 8030300). importing the
92
+ // common/schema equivalents ($id--format-uri, $ref--valid) adds functionally
93
+ // identical rules and yields duplicate diagnostics on the same range.
90
94
 
91
95
  const schemaLints = [...(0, _targetSpecs.compose)([_lint.default], (0, _targetSpecs.assoc)(_targetSpecs2.OpenAPI31)), _additionalItemsNonArray.default, _additionalItemsType.default, _additionalItemsTypeOpenapi31Asyncapi.default, _additionalPropertiesNonObject.default, _additionalPropertiesType.default, _allOfType.default, _allOfTypeOpenapi31Asyncapi.default, _anyOfTypeOpenapi31Asyncapi.default, _anyOfType.default, _containsNonArray.default, _containsType.default, _containsTypeOpenapi31Asyncapi.default, _descriptionType.default, _discriminatorExistInRequired.default, _discriminatorTypeOpenapi.default, _elseNonIf.default, _elseType.default, _enumUnique.default, _examplesType.default, _exclusiveMaximumTypeNumber.default, _exclusiveMaximumTypeBoolean.default, _exclusiveMinimumTypeNumber.default, _exclusiveMinimumTypeBoolean.default, _xmlType.default, _externalDocsType.default, _formatType.default, _ifNonThen.default, _ifType.default, _itemsNonArray.default, _itemsType.default, _maxItemsNonArray.default, _maxItemsType.default, _maxLengthNonString.default, _maxLengthType.default, _maxPropertiesNonObject.default, _maxPropertiesType.default, _maximumType.default, _minItemsNonArray.default, _minItemsType.default, _minLengthNonString.default, _minLengthType.default, _minPropertiesNonObject.default, _minPropertiesType.default, _minimumType.default, _missingCoreFieldsOpenapi.default, _multipleOfType.default, _notType.default, _notTypeOpenapi31Asyncapi.default, _nullableType.default, _nullableNotRecommended.default, _oneOfType.default, _oneOfTypeOpenapi31Asyncapi.default, _patternType.default, _patternPropertiesKeysRegexp.default, _patternPropertiesNonObject.default, _patternPropertiesType.default, _patternPropertiesValuesType.default, _propertiesNonObject.default, _propertiesType.default, _propertiesValuesType.default, _propertiesValuesTypeOpenapi31Asyncapi.default, _propertyNamesNonObject.default, _propertyNamesType.default, _readOnlyType.default, _requiredDefined.default, _requiredNonObject.default, _requiredType.default, _thenNonIf.default, _thenType.default, _titleType.default, _typeType.default, _typeEquals.default, _typeEqualsOpenapi31Asyncapi.default, _uniqueItemsNonArray.default, _uniqueItemsType.default, _writeOnlyType.default, _exampleDeprecated.default, _typeArrayNonItems.default];
92
96
  var _default = exports.default = schemaLints;
@@ -1,5 +1,9 @@
1
1
  import jsonSchema202012Lint from "../../json-schema/2020-12/json-schema/lint.mjs";
2
- import { compose, assoc } from "../../json-schema/2020-12/target-specs.mjs"; // below are older rule variants that need to be replaced
2
+ import { compose, assoc } from "../../json-schema/2020-12/target-specs.mjs"; // below are older rule variants that need to be replaced.
3
+ // $id and $ref are deliberately absent: the composed JSON Schema 2020-12 rules
4
+ // above already cover them (codes 8030100 / 8030300). importing the
5
+ // common/schema equivalents ($id--format-uri, $ref--valid) adds functionally
6
+ // identical rules and yields duplicate diagnostics on the same range.
3
7
  import additionalItemsNonArrayLint from "../../common/schema/lint/additional-items--non-array.mjs";
4
8
  import additionalItemsTypeLint from "../../common/schema/lint/additional-items--type.mjs";
5
9
  import additionalItemsTypeOpenAPI3_1__AsyncAPI2Lint from "../../common/schema/lint/additional-items--type-openapi-3-1--asyncapi-2.mjs";
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _symbols = _interopRequireDefault(require("./ads/symbols.cjs"));
9
- var _symbols2 = _interopRequireDefault(require("./asyncapi/symbols.cjs"));
10
- var _symbols3 = _interopRequireDefault(require("./openapi/symbols.cjs"));
8
+ var _symbols = _interopRequireDefault(require("./asyncapi/symbols.cjs"));
9
+ var _symbols2 = _interopRequireDefault(require("./openapi/symbols.cjs"));
11
10
  // creating list of unique symbols
12
- const symbols = Array.from(new Set([..._symbols.default, ..._symbols2.default, ..._symbols3.default]));
11
+ const symbols = Array.from(new Set([..._symbols.default, ..._symbols2.default]));
13
12
  var _default = exports.default = symbols;
@@ -1,5 +1,4 @@
1
- import adsSymbols from "./ads/symbols.mjs";
2
1
  import asyncapiSymbols from "./asyncapi/symbols.mjs";
3
2
  import openapiSymbols from "./openapi/symbols.mjs"; // creating list of unique symbols
4
- const symbols = Array.from(new Set([...adsSymbols, ...asyncapiSymbols, ...openapiSymbols]));
3
+ const symbols = Array.from(new Set([...asyncapiSymbols, ...openapiSymbols]));
5
4
  export default symbols;
@@ -5,11 +5,10 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _tokens = _interopRequireDefault(require("./ads/tokens.cjs"));
9
- var _tokens2 = _interopRequireDefault(require("./arazzo/tokens.cjs"));
10
- var _tokens3 = _interopRequireDefault(require("./asyncapi/tokens.cjs"));
11
- var _tokens4 = _interopRequireDefault(require("./openapi/tokens.cjs"));
12
- var _tokens5 = _interopRequireDefault(require("./overlay/tokens.cjs"));
8
+ var _tokens = _interopRequireDefault(require("./arazzo/tokens.cjs"));
9
+ var _tokens2 = _interopRequireDefault(require("./asyncapi/tokens.cjs"));
10
+ var _tokens3 = _interopRequireDefault(require("./openapi/tokens.cjs"));
11
+ var _tokens4 = _interopRequireDefault(require("./overlay/tokens.cjs"));
13
12
  // creating list of unique tokens
14
- const tokens = Array.from(new Set(['value', 'string', 'number', 'key', ..._tokens.default, ..._tokens3.default, ..._tokens4.default, ..._tokens2.default, ..._tokens5.default]));
13
+ const tokens = Array.from(new Set(['value', 'string', 'number', 'key', ..._tokens2.default, ..._tokens3.default, ..._tokens.default, ..._tokens4.default]));
15
14
  var _default = exports.default = tokens;
@@ -1,7 +1,6 @@
1
- import adsTokens from "./ads/tokens.mjs";
2
1
  import arazzoTokens from "./arazzo/tokens.mjs";
3
2
  import asyncapiTokens from "./asyncapi/tokens.mjs";
4
3
  import openapiTokens from "./openapi/tokens.mjs";
5
4
  import overlayTokens from "./overlay/tokens.mjs"; // creating list of unique tokens
6
- const tokens = Array.from(new Set(['value', 'string', 'number', 'key', ...adsTokens, ...asyncapiTokens, ...openapiTokens, ...arazzoTokens, ...overlayTokens]));
5
+ const tokens = Array.from(new Set(['value', 'string', 'number', 'key', ...asyncapiTokens, ...openapiTokens, ...arazzoTokens, ...overlayTokens]));
7
6
  export default tokens;
package/src/index.cjs CHANGED
@@ -10,6 +10,12 @@ Object.defineProperty(exports, "ApilintCodes", {
10
10
  return _codes.default;
11
11
  }
12
12
  });
13
+ Object.defineProperty(exports, "Arazzo11JsonSchemaValidationProvider", {
14
+ enumerable: true,
15
+ get: function () {
16
+ return _arazzo11JsonSchemaValidationProvider.Arazzo11JsonSchemaValidationProvider;
17
+ }
18
+ });
13
19
  Object.defineProperty(exports, "Arazzo1JsonSchemaValidationProvider", {
14
20
  enumerable: true,
15
21
  get: function () {
@@ -279,6 +285,7 @@ var _openapi20JsonSchemaValidationProvider = require("./services/validation/prov
279
285
  var _openapi30JsonSchemaValidationProvider = require("./services/validation/providers/openapi-30-json-schema-validation-provider.cjs");
280
286
  var _openapi31JsonSchemaValidationProvider = require("./services/validation/providers/openapi-31-json-schema-validation-provider.cjs");
281
287
  var _arazzo1JsonSchemaValidationProvider = require("./services/validation/providers/arazzo-1-json-schema-validation-provider.cjs");
288
+ var _arazzo11JsonSchemaValidationProvider = require("./services/validation/providers/arazzo-11-json-schema-validation-provider.cjs");
282
289
  var _overlay1JsonSchemaValidationProvider = require("./services/validation/providers/overlay-1-json-schema-validation-provider.cjs");
283
290
  var _codes = _interopRequireDefault(require("./config/codes.cjs"));
284
291
  var _utils = require("./utils/utils.cjs");
package/src/index.mjs CHANGED
@@ -3,6 +3,7 @@ export { OpenAPi20JsonSchemaValidationProvider } from "./services/validation/pro
3
3
  export { OpenAPi30JsonSchemaValidationProvider } from "./services/validation/providers/openapi-30-json-schema-validation-provider.mjs";
4
4
  export { OpenAPi31JsonSchemaValidationProvider } from "./services/validation/providers/openapi-31-json-schema-validation-provider.mjs";
5
5
  export { Arazzo1JsonSchemaValidationProvider } from "./services/validation/providers/arazzo-1-json-schema-validation-provider.mjs";
6
+ export { Arazzo11JsonSchemaValidationProvider } from "./services/validation/providers/arazzo-11-json-schema-validation-provider.mjs";
6
7
  export { Overlay1JsonSchemaValidationProvider } from "./services/validation/providers/overlay-1-json-schema-validation-provider.mjs";
7
8
  export { default as ApilintCodes } from "./config/codes.mjs";
8
9
  export { perfStart, perfEnd, isJsonDoc, isJsonDocSync, isYamlDoc, getText, findNamespace } from "./utils/utils.mjs";
@@ -851,7 +851,7 @@ class DefaultCompletionService {
851
851
  let func = _linterFunctions.standardLinterfunctionsMap.get(funcName);
852
852
  // else get it from configuration
853
853
  if (!func) {
854
- func = this.settings?.metadata?.linterFunctions[docNs][funcName];
854
+ func = this.settings?.metadata?.linterFunctions?.[docNs]?.[funcName];
855
855
  }
856
856
  if (func) {
857
857
  try {
@@ -845,7 +845,7 @@ export class DefaultCompletionService {
845
845
  let func = standardLinterfunctionsMap.get(funcName);
846
846
  // else get it from configuration
847
847
  if (!func) {
848
- func = this.settings?.metadata?.linterFunctions[docNs][funcName];
848
+ func = this.settings?.metadata?.linterFunctions?.[docNs]?.[funcName];
849
849
  }
850
850
  if (func) {
851
851
  try {
@@ -262,7 +262,7 @@ class DefaultHoverService {
262
262
  return res;
263
263
  }
264
264
  getMetadataPropertyDocs(node, ns, key, specVersion) {
265
- const map = this.settings?.metadata?.metadataMaps[ns] || {};
265
+ const map = this.settings?.metadata?.metadataMaps?.[ns] || {};
266
266
  if (node.parent && (0, _utils.isMember)(node.parent)) {
267
267
  const containerNode = node.parent.parent;
268
268
  const nodeKey = (0, _apidomCore.toValue)(node.parent.key);
@@ -256,7 +256,7 @@ export class DefaultHoverService {
256
256
  return res;
257
257
  }
258
258
  getMetadataPropertyDocs(node, ns, key, specVersion) {
259
- const map = this.settings?.metadata?.metadataMaps[ns] || {};
259
+ const map = this.settings?.metadata?.metadataMaps?.[ns] || {};
260
260
  if (node.parent && isMember(node.parent)) {
261
261
  const containerNode = node.parent.parent;
262
262
  const nodeKey = toValue(node.parent.key);
@@ -132,6 +132,47 @@ const casing = (value, casingStyle, noNumbers, separatorChar, separatorAsFirstCh
132
132
  }
133
133
  return getCachedRegex(pattern).test(value);
134
134
  };
135
+
136
+ /**
137
+ * Looks up a Source Description Object by `name` and returns its declared `type`, or `undefined`
138
+ * when the source doesn't exist locally or omits `type` (it's optional per spec).
139
+ */
140
+ const resolveArazzoSourceDescriptionType = (api, sourceName) => {
141
+ const sourceDescriptions = getElementsByTypeOrClass(api, 'sourceDescription');
142
+ const matchingSource = sourceDescriptions.find(sd => (0, _utils.isObject)(sd) && sd.hasKey('name') && (0, _apidomCore.toValue)(sd.get('name')) === sourceName);
143
+ if (!matchingSource || !(0, _utils.isObject)(matchingSource) || !matchingSource.hasKey('type')) {
144
+ return undefined;
145
+ }
146
+ const declaredType = (0, _apidomCore.toValue)(matchingSource.get('type'));
147
+ return typeof declaredType === 'string' ? declaredType : undefined;
148
+ };
149
+
150
+ /**
151
+ * Shared by apilintArazzoSourceDescriptionTypeConsistency and its array variant. Non-string,
152
+ * non-`$sourceDescriptions.`-prefixed, or unparseable values are treated as "not this check's
153
+ * concern" (true) - other rules cover type/shape. Explicitly checks `=== undefined` rather than
154
+ * a falsy check, so a source with `type: ''` (already invalid on its own) doesn't get treated the
155
+ * same as a source that simply omits `type`.
156
+ */
157
+ const isArazzoSourceDescriptionTypeConsistent = (value, expectedTypes, api) => {
158
+ if (typeof value !== 'string' || !value.startsWith('$sourceDescriptions.')) return true;
159
+ const {
160
+ result,
161
+ tree
162
+ } = (0, _arazzoRuntimeExpression.parse)(value);
163
+ if (!result.success || !tree || tree.type !== 'SourceDescriptionsExpression') return true;
164
+ const declaredType = resolveArazzoSourceDescriptionType(api, tree.sourceName);
165
+ if (declaredType === undefined) return true;
166
+ return expectedTypes.includes(declaredType);
167
+ };
168
+
169
+ /**
170
+ * Shared by apilintArazzoWorkflowIdResolved and apilintArazzoStepDependsOnResolved: finds a
171
+ * `workflow` element by its `workflowId` field within an already-collected list of workflows.
172
+ * Takes the list rather than `api` so callers that check multiple ids (e.g. across a `dependsOn`
173
+ * array) can collect it once and reuse it, instead of re-walking the tree per id.
174
+ */
175
+ const findArazzoWorkflowByWorkflowId = (workflows, workflowId) => workflows.find(w => (0, _utils.isObject)(w) && w.hasKey('workflowId') && (0, _apidomCore.toValue)(w.get('workflowId')) === workflowId);
135
176
  const isType = (element, elementType) => {
136
177
  switch (elementType) {
137
178
  case 'object':
@@ -454,6 +495,22 @@ const standardLinterfunctions = exports.standardLinterfunctions = [{
454
495
  }
455
496
  return true;
456
497
  }
498
+ }, {
499
+ functionName: 'apilintChildrenOfTypeOrElementClass',
500
+ function: (element, type, elementsOrClasses, nonEmpty) => {
501
+ if (element && (0, _utils.isObject)(element)) {
502
+ for (const member of element) {
503
+ const value = member.value;
504
+ if (!isType(value, type) && !apilintElementOrClass(value, elementsOrClasses)) {
505
+ return false;
506
+ }
507
+ }
508
+ if (nonEmpty && element.length === 0) {
509
+ return false;
510
+ }
511
+ }
512
+ return true;
513
+ }
457
514
  }, {
458
515
  functionName: 'apilintKeyIsRegex',
459
516
  function: element => {
@@ -589,6 +646,72 @@ const standardLinterfunctions = exports.standardLinterfunctions = [{
589
646
  }
590
647
  return true;
591
648
  }
649
+ }, {
650
+ functionName: 'apilintArazzoStepDependsOnResolved',
651
+ function: element => {
652
+ // `element` is expected to be the step object (no `target` set), so its parent is the
653
+ // `steps` array of the workflow it belongs to. Unlike workflowId, stepId is only unique
654
+ // within a workflow, so a plain entry must resolve against that workflow's own steps
655
+ // rather than a document-wide search.
656
+ //
657
+ // `$workflows.<workflowId>.steps.<stepId>` and the `$sourceDescriptions.<name>.<reference>`
658
+ // form's optional `stepsReference` are both parsed by
659
+ // @swaggerexpert/arazzo-runtime-expression >=3.2.0, which added grammar support for exactly
660
+ // this dependsOn-specific syntax (previously `$workflows.` rejected it outright, and
661
+ // `$sourceDescriptions.` only saw it as an opaque string). Parsing is left entirely to the
662
+ // grammar here rather than re-implemented locally, so this always matches whatever that
663
+ // shared parser considers valid - including its documented limitation that a workflowId
664
+ // containing a literal dot won't be recognized (its `workflow-id` production is
665
+ // `identifier-strict`, which excludes dots). Only document-local existence resolution
666
+ // happens here; a `$sourceDescriptions.` reference stays unresolved beyond its shape, since
667
+ // it points at an external document.
668
+ if (!element || !(0, _utils.isObject)(element) || !element.hasKey('dependsOn')) return true;
669
+ const dependsOn = element.get('dependsOn');
670
+ if (!dependsOn || !(0, _utils.isArray)(dependsOn)) return true;
671
+ const steps = element.parent;
672
+ if (!steps || !(0, _utils.isArray)(steps)) return true;
673
+ // Excludes the current step itself: a step depending on its own stepId is never
674
+ // meaningful, and would otherwise silently "resolve" since it's a member of its own
675
+ // `steps` sibling array.
676
+ const stepIds = new Set(steps.filter(s => s !== element && (0, _utils.isObject)(s) && s.hasKey('stepId')).map(s => (0, _apidomCore.toValue)(s.get('stepId'))));
677
+ let workflows;
678
+ const resolvesToWorkflowStep = (workflowId, stepId) => {
679
+ workflows ??= getElementsByTypeOrClass(root(element), 'workflow');
680
+ const targetWorkflow = findArazzoWorkflowByWorkflowId(workflows, workflowId);
681
+ if (!targetWorkflow || !(0, _utils.isObject)(targetWorkflow) || !targetWorkflow.hasKey('steps')) {
682
+ return false;
683
+ }
684
+ const targetSteps = targetWorkflow.get('steps');
685
+ if (!targetSteps || !(0, _utils.isArray)(targetSteps)) return false;
686
+ const targetStepIds = targetSteps.filter(s => (0, _utils.isObject)(s) && s.hasKey('stepId')).map(s => (0, _apidomCore.toValue)(s.get('stepId')));
687
+ return targetStepIds.includes(stepId);
688
+ };
689
+ for (const item of dependsOn) {
690
+ const val = (0, _apidomCore.toValue)(item);
691
+ if (typeof val !== 'string') continue;
692
+ if (val.startsWith('$workflows.')) {
693
+ const {
694
+ result,
695
+ tree
696
+ } = (0, _arazzoRuntimeExpression.parse)(val);
697
+ if (!result.success || !tree || tree.type !== 'WorkflowsStepsExpression') return false;
698
+ if (!resolvesToWorkflowStep(tree.workflowId, tree.stepId)) return false;
699
+ } else if (val.startsWith('$sourceDescriptions.')) {
700
+ const {
701
+ result,
702
+ tree
703
+ } = (0, _arazzoRuntimeExpression.parse)(val);
704
+ if (!result.success || !tree || tree.type !== 'SourceDescriptionsExpression' || !tree.stepsReference) {
705
+ return false;
706
+ }
707
+ } else if (val.startsWith('$')) {
708
+ return false;
709
+ } else if (!stepIds.has(val)) {
710
+ return false;
711
+ }
712
+ }
713
+ return true;
714
+ }
592
715
  }, {
593
716
  functionName: 'apilintArazzoWorkflowIdResolved',
594
717
  function: element => {
@@ -600,7 +723,33 @@ const standardLinterfunctions = exports.standardLinterfunctions = [{
600
723
  if (value.startsWith('$sourceDescriptions.')) return (0, _arazzoRuntimeExpression.test)(value);
601
724
  const api = root(element);
602
725
  const workflows = getElementsByTypeOrClass(api, 'workflow');
603
- return workflows.some(w => (0, _utils.isObject)(w) && w.hasKey('workflowId') && (0, _apidomCore.toValue)(w.get('workflowId')) === value);
726
+ return findArazzoWorkflowByWorkflowId(workflows, value) !== undefined;
727
+ }
728
+ }, {
729
+ functionName: 'apilintArazzoSourceDescriptionTypeConsistency',
730
+ function: (element, expectedTypes) => {
731
+ // Best-effort cross-check: a $sourceDescriptions.<name>.<reference> value should point at
732
+ // a source whose declared `type` matches how the reference is being used (e.g. a
733
+ // workflowId reference should point at a `type: arazzo` source, not `type: openapi`). Only
734
+ // fires when the named source exists locally AND declares a `type` - that field is
735
+ // optional per spec, so a source without one gives no local signal to check against, and
736
+ // is silently skipped rather than guessed at.
737
+ if (!element || !(0, _utils.isString)(element)) return true;
738
+ return isArazzoSourceDescriptionTypeConsistent((0, _apidomCore.toValue)(element), expectedTypes, root(element));
739
+ }
740
+ }, {
741
+ functionName: 'apilintArazzoArraySourceDescriptionTypeConsistency',
742
+ function: (element, expectedTypes) => {
743
+ // Same check as apilintArazzoSourceDescriptionTypeConsistency, applied to each
744
+ // $sourceDescriptions.-prefixed string in an array (e.g. Workflow/Step `dependsOn`).
745
+ if (!element || !(0, _utils.isArray)(element)) return true;
746
+ const api = root(element);
747
+ for (const item of element) {
748
+ if (!isArazzoSourceDescriptionTypeConsistent((0, _apidomCore.toValue)(item), expectedTypes, api)) {
749
+ return false;
750
+ }
751
+ }
752
+ return true;
604
753
  }
605
754
  }, {
606
755
  functionName: 'apilintArazzoActionStepIdResolved',
@@ -3,7 +3,7 @@ import { isStringElement, isArrayElement, includesClasses } from '@speclynx/apid
3
3
  import { forEach } from '@speclynx/apidom-traverse';
4
4
  import { toValue } from '@speclynx/apidom-core';
5
5
  import { test as testPathTemplate, resolve as resolvePathTemplate, parse as parsePathTemplate } from 'openapi-path-templating';
6
- import { test as testRuntimeExpression } from '@swaggerexpert/arazzo-runtime-expression';
6
+ import { test as testRuntimeExpression, parse as parseRuntimeExpression } from '@swaggerexpert/arazzo-runtime-expression';
7
7
  import { isObject, isString, isArray, isNumber, isBoolean, isMember, processPath, getStringMetaValue, getClassesValue, getReferencedElementValue } from "../../utils/utils.mjs";
8
8
  const regexCache = new Map();
9
9
  const getCachedRegex = (pattern, flags) => {
@@ -122,6 +122,47 @@ const casing = (value, casingStyle, noNumbers, separatorChar, separatorAsFirstCh
122
122
  }
123
123
  return getCachedRegex(pattern).test(value);
124
124
  };
125
+
126
+ /**
127
+ * Looks up a Source Description Object by `name` and returns its declared `type`, or `undefined`
128
+ * when the source doesn't exist locally or omits `type` (it's optional per spec).
129
+ */
130
+ const resolveArazzoSourceDescriptionType = (api, sourceName) => {
131
+ const sourceDescriptions = getElementsByTypeOrClass(api, 'sourceDescription');
132
+ const matchingSource = sourceDescriptions.find(sd => isObject(sd) && sd.hasKey('name') && toValue(sd.get('name')) === sourceName);
133
+ if (!matchingSource || !isObject(matchingSource) || !matchingSource.hasKey('type')) {
134
+ return undefined;
135
+ }
136
+ const declaredType = toValue(matchingSource.get('type'));
137
+ return typeof declaredType === 'string' ? declaredType : undefined;
138
+ };
139
+
140
+ /**
141
+ * Shared by apilintArazzoSourceDescriptionTypeConsistency and its array variant. Non-string,
142
+ * non-`$sourceDescriptions.`-prefixed, or unparseable values are treated as "not this check's
143
+ * concern" (true) - other rules cover type/shape. Explicitly checks `=== undefined` rather than
144
+ * a falsy check, so a source with `type: ''` (already invalid on its own) doesn't get treated the
145
+ * same as a source that simply omits `type`.
146
+ */
147
+ const isArazzoSourceDescriptionTypeConsistent = (value, expectedTypes, api) => {
148
+ if (typeof value !== 'string' || !value.startsWith('$sourceDescriptions.')) return true;
149
+ const {
150
+ result,
151
+ tree
152
+ } = parseRuntimeExpression(value);
153
+ if (!result.success || !tree || tree.type !== 'SourceDescriptionsExpression') return true;
154
+ const declaredType = resolveArazzoSourceDescriptionType(api, tree.sourceName);
155
+ if (declaredType === undefined) return true;
156
+ return expectedTypes.includes(declaredType);
157
+ };
158
+
159
+ /**
160
+ * Shared by apilintArazzoWorkflowIdResolved and apilintArazzoStepDependsOnResolved: finds a
161
+ * `workflow` element by its `workflowId` field within an already-collected list of workflows.
162
+ * Takes the list rather than `api` so callers that check multiple ids (e.g. across a `dependsOn`
163
+ * array) can collect it once and reuse it, instead of re-walking the tree per id.
164
+ */
165
+ const findArazzoWorkflowByWorkflowId = (workflows, workflowId) => workflows.find(w => isObject(w) && w.hasKey('workflowId') && toValue(w.get('workflowId')) === workflowId);
125
166
  const isType = (element, elementType) => {
126
167
  switch (elementType) {
127
168
  case 'object':
@@ -444,6 +485,22 @@ export const standardLinterfunctions = [{
444
485
  }
445
486
  return true;
446
487
  }
488
+ }, {
489
+ functionName: 'apilintChildrenOfTypeOrElementClass',
490
+ function: (element, type, elementsOrClasses, nonEmpty) => {
491
+ if (element && isObject(element)) {
492
+ for (const member of element) {
493
+ const value = member.value;
494
+ if (!isType(value, type) && !apilintElementOrClass(value, elementsOrClasses)) {
495
+ return false;
496
+ }
497
+ }
498
+ if (nonEmpty && element.length === 0) {
499
+ return false;
500
+ }
501
+ }
502
+ return true;
503
+ }
447
504
  }, {
448
505
  functionName: 'apilintKeyIsRegex',
449
506
  function: element => {
@@ -579,6 +636,72 @@ export const standardLinterfunctions = [{
579
636
  }
580
637
  return true;
581
638
  }
639
+ }, {
640
+ functionName: 'apilintArazzoStepDependsOnResolved',
641
+ function: element => {
642
+ // `element` is expected to be the step object (no `target` set), so its parent is the
643
+ // `steps` array of the workflow it belongs to. Unlike workflowId, stepId is only unique
644
+ // within a workflow, so a plain entry must resolve against that workflow's own steps
645
+ // rather than a document-wide search.
646
+ //
647
+ // `$workflows.<workflowId>.steps.<stepId>` and the `$sourceDescriptions.<name>.<reference>`
648
+ // form's optional `stepsReference` are both parsed by
649
+ // @swaggerexpert/arazzo-runtime-expression >=3.2.0, which added grammar support for exactly
650
+ // this dependsOn-specific syntax (previously `$workflows.` rejected it outright, and
651
+ // `$sourceDescriptions.` only saw it as an opaque string). Parsing is left entirely to the
652
+ // grammar here rather than re-implemented locally, so this always matches whatever that
653
+ // shared parser considers valid - including its documented limitation that a workflowId
654
+ // containing a literal dot won't be recognized (its `workflow-id` production is
655
+ // `identifier-strict`, which excludes dots). Only document-local existence resolution
656
+ // happens here; a `$sourceDescriptions.` reference stays unresolved beyond its shape, since
657
+ // it points at an external document.
658
+ if (!element || !isObject(element) || !element.hasKey('dependsOn')) return true;
659
+ const dependsOn = element.get('dependsOn');
660
+ if (!dependsOn || !isArray(dependsOn)) return true;
661
+ const steps = element.parent;
662
+ if (!steps || !isArray(steps)) return true;
663
+ // Excludes the current step itself: a step depending on its own stepId is never
664
+ // meaningful, and would otherwise silently "resolve" since it's a member of its own
665
+ // `steps` sibling array.
666
+ const stepIds = new Set(steps.filter(s => s !== element && isObject(s) && s.hasKey('stepId')).map(s => toValue(s.get('stepId'))));
667
+ let workflows;
668
+ const resolvesToWorkflowStep = (workflowId, stepId) => {
669
+ workflows ??= getElementsByTypeOrClass(root(element), 'workflow');
670
+ const targetWorkflow = findArazzoWorkflowByWorkflowId(workflows, workflowId);
671
+ if (!targetWorkflow || !isObject(targetWorkflow) || !targetWorkflow.hasKey('steps')) {
672
+ return false;
673
+ }
674
+ const targetSteps = targetWorkflow.get('steps');
675
+ if (!targetSteps || !isArray(targetSteps)) return false;
676
+ const targetStepIds = targetSteps.filter(s => isObject(s) && s.hasKey('stepId')).map(s => toValue(s.get('stepId')));
677
+ return targetStepIds.includes(stepId);
678
+ };
679
+ for (const item of dependsOn) {
680
+ const val = toValue(item);
681
+ if (typeof val !== 'string') continue;
682
+ if (val.startsWith('$workflows.')) {
683
+ const {
684
+ result,
685
+ tree
686
+ } = parseRuntimeExpression(val);
687
+ if (!result.success || !tree || tree.type !== 'WorkflowsStepsExpression') return false;
688
+ if (!resolvesToWorkflowStep(tree.workflowId, tree.stepId)) return false;
689
+ } else if (val.startsWith('$sourceDescriptions.')) {
690
+ const {
691
+ result,
692
+ tree
693
+ } = parseRuntimeExpression(val);
694
+ if (!result.success || !tree || tree.type !== 'SourceDescriptionsExpression' || !tree.stepsReference) {
695
+ return false;
696
+ }
697
+ } else if (val.startsWith('$')) {
698
+ return false;
699
+ } else if (!stepIds.has(val)) {
700
+ return false;
701
+ }
702
+ }
703
+ return true;
704
+ }
582
705
  }, {
583
706
  functionName: 'apilintArazzoWorkflowIdResolved',
584
707
  function: element => {
@@ -590,7 +713,33 @@ export const standardLinterfunctions = [{
590
713
  if (value.startsWith('$sourceDescriptions.')) return testRuntimeExpression(value);
591
714
  const api = root(element);
592
715
  const workflows = getElementsByTypeOrClass(api, 'workflow');
593
- return workflows.some(w => isObject(w) && w.hasKey('workflowId') && toValue(w.get('workflowId')) === value);
716
+ return findArazzoWorkflowByWorkflowId(workflows, value) !== undefined;
717
+ }
718
+ }, {
719
+ functionName: 'apilintArazzoSourceDescriptionTypeConsistency',
720
+ function: (element, expectedTypes) => {
721
+ // Best-effort cross-check: a $sourceDescriptions.<name>.<reference> value should point at
722
+ // a source whose declared `type` matches how the reference is being used (e.g. a
723
+ // workflowId reference should point at a `type: arazzo` source, not `type: openapi`). Only
724
+ // fires when the named source exists locally AND declares a `type` - that field is
725
+ // optional per spec, so a source without one gives no local signal to check against, and
726
+ // is silently skipped rather than guessed at.
727
+ if (!element || !isString(element)) return true;
728
+ return isArazzoSourceDescriptionTypeConsistent(toValue(element), expectedTypes, root(element));
729
+ }
730
+ }, {
731
+ functionName: 'apilintArazzoArraySourceDescriptionTypeConsistency',
732
+ function: (element, expectedTypes) => {
733
+ // Same check as apilintArazzoSourceDescriptionTypeConsistency, applied to each
734
+ // $sourceDescriptions.-prefixed string in an array (e.g. Workflow/Step `dependsOn`).
735
+ if (!element || !isArray(element)) return true;
736
+ const api = root(element);
737
+ for (const item of element) {
738
+ if (!isArazzoSourceDescriptionTypeConsistent(toValue(item), expectedTypes, api)) {
739
+ return false;
740
+ }
741
+ }
742
+ return true;
594
743
  }
595
744
  }, {
596
745
  functionName: 'apilintArazzoActionStepIdResolved',