@redocly/openapi-core 1.34.4 → 2.0.0-next.1

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 (1019) hide show
  1. package/README.md +42 -4
  2. package/lib/bundle.d.ts +16 -15
  3. package/lib/bundle.d.ts.map +1 -0
  4. package/lib/bundle.js +88 -109
  5. package/lib/bundle.js.map +1 -0
  6. package/lib/config/all.d.ts +3 -2
  7. package/lib/config/all.d.ts.map +1 -0
  8. package/lib/config/all.js +11 -3
  9. package/lib/config/all.js.map +1 -0
  10. package/lib/config/builtIn.d.ts +3 -2
  11. package/lib/config/builtIn.d.ts.map +1 -0
  12. package/lib/config/builtIn.js +44 -49
  13. package/lib/config/builtIn.js.map +1 -0
  14. package/lib/config/bundle-extends.d.ts +8 -0
  15. package/lib/config/bundle-extends.d.ts.map +1 -0
  16. package/lib/config/bundle-extends.js +27 -0
  17. package/lib/config/bundle-extends.js.map +1 -0
  18. package/lib/config/config-resolvers.d.ts +15 -27
  19. package/lib/config/config-resolvers.d.ts.map +1 -0
  20. package/lib/config/config-resolvers.js +259 -373
  21. package/lib/config/config-resolvers.js.map +1 -0
  22. package/lib/config/config.d.ts +22 -26
  23. package/lib/config/config.d.ts.map +1 -0
  24. package/lib/config/config.js +104 -112
  25. package/lib/config/config.js.map +1 -0
  26. package/lib/config/index.d.ts +8 -7
  27. package/lib/config/index.d.ts.map +1 -0
  28. package/lib/config/index.js +8 -23
  29. package/lib/config/index.js.map +1 -0
  30. package/lib/config/load.d.ts +8 -19
  31. package/lib/config/load.d.ts.map +1 -0
  32. package/lib/config/load.js +62 -107
  33. package/lib/config/load.js.map +1 -0
  34. package/lib/config/minimal.d.ts +3 -2
  35. package/lib/config/minimal.d.ts.map +1 -0
  36. package/lib/config/minimal.js +11 -3
  37. package/lib/config/minimal.js.map +1 -0
  38. package/lib/config/recommended-strict.d.ts +3 -2
  39. package/lib/config/recommended-strict.d.ts.map +1 -0
  40. package/lib/config/recommended-strict.js +11 -3
  41. package/lib/config/recommended-strict.js.map +1 -0
  42. package/lib/config/recommended.d.ts +3 -2
  43. package/lib/config/recommended.d.ts.map +1 -0
  44. package/lib/config/recommended.js +11 -3
  45. package/lib/config/recommended.js.map +1 -0
  46. package/lib/config/rules.d.ts +5 -4
  47. package/lib/config/rules.d.ts.map +1 -0
  48. package/lib/config/rules.js +4 -6
  49. package/lib/config/rules.js.map +1 -0
  50. package/lib/config/spec.d.ts +3 -2
  51. package/lib/config/spec.d.ts.map +1 -0
  52. package/lib/config/spec.js +6 -4
  53. package/lib/config/spec.js.map +1 -0
  54. package/lib/config/types.d.ts +19 -62
  55. package/lib/config/types.d.ts.map +1 -0
  56. package/lib/config/types.js +2 -2
  57. package/lib/config/types.js.map +1 -0
  58. package/lib/config/utils.d.ts +5 -9
  59. package/lib/config/utils.d.ts.map +1 -0
  60. package/lib/config/utils.js +56 -258
  61. package/lib/config/utils.js.map +1 -0
  62. package/lib/config/visitors.d.ts +36 -0
  63. package/lib/config/visitors.d.ts.map +1 -0
  64. package/lib/config/visitors.js +88 -0
  65. package/lib/config/visitors.js.map +1 -0
  66. package/lib/decorators/arazzo/index.d.ts +1 -0
  67. package/lib/decorators/arazzo/index.d.ts.map +1 -0
  68. package/lib/decorators/arazzo/index.js +2 -4
  69. package/lib/decorators/arazzo/index.js.map +1 -0
  70. package/lib/decorators/async2/index.d.ts +1 -0
  71. package/lib/decorators/async2/index.d.ts.map +1 -0
  72. package/lib/decorators/async2/index.js +2 -4
  73. package/lib/decorators/async2/index.js.map +1 -0
  74. package/lib/decorators/async3/index.d.ts +1 -0
  75. package/lib/decorators/async3/index.d.ts.map +1 -0
  76. package/lib/decorators/async3/index.js +2 -4
  77. package/lib/decorators/async3/index.js.map +1 -0
  78. package/lib/decorators/common/filters/filter-helper.d.ts +2 -1
  79. package/lib/decorators/common/filters/filter-helper.d.ts.map +1 -0
  80. package/lib/decorators/common/filters/filter-helper.js +9 -12
  81. package/lib/decorators/common/filters/filter-helper.js.map +1 -0
  82. package/lib/decorators/common/filters/filter-in.d.ts +2 -1
  83. package/lib/decorators/common/filters/filter-in.d.ts.map +1 -0
  84. package/lib/decorators/common/filters/filter-in.js +5 -8
  85. package/lib/decorators/common/filters/filter-in.js.map +1 -0
  86. package/lib/decorators/common/filters/filter-out.d.ts +2 -1
  87. package/lib/decorators/common/filters/filter-out.d.ts.map +1 -0
  88. package/lib/decorators/common/filters/filter-out.js +5 -8
  89. package/lib/decorators/common/filters/filter-out.js.map +1 -0
  90. package/lib/decorators/common/info-description-override.d.ts +2 -1
  91. package/lib/decorators/common/info-description-override.d.ts.map +1 -0
  92. package/lib/decorators/common/info-description-override.js +4 -7
  93. package/lib/decorators/common/info-description-override.js.map +1 -0
  94. package/lib/decorators/common/info-override.d.ts +2 -1
  95. package/lib/decorators/common/info-override.d.ts.map +1 -0
  96. package/lib/decorators/common/info-override.js +2 -5
  97. package/lib/decorators/common/info-override.js.map +1 -0
  98. package/lib/decorators/common/media-type-examples-override.d.ts +2 -1
  99. package/lib/decorators/common/media-type-examples-override.d.ts.map +1 -0
  100. package/lib/decorators/common/media-type-examples-override.js +7 -10
  101. package/lib/decorators/common/media-type-examples-override.js.map +1 -0
  102. package/lib/decorators/common/operation-description-override.d.ts +2 -1
  103. package/lib/decorators/common/operation-description-override.d.ts.map +1 -0
  104. package/lib/decorators/common/operation-description-override.js +4 -7
  105. package/lib/decorators/common/operation-description-override.js.map +1 -0
  106. package/lib/decorators/common/remove-x-internal.d.ts +2 -1
  107. package/lib/decorators/common/remove-x-internal.d.ts.map +1 -0
  108. package/lib/decorators/common/remove-x-internal.js +11 -14
  109. package/lib/decorators/common/remove-x-internal.js.map +1 -0
  110. package/lib/decorators/common/tag-description-override.d.ts +2 -1
  111. package/lib/decorators/common/tag-description-override.d.ts.map +1 -0
  112. package/lib/decorators/common/tag-description-override.js +4 -7
  113. package/lib/decorators/common/tag-description-override.js.map +1 -0
  114. package/lib/decorators/oas2/index.d.ts +2 -2
  115. package/lib/decorators/oas2/index.d.ts.map +1 -0
  116. package/lib/decorators/oas2/index.js +16 -20
  117. package/lib/decorators/oas2/index.js.map +1 -0
  118. package/lib/decorators/oas2/remove-unused-components.d.ts +2 -1
  119. package/lib/decorators/oas2/remove-unused-components.d.ts.map +1 -0
  120. package/lib/decorators/oas2/remove-unused-components.js +4 -7
  121. package/lib/decorators/oas2/remove-unused-components.js.map +1 -0
  122. package/lib/decorators/oas3/index.d.ts +2 -2
  123. package/lib/decorators/oas3/index.d.ts.map +1 -0
  124. package/lib/decorators/oas3/index.js +18 -22
  125. package/lib/decorators/oas3/index.js.map +1 -0
  126. package/lib/decorators/oas3/remove-unused-components.d.ts +2 -1
  127. package/lib/decorators/oas3/remove-unused-components.d.ts.map +1 -0
  128. package/lib/decorators/oas3/remove-unused-components.js +5 -8
  129. package/lib/decorators/oas3/remove-unused-components.js.map +1 -0
  130. package/lib/decorators/overlay1/index.d.ts +1 -0
  131. package/lib/decorators/overlay1/index.d.ts.map +1 -0
  132. package/lib/decorators/overlay1/index.js +2 -4
  133. package/lib/decorators/overlay1/index.js.map +1 -0
  134. package/lib/env.d.ts +1 -0
  135. package/lib/env.d.ts.map +1 -0
  136. package/lib/env.js +3 -5
  137. package/lib/env.js.map +1 -0
  138. package/lib/format/codeframes.d.ts +2 -1
  139. package/lib/format/codeframes.d.ts.map +1 -0
  140. package/lib/format/codeframes.js +15 -19
  141. package/lib/format/codeframes.js.map +1 -0
  142. package/lib/format/format.d.ts +2 -1
  143. package/lib/format/format.d.ts.map +1 -0
  144. package/lib/format/format.js +57 -62
  145. package/lib/format/format.js.map +1 -0
  146. package/lib/index.d.ts +31 -26
  147. package/lib/index.d.ts.map +1 -0
  148. package/lib/index.js +25 -98
  149. package/lib/index.js.map +1 -0
  150. package/lib/js-yaml/index.d.ts +1 -0
  151. package/lib/js-yaml/index.d.ts.map +1 -0
  152. package/lib/js-yaml/index.js +7 -11
  153. package/lib/js-yaml/index.js.map +1 -0
  154. package/lib/lint.d.ts +12 -13
  155. package/lib/lint.d.ts.map +1 -0
  156. package/lib/lint.js +46 -50
  157. package/lib/lint.js.map +1 -0
  158. package/lib/logger.d.ts +2 -1
  159. package/lib/logger.d.ts.map +1 -0
  160. package/lib/logger.js +15 -17
  161. package/lib/logger.js.map +1 -0
  162. package/lib/oas-types.d.ts +395 -3
  163. package/lib/oas-types.d.ts.map +1 -0
  164. package/lib/oas-types.js +28 -32
  165. package/lib/oas-types.js.map +1 -0
  166. package/lib/ref-utils.d.ts +5 -2
  167. package/lib/ref-utils.d.ts.map +1 -0
  168. package/lib/ref-utils.js +30 -33
  169. package/lib/ref-utils.js.map +1 -0
  170. package/lib/resolve.d.ts +7 -9
  171. package/lib/resolve.d.ts.map +1 -0
  172. package/lib/resolve.js +40 -47
  173. package/lib/resolve.js.map +1 -0
  174. package/lib/rules/ajv.d.ts +4 -3
  175. package/lib/rules/ajv.d.ts.map +1 -0
  176. package/lib/rules/ajv.js +7 -10
  177. package/lib/rules/ajv.js.map +1 -0
  178. package/lib/rules/arazzo/criteria-unique.d.ts +2 -1
  179. package/lib/rules/arazzo/criteria-unique.d.ts.map +1 -0
  180. package/lib/rules/arazzo/criteria-unique.js +2 -5
  181. package/lib/rules/arazzo/criteria-unique.js.map +1 -0
  182. package/lib/rules/arazzo/index.d.ts +2 -1
  183. package/lib/rules/arazzo/index.d.ts.map +1 -0
  184. package/lib/rules/arazzo/index.js +39 -35
  185. package/lib/rules/arazzo/index.js.map +1 -0
  186. package/lib/rules/arazzo/parameters-unique.d.ts +2 -1
  187. package/lib/rules/arazzo/parameters-unique.d.ts.map +1 -0
  188. package/lib/rules/arazzo/parameters-unique.js +2 -5
  189. package/lib/rules/arazzo/parameters-unique.js.map +1 -0
  190. package/lib/rules/arazzo/requestBody-replacements-unique.d.ts +2 -1
  191. package/lib/rules/arazzo/requestBody-replacements-unique.d.ts.map +1 -0
  192. package/lib/rules/arazzo/requestBody-replacements-unique.js +2 -5
  193. package/lib/rules/arazzo/requestBody-replacements-unique.js.map +1 -0
  194. package/lib/rules/arazzo/sourceDescription-type.d.ts +2 -1
  195. package/lib/rules/arazzo/sourceDescription-type.d.ts.map +1 -0
  196. package/lib/rules/arazzo/sourceDescription-type.js +2 -5
  197. package/lib/rules/arazzo/sourceDescription-type.js.map +1 -0
  198. package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts +2 -1
  199. package/lib/rules/arazzo/sourceDescriptions-name-unique.d.ts.map +1 -0
  200. package/lib/rules/arazzo/sourceDescriptions-name-unique.js +2 -5
  201. package/lib/rules/arazzo/sourceDescriptions-name-unique.js.map +1 -0
  202. package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts +2 -1
  203. package/lib/rules/arazzo/sourceDescriptions-not-empty.d.ts.map +1 -0
  204. package/lib/rules/arazzo/sourceDescriptions-not-empty.js +2 -5
  205. package/lib/rules/arazzo/sourceDescriptions-not-empty.js.map +1 -0
  206. package/lib/rules/arazzo/step-onFailure-unique.d.ts +2 -1
  207. package/lib/rules/arazzo/step-onFailure-unique.d.ts.map +1 -0
  208. package/lib/rules/arazzo/step-onFailure-unique.js +2 -5
  209. package/lib/rules/arazzo/step-onFailure-unique.js.map +1 -0
  210. package/lib/rules/arazzo/step-onSuccess-unique.d.ts +2 -1
  211. package/lib/rules/arazzo/step-onSuccess-unique.d.ts.map +1 -0
  212. package/lib/rules/arazzo/step-onSuccess-unique.js +2 -5
  213. package/lib/rules/arazzo/step-onSuccess-unique.js.map +1 -0
  214. package/lib/rules/arazzo/stepId-unique.d.ts +2 -1
  215. package/lib/rules/arazzo/stepId-unique.d.ts.map +1 -0
  216. package/lib/rules/arazzo/stepId-unique.js +2 -5
  217. package/lib/rules/arazzo/stepId-unique.js.map +1 -0
  218. package/lib/rules/arazzo/workflow-dependsOn.d.ts +2 -1
  219. package/lib/rules/arazzo/workflow-dependsOn.d.ts.map +1 -0
  220. package/lib/rules/arazzo/workflow-dependsOn.js +2 -5
  221. package/lib/rules/arazzo/workflow-dependsOn.js.map +1 -0
  222. package/lib/rules/arazzo/workflowId-unique.d.ts +2 -1
  223. package/lib/rules/arazzo/workflowId-unique.d.ts.map +1 -0
  224. package/lib/rules/arazzo/workflowId-unique.js +2 -5
  225. package/lib/rules/arazzo/workflowId-unique.js.map +1 -0
  226. package/lib/rules/async2/channels-kebab-case.d.ts +2 -1
  227. package/lib/rules/async2/channels-kebab-case.d.ts.map +1 -0
  228. package/lib/rules/async2/channels-kebab-case.js +2 -5
  229. package/lib/rules/async2/channels-kebab-case.js.map +1 -0
  230. package/lib/rules/async2/index.d.ts +2 -1
  231. package/lib/rules/async2/index.d.ts.map +1 -0
  232. package/lib/rules/async2/index.js +23 -26
  233. package/lib/rules/async2/index.js.map +1 -0
  234. package/lib/rules/async2/no-channel-trailing-slash.d.ts +2 -1
  235. package/lib/rules/async2/no-channel-trailing-slash.d.ts.map +1 -0
  236. package/lib/rules/async2/no-channel-trailing-slash.js +2 -5
  237. package/lib/rules/async2/no-channel-trailing-slash.js.map +1 -0
  238. package/lib/rules/async3/channels-kebab-case.d.ts +2 -1
  239. package/lib/rules/async3/channels-kebab-case.d.ts.map +1 -0
  240. package/lib/rules/async3/channels-kebab-case.js +2 -5
  241. package/lib/rules/async3/channels-kebab-case.js.map +1 -0
  242. package/lib/rules/async3/index.d.ts +2 -1
  243. package/lib/rules/async3/index.d.ts.map +1 -0
  244. package/lib/rules/async3/index.js +23 -26
  245. package/lib/rules/async3/index.js.map +1 -0
  246. package/lib/rules/async3/no-channel-trailing-slash.d.ts +2 -1
  247. package/lib/rules/async3/no-channel-trailing-slash.d.ts.map +1 -0
  248. package/lib/rules/async3/no-channel-trailing-slash.js +3 -6
  249. package/lib/rules/async3/no-channel-trailing-slash.js.map +1 -0
  250. package/lib/rules/common/assertions/asserts.d.ts +3 -3
  251. package/lib/rules/common/assertions/asserts.d.ts.map +1 -0
  252. package/lib/rules/common/assertions/asserts.js +35 -51
  253. package/lib/rules/common/assertions/asserts.js.map +1 -0
  254. package/lib/rules/common/assertions/index.d.ts +4 -3
  255. package/lib/rules/common/assertions/index.d.ts.map +1 -0
  256. package/lib/rules/common/assertions/index.js +7 -10
  257. package/lib/rules/common/assertions/index.js.map +1 -0
  258. package/lib/rules/common/assertions/utils.d.ts +5 -4
  259. package/lib/rules/common/assertions/utils.d.ts.map +1 -0
  260. package/lib/rules/common/assertions/utils.js +21 -29
  261. package/lib/rules/common/assertions/utils.js.map +1 -0
  262. package/lib/rules/common/info-contact.d.ts +2 -1
  263. package/lib/rules/common/info-contact.d.ts.map +1 -0
  264. package/lib/rules/common/info-contact.js +4 -7
  265. package/lib/rules/common/info-contact.js.map +1 -0
  266. package/lib/rules/common/info-license-strict.d.ts +2 -1
  267. package/lib/rules/common/info-license-strict.d.ts.map +1 -0
  268. package/lib/rules/common/info-license-strict.js +7 -10
  269. package/lib/rules/common/info-license-strict.js.map +1 -0
  270. package/lib/rules/common/info-license-url.d.ts +2 -1
  271. package/lib/rules/common/info-license-url.d.ts.map +1 -0
  272. package/lib/rules/common/info-license-url.js +4 -7
  273. package/lib/rules/common/info-license-url.js.map +1 -0
  274. package/lib/rules/common/info-license.d.ts +2 -1
  275. package/lib/rules/common/info-license.d.ts.map +1 -0
  276. package/lib/rules/common/info-license.js +4 -7
  277. package/lib/rules/common/info-license.js.map +1 -0
  278. package/lib/rules/common/no-ambiguous-paths.d.ts +2 -1
  279. package/lib/rules/common/no-ambiguous-paths.d.ts.map +1 -0
  280. package/lib/rules/common/no-ambiguous-paths.js +2 -5
  281. package/lib/rules/common/no-ambiguous-paths.js.map +1 -0
  282. package/lib/rules/common/no-duplicated-tag-names.d.ts +3 -0
  283. package/lib/rules/common/no-duplicated-tag-names.d.ts.map +1 -0
  284. package/lib/rules/common/no-duplicated-tag-names.js +21 -0
  285. package/lib/rules/common/no-duplicated-tag-names.js.map +1 -0
  286. package/lib/rules/common/no-enum-type-mismatch.d.ts +2 -1
  287. package/lib/rules/common/no-enum-type-mismatch.d.ts.map +1 -0
  288. package/lib/rules/common/no-enum-type-mismatch.js +6 -9
  289. package/lib/rules/common/no-enum-type-mismatch.js.map +1 -0
  290. package/lib/rules/common/no-http-verbs-in-paths.d.ts +2 -1
  291. package/lib/rules/common/no-http-verbs-in-paths.d.ts.map +1 -0
  292. package/lib/rules/common/no-http-verbs-in-paths.js +5 -8
  293. package/lib/rules/common/no-http-verbs-in-paths.js.map +1 -0
  294. package/lib/rules/common/no-identical-paths.d.ts +2 -1
  295. package/lib/rules/common/no-identical-paths.d.ts.map +1 -0
  296. package/lib/rules/common/no-identical-paths.js +2 -5
  297. package/lib/rules/common/no-identical-paths.js.map +1 -0
  298. package/lib/rules/common/no-invalid-parameter-examples.d.ts +1 -0
  299. package/lib/rules/common/no-invalid-parameter-examples.d.ts.map +1 -0
  300. package/lib/rules/common/no-invalid-parameter-examples.js +5 -9
  301. package/lib/rules/common/no-invalid-parameter-examples.js.map +1 -0
  302. package/lib/rules/common/no-invalid-schema-examples.d.ts +2 -1
  303. package/lib/rules/common/no-invalid-schema-examples.d.ts.map +1 -0
  304. package/lib/rules/common/no-invalid-schema-examples.js +5 -9
  305. package/lib/rules/common/no-invalid-schema-examples.js.map +1 -0
  306. package/lib/rules/common/no-path-trailing-slash.d.ts +2 -1
  307. package/lib/rules/common/no-path-trailing-slash.d.ts.map +1 -0
  308. package/lib/rules/common/no-path-trailing-slash.js +2 -5
  309. package/lib/rules/common/no-path-trailing-slash.js.map +1 -0
  310. package/lib/rules/common/no-required-schema-properties-undefined.d.ts +2 -1
  311. package/lib/rules/common/no-required-schema-properties-undefined.d.ts.map +1 -0
  312. package/lib/rules/common/no-required-schema-properties-undefined.js +6 -8
  313. package/lib/rules/common/no-required-schema-properties-undefined.js.map +1 -0
  314. package/lib/rules/common/no-schema-type-mismatch.d.ts +2 -1
  315. package/lib/rules/common/no-schema-type-mismatch.d.ts.map +1 -0
  316. package/lib/rules/common/no-schema-type-mismatch.js +2 -5
  317. package/lib/rules/common/no-schema-type-mismatch.js.map +1 -0
  318. package/lib/rules/common/operation-2xx-response.d.ts +2 -1
  319. package/lib/rules/common/operation-2xx-response.d.ts.map +1 -0
  320. package/lib/rules/common/operation-2xx-response.js +5 -8
  321. package/lib/rules/common/operation-2xx-response.js.map +1 -0
  322. package/lib/rules/common/operation-4xx-response.d.ts +2 -1
  323. package/lib/rules/common/operation-4xx-response.d.ts.map +1 -0
  324. package/lib/rules/common/operation-4xx-response.js +5 -8
  325. package/lib/rules/common/operation-4xx-response.js.map +1 -0
  326. package/lib/rules/common/operation-description.d.ts +2 -1
  327. package/lib/rules/common/operation-description.d.ts.map +1 -0
  328. package/lib/rules/common/operation-description.js +4 -7
  329. package/lib/rules/common/operation-description.js.map +1 -0
  330. package/lib/rules/common/operation-operationId-unique.d.ts +2 -1
  331. package/lib/rules/common/operation-operationId-unique.d.ts.map +1 -0
  332. package/lib/rules/common/operation-operationId-unique.js +2 -5
  333. package/lib/rules/common/operation-operationId-unique.js.map +1 -0
  334. package/lib/rules/common/operation-operationId-url-safe.d.ts +2 -1
  335. package/lib/rules/common/operation-operationId-url-safe.d.ts.map +1 -0
  336. package/lib/rules/common/operation-operationId-url-safe.js +2 -5
  337. package/lib/rules/common/operation-operationId-url-safe.js.map +1 -0
  338. package/lib/rules/common/operation-operationId.d.ts +2 -1
  339. package/lib/rules/common/operation-operationId.d.ts.map +1 -0
  340. package/lib/rules/common/operation-operationId.js +4 -7
  341. package/lib/rules/common/operation-operationId.js.map +1 -0
  342. package/lib/rules/common/operation-parameters-unique.d.ts +2 -1
  343. package/lib/rules/common/operation-parameters-unique.d.ts.map +1 -0
  344. package/lib/rules/common/operation-parameters-unique.js +2 -5
  345. package/lib/rules/common/operation-parameters-unique.js.map +1 -0
  346. package/lib/rules/common/operation-singular-tag.d.ts +2 -1
  347. package/lib/rules/common/operation-singular-tag.d.ts.map +1 -0
  348. package/lib/rules/common/operation-singular-tag.js +2 -5
  349. package/lib/rules/common/operation-singular-tag.js.map +1 -0
  350. package/lib/rules/common/operation-summary.d.ts +2 -1
  351. package/lib/rules/common/operation-summary.d.ts.map +1 -0
  352. package/lib/rules/common/operation-summary.js +4 -7
  353. package/lib/rules/common/operation-summary.js.map +1 -0
  354. package/lib/rules/common/operation-tag-defined.d.ts +2 -1
  355. package/lib/rules/common/operation-tag-defined.d.ts.map +1 -0
  356. package/lib/rules/common/operation-tag-defined.js +2 -5
  357. package/lib/rules/common/operation-tag-defined.js.map +1 -0
  358. package/lib/rules/common/parameter-description.d.ts +2 -1
  359. package/lib/rules/common/parameter-description.d.ts.map +1 -0
  360. package/lib/rules/common/parameter-description.js +2 -5
  361. package/lib/rules/common/parameter-description.js.map +1 -0
  362. package/lib/rules/common/path-declaration-must-exist.d.ts +2 -1
  363. package/lib/rules/common/path-declaration-must-exist.d.ts.map +1 -0
  364. package/lib/rules/common/path-declaration-must-exist.js +2 -5
  365. package/lib/rules/common/path-declaration-must-exist.js.map +1 -0
  366. package/lib/rules/common/path-excludes-patterns.d.ts +2 -1
  367. package/lib/rules/common/path-excludes-patterns.d.ts.map +1 -0
  368. package/lib/rules/common/path-excludes-patterns.js +2 -5
  369. package/lib/rules/common/path-excludes-patterns.js.map +1 -0
  370. package/lib/rules/common/path-http-verbs-order.d.ts +2 -1
  371. package/lib/rules/common/path-http-verbs-order.d.ts.map +1 -0
  372. package/lib/rules/common/path-http-verbs-order.js +2 -5
  373. package/lib/rules/common/path-http-verbs-order.js.map +1 -0
  374. package/lib/rules/common/path-not-include-query.d.ts +2 -1
  375. package/lib/rules/common/path-not-include-query.d.ts.map +1 -0
  376. package/lib/rules/common/path-not-include-query.js +2 -5
  377. package/lib/rules/common/path-not-include-query.js.map +1 -0
  378. package/lib/rules/common/path-params-defined.d.ts +2 -1
  379. package/lib/rules/common/path-params-defined.d.ts.map +1 -0
  380. package/lib/rules/common/path-params-defined.js +2 -5
  381. package/lib/rules/common/path-params-defined.js.map +1 -0
  382. package/lib/rules/common/path-segment-plural.d.ts +2 -1
  383. package/lib/rules/common/path-segment-plural.d.ts.map +1 -0
  384. package/lib/rules/common/path-segment-plural.js +6 -9
  385. package/lib/rules/common/path-segment-plural.js.map +1 -0
  386. package/lib/rules/common/paths-kebab-case.d.ts +2 -1
  387. package/lib/rules/common/paths-kebab-case.d.ts.map +1 -0
  388. package/lib/rules/common/paths-kebab-case.js +2 -5
  389. package/lib/rules/common/paths-kebab-case.js.map +1 -0
  390. package/lib/rules/common/required-string-property-missing-min-length.d.ts +2 -1
  391. package/lib/rules/common/required-string-property-missing-min-length.d.ts.map +1 -0
  392. package/lib/rules/common/required-string-property-missing-min-length.js +2 -5
  393. package/lib/rules/common/required-string-property-missing-min-length.js.map +1 -0
  394. package/lib/rules/common/response-contains-header.d.ts +2 -1
  395. package/lib/rules/common/response-contains-header.d.ts.map +1 -0
  396. package/lib/rules/common/response-contains-header.js +5 -8
  397. package/lib/rules/common/response-contains-header.js.map +1 -0
  398. package/lib/rules/common/scalar-property-missing-example.d.ts +2 -1
  399. package/lib/rules/common/scalar-property-missing-example.d.ts.map +1 -0
  400. package/lib/rules/common/scalar-property-missing-example.js +6 -8
  401. package/lib/rules/common/scalar-property-missing-example.js.map +1 -0
  402. package/lib/rules/common/security-defined.d.ts +2 -1
  403. package/lib/rules/common/security-defined.d.ts.map +1 -0
  404. package/lib/rules/common/security-defined.js +2 -5
  405. package/lib/rules/common/security-defined.js.map +1 -0
  406. package/lib/rules/common/spec-strict-refs.d.ts +2 -1
  407. package/lib/rules/common/spec-strict-refs.d.ts.map +1 -0
  408. package/lib/rules/common/spec-strict-refs.js +4 -7
  409. package/lib/rules/common/spec-strict-refs.js.map +1 -0
  410. package/lib/rules/common/struct.d.ts +2 -1
  411. package/lib/rules/common/struct.d.ts.map +1 -0
  412. package/lib/rules/common/struct.js +19 -28
  413. package/lib/rules/common/struct.js.map +1 -0
  414. package/lib/rules/common/tag-description.d.ts +2 -1
  415. package/lib/rules/common/tag-description.d.ts.map +1 -0
  416. package/lib/rules/common/tag-description.js +4 -7
  417. package/lib/rules/common/tag-description.js.map +1 -0
  418. package/lib/rules/common/tags-alphabetical.d.ts +2 -1
  419. package/lib/rules/common/tags-alphabetical.d.ts.map +1 -0
  420. package/lib/rules/common/tags-alphabetical.js +3 -8
  421. package/lib/rules/common/tags-alphabetical.js.map +1 -0
  422. package/lib/rules/no-unresolved-refs.d.ts +4 -3
  423. package/lib/rules/no-unresolved-refs.d.ts.map +1 -0
  424. package/lib/rules/no-unresolved-refs.js +5 -9
  425. package/lib/rules/no-unresolved-refs.js.map +1 -0
  426. package/lib/rules/oas2/boolean-parameter-prefixes.d.ts +2 -1
  427. package/lib/rules/oas2/boolean-parameter-prefixes.d.ts.map +1 -0
  428. package/lib/rules/oas2/boolean-parameter-prefixes.js +2 -5
  429. package/lib/rules/oas2/boolean-parameter-prefixes.js.map +1 -0
  430. package/lib/rules/oas2/index.d.ts +2 -1
  431. package/lib/rules/oas2/index.d.ts.map +1 -0
  432. package/lib/rules/oas2/index.js +96 -99
  433. package/lib/rules/oas2/index.js.map +1 -0
  434. package/lib/rules/oas2/request-mime-type.d.ts +2 -1
  435. package/lib/rules/oas2/request-mime-type.d.ts.map +1 -0
  436. package/lib/rules/oas2/request-mime-type.js +5 -8
  437. package/lib/rules/oas2/request-mime-type.js.map +1 -0
  438. package/lib/rules/oas2/response-contains-property.d.ts +2 -1
  439. package/lib/rules/oas2/response-contains-property.d.ts.map +1 -0
  440. package/lib/rules/oas2/response-contains-property.js +5 -8
  441. package/lib/rules/oas2/response-contains-property.js.map +1 -0
  442. package/lib/rules/oas2/response-mime-type.d.ts +2 -1
  443. package/lib/rules/oas2/response-mime-type.d.ts.map +1 -0
  444. package/lib/rules/oas2/response-mime-type.js +5 -8
  445. package/lib/rules/oas2/response-mime-type.js.map +1 -0
  446. package/lib/rules/oas3/array-parameter-serialization.d.ts +2 -1
  447. package/lib/rules/oas3/array-parameter-serialization.d.ts.map +1 -0
  448. package/lib/rules/oas3/array-parameter-serialization.js +4 -7
  449. package/lib/rules/oas3/array-parameter-serialization.js.map +1 -0
  450. package/lib/rules/oas3/boolean-parameter-prefixes.d.ts +2 -1
  451. package/lib/rules/oas3/boolean-parameter-prefixes.d.ts.map +1 -0
  452. package/lib/rules/oas3/boolean-parameter-prefixes.js +2 -5
  453. package/lib/rules/oas3/boolean-parameter-prefixes.js.map +1 -0
  454. package/lib/rules/oas3/component-name-unique.d.ts +2 -1
  455. package/lib/rules/oas3/component-name-unique.d.ts.map +1 -0
  456. package/lib/rules/oas3/component-name-unique.js +2 -5
  457. package/lib/rules/oas3/component-name-unique.js.map +1 -0
  458. package/lib/rules/oas3/index.d.ts +2 -1
  459. package/lib/rules/oas3/index.d.ts.map +1 -0
  460. package/lib/rules/oas3/index.js +122 -123
  461. package/lib/rules/oas3/index.js.map +1 -0
  462. package/lib/rules/oas3/no-empty-servers.d.ts +2 -1
  463. package/lib/rules/oas3/no-empty-servers.d.ts.map +1 -0
  464. package/lib/rules/oas3/no-empty-servers.js +2 -5
  465. package/lib/rules/oas3/no-empty-servers.js.map +1 -0
  466. package/lib/rules/oas3/no-example-value-and-externalValue.d.ts +2 -1
  467. package/lib/rules/oas3/no-example-value-and-externalValue.d.ts.map +1 -0
  468. package/lib/rules/oas3/no-example-value-and-externalValue.js +2 -5
  469. package/lib/rules/oas3/no-example-value-and-externalValue.js.map +1 -0
  470. package/lib/rules/oas3/no-invalid-media-type-examples.d.ts +2 -1
  471. package/lib/rules/oas3/no-invalid-media-type-examples.d.ts.map +1 -0
  472. package/lib/rules/oas3/no-invalid-media-type-examples.js +6 -10
  473. package/lib/rules/oas3/no-invalid-media-type-examples.js.map +1 -0
  474. package/lib/rules/oas3/no-server-example.com.d.ts +2 -1
  475. package/lib/rules/oas3/no-server-example.com.d.ts.map +1 -0
  476. package/lib/rules/oas3/no-server-example.com.js +2 -5
  477. package/lib/rules/oas3/no-server-example.com.js.map +1 -0
  478. package/lib/rules/oas3/no-server-trailing-slash.d.ts +2 -1
  479. package/lib/rules/oas3/no-server-trailing-slash.d.ts.map +1 -0
  480. package/lib/rules/oas3/no-server-trailing-slash.js +2 -5
  481. package/lib/rules/oas3/no-server-trailing-slash.js.map +1 -0
  482. package/lib/rules/oas3/no-server-variables-empty-enum.d.ts +2 -1
  483. package/lib/rules/oas3/no-server-variables-empty-enum.d.ts.map +1 -0
  484. package/lib/rules/oas3/no-server-variables-empty-enum.js +2 -5
  485. package/lib/rules/oas3/no-server-variables-empty-enum.js.map +1 -0
  486. package/lib/rules/oas3/no-undefined-server-variable.d.ts +2 -1
  487. package/lib/rules/oas3/no-undefined-server-variable.d.ts.map +1 -0
  488. package/lib/rules/oas3/no-undefined-server-variable.js +3 -6
  489. package/lib/rules/oas3/no-undefined-server-variable.js.map +1 -0
  490. package/lib/rules/oas3/no-unused-components.d.ts +2 -1
  491. package/lib/rules/oas3/no-unused-components.d.ts.map +1 -0
  492. package/lib/rules/oas3/no-unused-components.js +2 -5
  493. package/lib/rules/oas3/no-unused-components.js.map +1 -0
  494. package/lib/rules/oas3/nullable-type-sibling.d.ts +3 -0
  495. package/lib/rules/oas3/nullable-type-sibling.d.ts.map +1 -0
  496. package/lib/rules/oas3/nullable-type-sibling.js +15 -0
  497. package/lib/rules/oas3/nullable-type-sibling.js.map +1 -0
  498. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts +2 -1
  499. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.d.ts.map +1 -0
  500. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js +6 -9
  501. package/lib/rules/oas3/operation-4xx-problem-details-rfc7807.js.map +1 -0
  502. package/lib/rules/oas3/request-mime-type.d.ts +2 -1
  503. package/lib/rules/oas3/request-mime-type.d.ts.map +1 -0
  504. package/lib/rules/oas3/request-mime-type.js +6 -9
  505. package/lib/rules/oas3/request-mime-type.js.map +1 -0
  506. package/lib/rules/oas3/response-contains-property.d.ts +2 -1
  507. package/lib/rules/oas3/response-contains-property.d.ts.map +1 -0
  508. package/lib/rules/oas3/response-contains-property.js +5 -8
  509. package/lib/rules/oas3/response-contains-property.js.map +1 -0
  510. package/lib/rules/oas3/response-mime-type.d.ts +2 -1
  511. package/lib/rules/oas3/response-mime-type.d.ts.map +1 -0
  512. package/lib/rules/oas3/response-mime-type.js +6 -9
  513. package/lib/rules/oas3/response-mime-type.js.map +1 -0
  514. package/lib/rules/oas3/spec-components-invalid-map-name.d.ts +2 -1
  515. package/lib/rules/oas3/spec-components-invalid-map-name.d.ts.map +1 -0
  516. package/lib/rules/oas3/spec-components-invalid-map-name.js +2 -5
  517. package/lib/rules/oas3/spec-components-invalid-map-name.js.map +1 -0
  518. package/lib/rules/other/stats.d.ts +4 -3
  519. package/lib/rules/other/stats.d.ts.map +1 -0
  520. package/lib/rules/other/stats.js +2 -5
  521. package/lib/rules/other/stats.js.map +1 -0
  522. package/lib/rules/overlay1/index.d.ts +2 -1
  523. package/lib/rules/overlay1/index.d.ts.map +1 -0
  524. package/lib/rules/overlay1/index.js +9 -11
  525. package/lib/rules/overlay1/index.js.map +1 -0
  526. package/lib/rules/respect/no-criteria-xpath.d.ts +2 -1
  527. package/lib/rules/respect/no-criteria-xpath.d.ts.map +1 -0
  528. package/lib/rules/respect/no-criteria-xpath.js +2 -5
  529. package/lib/rules/respect/no-criteria-xpath.js.map +1 -0
  530. package/lib/rules/respect/no-x-security-scheme-name-in-workflow.d.ts +3 -0
  531. package/lib/rules/respect/no-x-security-scheme-name-in-workflow.d.ts.map +1 -0
  532. package/lib/rules/respect/no-x-security-scheme-name-in-workflow.js +21 -0
  533. package/lib/rules/respect/no-x-security-scheme-name-in-workflow.js.map +1 -0
  534. package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts +3 -0
  535. package/lib/rules/respect/no-x-security-scheme-name-without-openapi.d.ts.map +1 -0
  536. package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js +25 -0
  537. package/lib/rules/respect/no-x-security-scheme-name-without-openapi.js.map +1 -0
  538. package/lib/rules/respect/respect-supported-versions.d.ts +2 -1
  539. package/lib/rules/respect/respect-supported-versions.d.ts.map +1 -0
  540. package/lib/rules/respect/respect-supported-versions.js +7 -10
  541. package/lib/rules/respect/respect-supported-versions.js.map +1 -0
  542. package/lib/rules/respect/x-security-scheme-required-values.d.ts +3 -0
  543. package/lib/rules/respect/x-security-scheme-required-values.d.ts.map +1 -0
  544. package/lib/rules/respect/x-security-scheme-required-values.js +60 -0
  545. package/lib/rules/respect/x-security-scheme-required-values.js.map +1 -0
  546. package/lib/rules/utils.d.ts +6 -4
  547. package/lib/rules/utils.d.ts.map +1 -0
  548. package/lib/rules/utils.js +23 -43
  549. package/lib/rules/utils.js.map +1 -0
  550. package/lib/types/arazzo.d.ts +2 -1
  551. package/lib/types/arazzo.d.ts.map +1 -0
  552. package/lib/types/arazzo.js +40 -23
  553. package/lib/types/arazzo.js.map +1 -0
  554. package/lib/types/asyncapi2.d.ts +2 -1
  555. package/lib/types/asyncapi2.d.ts.map +1 -0
  556. package/lib/types/asyncapi2.js +54 -56
  557. package/lib/types/asyncapi2.js.map +1 -0
  558. package/lib/types/asyncapi3.d.ts +2 -1
  559. package/lib/types/asyncapi3.d.ts.map +1 -0
  560. package/lib/types/asyncapi3.js +41 -43
  561. package/lib/types/asyncapi3.js.map +1 -0
  562. package/lib/types/index.d.ts +2 -0
  563. package/lib/types/index.d.ts.map +1 -0
  564. package/lib/types/index.js +7 -13
  565. package/lib/types/index.js.map +1 -0
  566. package/lib/types/json-schema-adapter.d.ts +2 -1
  567. package/lib/types/json-schema-adapter.d.ts.map +1 -0
  568. package/lib/types/json-schema-adapter.js +15 -17
  569. package/lib/types/json-schema-adapter.js.map +1 -0
  570. package/lib/types/oas2.d.ts +85 -3
  571. package/lib/types/oas2.d.ts.map +1 -0
  572. package/lib/types/oas2.js +17 -19
  573. package/lib/types/oas2.js.map +1 -0
  574. package/lib/types/oas3.d.ts +159 -3
  575. package/lib/types/oas3.d.ts.map +1 -0
  576. package/lib/types/oas3.js +44 -46
  577. package/lib/types/oas3.js.map +1 -0
  578. package/lib/types/oas3_1.d.ts +162 -3
  579. package/lib/types/oas3_1.d.ts.map +1 -0
  580. package/lib/types/oas3_1.js +19 -21
  581. package/lib/types/oas3_1.js.map +1 -0
  582. package/lib/types/overlay.d.ts +2 -1
  583. package/lib/types/overlay.d.ts.map +1 -0
  584. package/lib/types/overlay.js +4 -6
  585. package/lib/types/overlay.js.map +1 -0
  586. package/lib/types/redocly-yaml.d.ts +10 -14
  587. package/lib/types/redocly-yaml.d.ts.map +1 -0
  588. package/lib/types/redocly-yaml.js +79 -813
  589. package/lib/types/redocly-yaml.js.map +1 -0
  590. package/lib/typings/arazzo.d.ts +41 -0
  591. package/lib/typings/arazzo.d.ts.map +1 -0
  592. package/lib/typings/arazzo.js +3 -5
  593. package/lib/typings/arazzo.js.map +1 -0
  594. package/lib/typings/asyncapi.d.ts +1 -0
  595. package/lib/typings/asyncapi.d.ts.map +1 -0
  596. package/lib/typings/asyncapi.js +2 -2
  597. package/lib/typings/asyncapi.js.map +1 -0
  598. package/lib/typings/asyncapi3.d.ts +1 -0
  599. package/lib/typings/asyncapi3.d.ts.map +1 -0
  600. package/lib/typings/asyncapi3.js +2 -2
  601. package/lib/typings/asyncapi3.js.map +1 -0
  602. package/lib/typings/common.d.ts +1 -0
  603. package/lib/typings/common.d.ts.map +1 -0
  604. package/lib/typings/common.js +2 -2
  605. package/lib/typings/common.js.map +1 -0
  606. package/lib/typings/openapi.d.ts +45 -15
  607. package/lib/typings/openapi.d.ts.map +1 -0
  608. package/lib/typings/openapi.js +2 -2
  609. package/lib/typings/openapi.js.map +1 -0
  610. package/lib/typings/overlay.d.ts +1 -0
  611. package/lib/typings/overlay.d.ts.map +1 -0
  612. package/lib/typings/overlay.js +2 -4
  613. package/lib/typings/overlay.js.map +1 -0
  614. package/lib/typings/swagger.d.ts +2 -1
  615. package/lib/typings/swagger.d.ts.map +1 -0
  616. package/lib/typings/swagger.js +2 -2
  617. package/lib/typings/swagger.js.map +1 -0
  618. package/lib/utils/error.d.ts +3 -0
  619. package/lib/utils/error.d.ts.map +1 -0
  620. package/lib/utils/error.js +3 -0
  621. package/lib/utils/error.js.map +1 -0
  622. package/lib/utils.d.ts +6 -11
  623. package/lib/utils.d.ts.map +1 -0
  624. package/lib/utils.js +50 -123
  625. package/lib/utils.js.map +1 -0
  626. package/lib/visitors.d.ts +16 -15
  627. package/lib/visitors.d.ts.map +1 -0
  628. package/lib/visitors.js +4 -6
  629. package/lib/visitors.js.map +1 -0
  630. package/lib/walk.d.ts +9 -8
  631. package/lib/walk.d.ts.map +1 -0
  632. package/lib/walk.js +31 -28
  633. package/lib/walk.js.map +1 -0
  634. package/package.json +31 -10
  635. package/CHANGELOG.md +0 -563
  636. package/__tests__/utils.ts +0 -92
  637. package/lib/benchmark/benches/lint-with-many-rules.bench.d.ts +0 -4
  638. package/lib/benchmark/benches/lint-with-many-rules.bench.js +0 -38
  639. package/lib/benchmark/benches/lint-with-nested-rule.bench.d.ts +0 -4
  640. package/lib/benchmark/benches/lint-with-nested-rule.bench.js +0 -44
  641. package/lib/benchmark/benches/lint-with-no-rules.bench.d.ts +0 -4
  642. package/lib/benchmark/benches/lint-with-no-rules.bench.js +0 -25
  643. package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.d.ts +0 -4
  644. package/lib/benchmark/benches/lint-with-top-level-rule-report.bench.js +0 -37
  645. package/lib/benchmark/benches/lint-with-top-level-rule.bench.d.ts +0 -4
  646. package/lib/benchmark/benches/lint-with-top-level-rule.bench.js +0 -36
  647. package/lib/benchmark/benches/recommended-oas3.bench.d.ts +0 -3
  648. package/lib/benchmark/benches/recommended-oas3.bench.js +0 -21
  649. package/lib/benchmark/benches/resolve-with-no-external.bench.d.ts +0 -3
  650. package/lib/benchmark/benches/resolve-with-no-external.bench.js +0 -22
  651. package/lib/benchmark/utils.d.ts +0 -6
  652. package/lib/benchmark/utils.js +0 -34
  653. package/lib/decorators/common/registry-dependencies.d.ts +0 -2
  654. package/lib/decorators/common/registry-dependencies.js +0 -24
  655. package/lib/output.d.ts +0 -3
  656. package/lib/output.js +0 -9
  657. package/lib/redocly/domains.d.ts +0 -14
  658. package/lib/redocly/domains.js +0 -41
  659. package/lib/redocly/index.d.ts +0 -30
  660. package/lib/redocly/index.js +0 -131
  661. package/lib/redocly/redocly-client-types.d.ts +0 -8
  662. package/lib/redocly/redocly-client-types.js +0 -2
  663. package/lib/redocly/registry-api-types.d.ts +0 -29
  664. package/lib/redocly/registry-api-types.js +0 -2
  665. package/lib/redocly/registry-api.d.ts +0 -17
  666. package/lib/redocly/registry-api.js +0 -100
  667. package/src/__tests__/__snapshots__/bundle.test.ts.snap +0 -461
  668. package/src/__tests__/bundle.test.ts +0 -478
  669. package/src/__tests__/codeframes.test.ts +0 -530
  670. package/src/__tests__/fixtures/.redocly.lint-ignore.yaml +0 -5
  671. package/src/__tests__/fixtures/extension.js +0 -24
  672. package/src/__tests__/fixtures/lint/openapi.yaml +0 -10
  673. package/src/__tests__/fixtures/redocly.yaml +0 -2
  674. package/src/__tests__/fixtures/refs/definitions.yaml +0 -3
  675. package/src/__tests__/fixtures/refs/examples.yaml +0 -8
  676. package/src/__tests__/fixtures/refs/external-request-body.yaml +0 -13
  677. package/src/__tests__/fixtures/refs/externalref.yaml +0 -35
  678. package/src/__tests__/fixtures/refs/hosted.yaml +0 -35
  679. package/src/__tests__/fixtures/refs/openapi-with-external-refs-conflicting-names.yaml +0 -21
  680. package/src/__tests__/fixtures/refs/openapi-with-external-refs.yaml +0 -33
  681. package/src/__tests__/fixtures/refs/openapi-with-special-names-in-props.yaml +0 -19
  682. package/src/__tests__/fixtures/refs/openapi-with-url-refs.yaml +0 -18
  683. package/src/__tests__/fixtures/refs/param-b.yaml +0 -1
  684. package/src/__tests__/fixtures/refs/param-c.yaml +0 -1
  685. package/src/__tests__/fixtures/refs/rename.yaml +0 -1
  686. package/src/__tests__/fixtures/refs/requestBody.yaml +0 -9
  687. package/src/__tests__/fixtures/refs/schema-a.yaml +0 -1
  688. package/src/__tests__/fixtures/refs/simple.yaml +0 -1
  689. package/src/__tests__/fixtures/refs/vendor.schema.yaml +0 -20
  690. package/src/__tests__/fixtures/resolve/External.yaml +0 -10
  691. package/src/__tests__/fixtures/resolve/External2.yaml +0 -4
  692. package/src/__tests__/fixtures/resolve/description.md +0 -3
  693. package/src/__tests__/fixtures/resolve/externalInfo.yaml +0 -4
  694. package/src/__tests__/fixtures/resolve/externalLicense.yaml +0 -1
  695. package/src/__tests__/fixtures/resolve/openapi-with-back.yaml +0 -13
  696. package/src/__tests__/fixtures/resolve/openapi-with-md-description.yaml +0 -5
  697. package/src/__tests__/fixtures/resolve/openapi.yaml +0 -28
  698. package/src/__tests__/fixtures/resolve/schemas/type-a.yaml +0 -10
  699. package/src/__tests__/fixtures/resolve/schemas/type-b.yaml +0 -6
  700. package/src/__tests__/fixtures/resolve/transitive/a.yaml +0 -1
  701. package/src/__tests__/fixtures/resolve/transitive/components.yaml +0 -5
  702. package/src/__tests__/fixtures/resolve/transitive/schemas.yaml +0 -3
  703. package/src/__tests__/format.test.ts +0 -147
  704. package/src/__tests__/js-yaml.test.ts +0 -73
  705. package/src/__tests__/lint.test.ts +0 -1772
  706. package/src/__tests__/logger-browser.test.ts +0 -53
  707. package/src/__tests__/logger.test.ts +0 -47
  708. package/src/__tests__/login.test.ts +0 -17
  709. package/src/__tests__/normalizeVisitors.test.ts +0 -169
  710. package/src/__tests__/output-browser.test.ts +0 -18
  711. package/src/__tests__/output.test.ts +0 -15
  712. package/src/__tests__/ref-utils.test.ts +0 -142
  713. package/src/__tests__/resolve-http.test.ts +0 -77
  714. package/src/__tests__/resolve.test.ts +0 -431
  715. package/src/__tests__/utils-browser.test.ts +0 -11
  716. package/src/__tests__/utils.test.ts +0 -144
  717. package/src/__tests__/walk.test.ts +0 -1596
  718. package/src/benchmark/benches/lint-with-many-rules.bench.ts +0 -41
  719. package/src/benchmark/benches/lint-with-nested-rule.bench.ts +0 -45
  720. package/src/benchmark/benches/lint-with-no-rules.bench.ts +0 -27
  721. package/src/benchmark/benches/lint-with-top-level-rule-report.bench.ts +0 -40
  722. package/src/benchmark/benches/lint-with-top-level-rule.bench.ts +0 -38
  723. package/src/benchmark/benches/rebilly.yaml +0 -32272
  724. package/src/benchmark/benches/recommended-oas3.bench.ts +0 -22
  725. package/src/benchmark/benches/resolve-with-no-external.bench.ts +0 -23
  726. package/src/benchmark/benchmark.js +0 -311
  727. package/src/benchmark/colors.js +0 -29
  728. package/src/benchmark/fork.js +0 -87
  729. package/src/benchmark/utils.ts +0 -37
  730. package/src/bundle.ts +0 -531
  731. package/src/config/__tests__/__snapshots__/config-resolvers.test.ts.snap +0 -485
  732. package/src/config/__tests__/__snapshots__/config.test.ts.snap +0 -232
  733. package/src/config/__tests__/config-resolvers.test.ts +0 -668
  734. package/src/config/__tests__/config.test.ts +0 -356
  735. package/src/config/__tests__/fixtures/ingore-file.ts +0 -8
  736. package/src/config/__tests__/fixtures/load-external.yaml +0 -2
  737. package/src/config/__tests__/fixtures/load-redocly.yaml +0 -2
  738. package/src/config/__tests__/fixtures/plugin-config.yaml +0 -2
  739. package/src/config/__tests__/fixtures/plugin.js +0 -56
  740. package/src/config/__tests__/fixtures/resolve-config/api/nested-config.yaml +0 -11
  741. package/src/config/__tests__/fixtures/resolve-config/api/plugin.js +0 -69
  742. package/src/config/__tests__/fixtures/resolve-config/local-config-with-circular.yaml +0 -7
  743. package/src/config/__tests__/fixtures/resolve-config/local-config-with-commonjs-export-function.yaml +0 -2
  744. package/src/config/__tests__/fixtures/resolve-config/local-config-with-custom-function.yaml +0 -17
  745. package/src/config/__tests__/fixtures/resolve-config/local-config-with-esm.yaml +0 -2
  746. package/src/config/__tests__/fixtures/resolve-config/local-config-with-file.yaml +0 -18
  747. package/src/config/__tests__/fixtures/resolve-config/local-config-with-plugin-init.yaml +0 -2
  748. package/src/config/__tests__/fixtures/resolve-config/local-config-with-realm-plugin.yaml +0 -2
  749. package/src/config/__tests__/fixtures/resolve-config/local-config-with-wrong-custom-function.yaml +0 -15
  750. package/src/config/__tests__/fixtures/resolve-config/local-config.yaml +0 -9
  751. package/src/config/__tests__/fixtures/resolve-config/plugin-esm.mjs +0 -10
  752. package/src/config/__tests__/fixtures/resolve-config/plugin-with-export-function.cjs +0 -10
  753. package/src/config/__tests__/fixtures/resolve-config/plugin-with-init-logic.js +0 -9
  754. package/src/config/__tests__/fixtures/resolve-config/plugin.js +0 -80
  755. package/src/config/__tests__/fixtures/resolve-config/realm-plugin.js +0 -12
  756. package/src/config/__tests__/fixtures/resolve-refs-in-config/config-with-refs.yaml +0 -8
  757. package/src/config/__tests__/fixtures/resolve-refs-in-config/rules.yaml +0 -2
  758. package/src/config/__tests__/fixtures/resolve-refs-in-config/seo.yaml +0 -1
  759. package/src/config/__tests__/fixtures/resolve-remote-configs/nested-remote-config.yaml +0 -3
  760. package/src/config/__tests__/fixtures/resolve-remote-configs/remote-config.yaml +0 -4
  761. package/src/config/__tests__/load.test.ts +0 -320
  762. package/src/config/__tests__/resolve-plugins.test.ts +0 -30
  763. package/src/config/__tests__/utils.test.ts +0 -225
  764. package/src/config/all.ts +0 -234
  765. package/src/config/builtIn.ts +0 -59
  766. package/src/config/config-resolvers.ts +0 -657
  767. package/src/config/config.ts +0 -423
  768. package/src/config/index.ts +0 -7
  769. package/src/config/load.ts +0 -213
  770. package/src/config/minimal.ts +0 -210
  771. package/src/config/recommended-strict.ts +0 -210
  772. package/src/config/recommended.ts +0 -210
  773. package/src/config/rules.ts +0 -72
  774. package/src/config/spec.ts +0 -33
  775. package/src/config/types.ts +0 -306
  776. package/src/config/utils.ts +0 -439
  777. package/src/decorators/__tests__/filter-in.test.ts +0 -313
  778. package/src/decorators/__tests__/filter-out.test.ts +0 -344
  779. package/src/decorators/__tests__/media-type-examples-override.test.ts +0 -665
  780. package/src/decorators/__tests__/remove-x-internal.test.ts +0 -416
  781. package/src/decorators/__tests__/resources/request.yaml +0 -3
  782. package/src/decorators/__tests__/resources/response.yaml +0 -3
  783. package/src/decorators/arazzo/index.ts +0 -1
  784. package/src/decorators/async2/index.ts +0 -1
  785. package/src/decorators/async3/index.ts +0 -1
  786. package/src/decorators/common/filters/filter-helper.ts +0 -73
  787. package/src/decorators/common/filters/filter-in.ts +0 -19
  788. package/src/decorators/common/filters/filter-out.ts +0 -19
  789. package/src/decorators/common/info-description-override.ts +0 -25
  790. package/src/decorators/common/info-override.ts +0 -15
  791. package/src/decorators/common/media-type-examples-override.ts +0 -80
  792. package/src/decorators/common/operation-description-override.ts +0 -31
  793. package/src/decorators/common/registry-dependencies.ts +0 -25
  794. package/src/decorators/common/remove-x-internal.ts +0 -77
  795. package/src/decorators/common/tag-description-override.ts +0 -26
  796. package/src/decorators/oas2/__tests__/remove-unused-components.test.ts +0 -228
  797. package/src/decorators/oas2/index.ts +0 -21
  798. package/src/decorators/oas2/remove-unused-components.ts +0 -109
  799. package/src/decorators/oas3/__tests__/remove-unused-components.test.ts +0 -313
  800. package/src/decorators/oas3/index.ts +0 -23
  801. package/src/decorators/oas3/remove-unused-components.ts +0 -138
  802. package/src/decorators/overlay1/index.ts +0 -1
  803. package/src/env.ts +0 -5
  804. package/src/format/codeframes.ts +0 -217
  805. package/src/format/format.ts +0 -479
  806. package/src/index.ts +0 -91
  807. package/src/js-yaml/index.ts +0 -16
  808. package/src/lint.ts +0 -190
  809. package/src/logger.ts +0 -36
  810. package/src/oas-types.ts +0 -178
  811. package/src/output.ts +0 -7
  812. package/src/redocly/__tests__/domains.test.ts +0 -52
  813. package/src/redocly/__tests__/redocly-client.test.ts +0 -156
  814. package/src/redocly/domains.ts +0 -48
  815. package/src/redocly/index.ts +0 -177
  816. package/src/redocly/redocly-client-types.ts +0 -10
  817. package/src/redocly/registry-api-types.ts +0 -32
  818. package/src/redocly/registry-api.ts +0 -147
  819. package/src/ref-utils.ts +0 -91
  820. package/src/resolve.ts +0 -461
  821. package/src/rules/__tests__/fixtures/code-sample.php +0 -9
  822. package/src/rules/__tests__/fixtures/invalid-yaml.yaml +0 -1
  823. package/src/rules/__tests__/fixtures/ref.yaml +0 -1
  824. package/src/rules/__tests__/no-unresolved-refs.test.ts +0 -271
  825. package/src/rules/__tests__/utils.test.ts +0 -160
  826. package/src/rules/ajv.ts +0 -105
  827. package/src/rules/arazzo/__tests__/criteria-unique.test.ts +0 -160
  828. package/src/rules/arazzo/__tests__/no-criteria-xpath.test.ts +0 -126
  829. package/src/rules/arazzo/__tests__/parameters-unique.test.ts +0 -113
  830. package/src/rules/arazzo/__tests__/requestBody-replacements-unique.test.ts +0 -108
  831. package/src/rules/arazzo/__tests__/respect-supported-versions.test.ts +0 -116
  832. package/src/rules/arazzo/__tests__/source-description-type.test.ts +0 -78
  833. package/src/rules/arazzo/__tests__/sourceDescription-name-unique.test.ts +0 -78
  834. package/src/rules/arazzo/__tests__/sourceDescriptions-not-empty.test.ts +0 -104
  835. package/src/rules/arazzo/__tests__/step-onFailure-unique.test.ts +0 -110
  836. package/src/rules/arazzo/__tests__/step-onSuccess-unique.test.ts +0 -110
  837. package/src/rules/arazzo/__tests__/stepId-unique.test.ts +0 -94
  838. package/src/rules/arazzo/__tests__/workflow-dependsOn.test.ts +0 -209
  839. package/src/rules/arazzo/__tests__/workflowId-unique.test.ts +0 -88
  840. package/src/rules/arazzo/criteria-unique.ts +0 -70
  841. package/src/rules/arazzo/index.ts +0 -38
  842. package/src/rules/arazzo/parameters-unique.ts +0 -33
  843. package/src/rules/arazzo/requestBody-replacements-unique.ts +0 -33
  844. package/src/rules/arazzo/sourceDescription-type.ts +0 -21
  845. package/src/rules/arazzo/sourceDescriptions-name-unique.ts +0 -23
  846. package/src/rules/arazzo/sourceDescriptions-not-empty.ts +0 -17
  847. package/src/rules/arazzo/step-onFailure-unique.ts +0 -33
  848. package/src/rules/arazzo/step-onSuccess-unique.ts +0 -33
  849. package/src/rules/arazzo/stepId-unique.ts +0 -24
  850. package/src/rules/arazzo/workflow-dependsOn.ts +0 -56
  851. package/src/rules/arazzo/workflowId-unique.ts +0 -21
  852. package/src/rules/async2/__tests__/channels-kebab-case.test.ts +0 -145
  853. package/src/rules/async2/__tests__/no-channel-trailing-slash.test.ts +0 -97
  854. package/src/rules/async2/channels-kebab-case.ts +0 -18
  855. package/src/rules/async2/index.ts +0 -29
  856. package/src/rules/async2/no-channel-trailing-slash.ts +0 -15
  857. package/src/rules/async3/__tests__/channels-kebab-case.test.ts +0 -145
  858. package/src/rules/async3/__tests__/no-channel-trailing-slash.test.ts +0 -96
  859. package/src/rules/async3/channels-kebab-case.ts +0 -19
  860. package/src/rules/async3/index.ts +0 -29
  861. package/src/rules/async3/no-channel-trailing-slash.ts +0 -16
  862. package/src/rules/common/__tests__/info-license-strict.test.ts +0 -141
  863. package/src/rules/common/__tests__/info-license.test.ts +0 -62
  864. package/src/rules/common/__tests__/license-url.test.ts +0 -63
  865. package/src/rules/common/__tests__/no-ambiguous-paths.test.ts +0 -96
  866. package/src/rules/common/__tests__/no-enum-type-mismatch.test.ts +0 -210
  867. package/src/rules/common/__tests__/no-identical-paths.test.ts +0 -58
  868. package/src/rules/common/__tests__/no-invalid-parameter-examples.test.ts +0 -53
  869. package/src/rules/common/__tests__/no-invalid-schema-examples.test.ts +0 -86
  870. package/src/rules/common/__tests__/no-path-trailing-slash.test.ts +0 -126
  871. package/src/rules/common/__tests__/no-required-schema-properties-undefined.test.ts +0 -550
  872. package/src/rules/common/__tests__/no-schema-type-mismatch.test.ts +0 -126
  873. package/src/rules/common/__tests__/operation-2xx-response.test.ts +0 -194
  874. package/src/rules/common/__tests__/operation-4xx-response.test.ts +0 -233
  875. package/src/rules/common/__tests__/operation-operationId-unique.test.ts +0 -76
  876. package/src/rules/common/__tests__/operation-operationId-url-safe.test.ts +0 -45
  877. package/src/rules/common/__tests__/operation-parameters-unique.test.ts +0 -167
  878. package/src/rules/common/__tests__/operation-singular-tag.test.ts +0 -72
  879. package/src/rules/common/__tests__/operation-tag-defined.test.ts +0 -68
  880. package/src/rules/common/__tests__/path-http-verbs-order.test.ts +0 -95
  881. package/src/rules/common/__tests__/path-not-include-query.test.ts +0 -64
  882. package/src/rules/common/__tests__/path-params-defined.test.ts +0 -202
  883. package/src/rules/common/__tests__/paths-kebab-case.test.ts +0 -110
  884. package/src/rules/common/__tests__/scalar-property-missing-example.test.ts +0 -264
  885. package/src/rules/common/__tests__/security-defined.test.ts +0 -284
  886. package/src/rules/common/__tests__/spec-strict-refs.test.ts +0 -69
  887. package/src/rules/common/__tests__/struct.test.ts +0 -657
  888. package/src/rules/common/__tests__/tag-description.test.ts +0 -65
  889. package/src/rules/common/__tests__/tags-alphabetical.test.ts +0 -124
  890. package/src/rules/common/assertions/__tests__/asserts.test.ts +0 -877
  891. package/src/rules/common/assertions/__tests__/index.test.ts +0 -100
  892. package/src/rules/common/assertions/__tests__/utils.test.ts +0 -236
  893. package/src/rules/common/assertions/asserts.ts +0 -365
  894. package/src/rules/common/assertions/index.ts +0 -68
  895. package/src/rules/common/assertions/utils.ts +0 -333
  896. package/src/rules/common/info-contact.ts +0 -16
  897. package/src/rules/common/info-license-strict.ts +0 -24
  898. package/src/rules/common/info-license-url.ts +0 -11
  899. package/src/rules/common/info-license.ts +0 -16
  900. package/src/rules/common/no-ambiguous-paths.ts +0 -50
  901. package/src/rules/common/no-enum-type-mismatch.ts +0 -53
  902. package/src/rules/common/no-http-verbs-in-paths.ts +0 -37
  903. package/src/rules/common/no-identical-paths.ts +0 -24
  904. package/src/rules/common/no-invalid-parameter-examples.ts +0 -37
  905. package/src/rules/common/no-invalid-schema-examples.ts +0 -40
  906. package/src/rules/common/no-path-trailing-slash.ts +0 -15
  907. package/src/rules/common/no-required-schema-properties-undefined.ts +0 -54
  908. package/src/rules/common/no-schema-type-mismatch.ts +0 -24
  909. package/src/rules/common/operation-2xx-response.ts +0 -25
  910. package/src/rules/common/operation-4xx-response.ts +0 -25
  911. package/src/rules/common/operation-description.ts +0 -14
  912. package/src/rules/common/operation-operationId-unique.ts +0 -21
  913. package/src/rules/common/operation-operationId-url-safe.ts +0 -20
  914. package/src/rules/common/operation-operationId.ts +0 -18
  915. package/src/rules/common/operation-parameters-unique.ts +0 -48
  916. package/src/rules/common/operation-singular-tag.ts +0 -17
  917. package/src/rules/common/operation-summary.ts +0 -14
  918. package/src/rules/common/operation-tag-defined.ts +0 -31
  919. package/src/rules/common/parameter-description.ts +0 -22
  920. package/src/rules/common/path-declaration-must-exist.ts +0 -15
  921. package/src/rules/common/path-excludes-patterns.ts +0 -23
  922. package/src/rules/common/path-http-verbs-order.ts +0 -30
  923. package/src/rules/common/path-not-include-query.ts +0 -17
  924. package/src/rules/common/path-params-defined.ts +0 -65
  925. package/src/rules/common/path-segment-plural.ts +0 -33
  926. package/src/rules/common/paths-kebab-case.ts +0 -19
  927. package/src/rules/common/required-string-property-missing-min-length.ts +0 -44
  928. package/src/rules/common/response-contains-header.ts +0 -36
  929. package/src/rules/common/scalar-property-missing-example.ts +0 -59
  930. package/src/rules/common/security-defined.ts +0 -89
  931. package/src/rules/common/spec-strict-refs.ts +0 -31
  932. package/src/rules/common/struct.ts +0 -189
  933. package/src/rules/common/tag-description.ts +0 -11
  934. package/src/rules/common/tags-alphabetical.ts +0 -27
  935. package/src/rules/no-unresolved-refs.ts +0 -52
  936. package/src/rules/oas2/__tests__/boolean-parameter-prefixes.test.ts +0 -112
  937. package/src/rules/oas2/__tests__/response-contains-header.test.ts +0 -180
  938. package/src/rules/oas2/__tests__/response-contains-property.test.ts +0 -161
  939. package/src/rules/oas2/__tests__/spec/fixtures/description.md +0 -1
  940. package/src/rules/oas2/__tests__/spec/info.test.ts +0 -355
  941. package/src/rules/oas2/__tests__/spec/operation.test.ts +0 -123
  942. package/src/rules/oas2/__tests__/spec/paths.test.ts +0 -245
  943. package/src/rules/oas2/__tests__/spec/referenceableScalars.test.ts +0 -37
  944. package/src/rules/oas2/__tests__/spec/utils.ts +0 -32
  945. package/src/rules/oas2/boolean-parameter-prefixes.ts +0 -26
  946. package/src/rules/oas2/index.ts +0 -102
  947. package/src/rules/oas2/request-mime-type.ts +0 -17
  948. package/src/rules/oas2/response-contains-property.ts +0 -37
  949. package/src/rules/oas2/response-mime-type.ts +0 -17
  950. package/src/rules/oas3/__tests__/array-parameter-serialization.test.ts +0 -275
  951. package/src/rules/oas3/__tests__/boolean-parameter-prefixes.test.ts +0 -113
  952. package/src/rules/oas3/__tests__/component-name-unique.test.ts +0 -966
  953. package/src/rules/oas3/__tests__/fixtures/common.yaml +0 -11
  954. package/src/rules/oas3/__tests__/fixtures/external-value.yaml +0 -2
  955. package/src/rules/oas3/__tests__/no-empty-enum-servers.com.test.ts +0 -205
  956. package/src/rules/oas3/__tests__/no-example-value-and-externalValue.test.ts +0 -65
  957. package/src/rules/oas3/__tests__/no-invalid-media-type-examples.test.ts +0 -732
  958. package/src/rules/oas3/__tests__/no-server-example.com.test.ts +0 -95
  959. package/src/rules/oas3/__tests__/no-server-trailing-slash.test.ts +0 -79
  960. package/src/rules/oas3/__tests__/no-unused-components.test.ts +0 -131
  961. package/src/rules/oas3/__tests__/operation-4xx-problem-details-rfc7807.test.ts +0 -145
  962. package/src/rules/oas3/__tests__/response-contains-header.test.ts +0 -401
  963. package/src/rules/oas3/__tests__/response-contains-property.test.ts +0 -417
  964. package/src/rules/oas3/__tests__/spec/callbacks.test.ts +0 -41
  965. package/src/rules/oas3/__tests__/spec/fixtures/description.md +0 -1
  966. package/src/rules/oas3/__tests__/spec/info.test.ts +0 -391
  967. package/src/rules/oas3/__tests__/spec/operation.test.ts +0 -253
  968. package/src/rules/oas3/__tests__/spec/paths.test.ts +0 -284
  969. package/src/rules/oas3/__tests__/spec/referenceableScalars.test.ts +0 -77
  970. package/src/rules/oas3/__tests__/spec/servers.test.ts +0 -505
  971. package/src/rules/oas3/__tests__/spec/spec.test.ts +0 -307
  972. package/src/rules/oas3/__tests__/spec/utils.ts +0 -32
  973. package/src/rules/oas3/__tests__/spec-components-invalid-map-name.test.ts +0 -282
  974. package/src/rules/oas3/__tests__/utils/lint-document-for-test.ts +0 -23
  975. package/src/rules/oas3/array-parameter-serialization.ts +0 -47
  976. package/src/rules/oas3/boolean-parameter-prefixes.ts +0 -28
  977. package/src/rules/oas3/component-name-unique.ts +0 -162
  978. package/src/rules/oas3/index.ts +0 -126
  979. package/src/rules/oas3/no-empty-servers.ts +0 -22
  980. package/src/rules/oas3/no-example-value-and-externalValue.ts +0 -14
  981. package/src/rules/oas3/no-invalid-media-type-examples.ts +0 -54
  982. package/src/rules/oas3/no-server-example.com.ts +0 -16
  983. package/src/rules/oas3/no-server-trailing-slash.ts +0 -15
  984. package/src/rules/oas3/no-server-variables-empty-enum.ts +0 -66
  985. package/src/rules/oas3/no-undefined-server-variable.ts +0 -30
  986. package/src/rules/oas3/no-unused-components.ts +0 -75
  987. package/src/rules/oas3/operation-4xx-problem-details-rfc7807.ts +0 -36
  988. package/src/rules/oas3/request-mime-type.ts +0 -31
  989. package/src/rules/oas3/response-contains-property.ts +0 -39
  990. package/src/rules/oas3/response-mime-type.ts +0 -31
  991. package/src/rules/oas3/spec-components-invalid-map-name.ts +0 -69
  992. package/src/rules/other/stats.ts +0 -75
  993. package/src/rules/overlay1/__tests__/info-contact.test.ts +0 -112
  994. package/src/rules/overlay1/index.ts +0 -14
  995. package/src/rules/respect/no-criteria-xpath.ts +0 -20
  996. package/src/rules/respect/respect-supported-versions.ts +0 -24
  997. package/src/rules/utils.ts +0 -230
  998. package/src/types/arazzo.ts +0 -305
  999. package/src/types/asyncapi2.ts +0 -1121
  1000. package/src/types/asyncapi3.ts +0 -383
  1001. package/src/types/index.ts +0 -144
  1002. package/src/types/json-schema-adapter.ts +0 -217
  1003. package/src/types/oas2.ts +0 -481
  1004. package/src/types/oas3.ts +0 -594
  1005. package/src/types/oas3_1.ts +0 -290
  1006. package/src/types/overlay.ts +0 -40
  1007. package/src/types/redocly-yaml.ts +0 -1226
  1008. package/src/typings/arazzo.ts +0 -172
  1009. package/src/typings/asyncapi.ts +0 -26
  1010. package/src/typings/asyncapi3.ts +0 -61
  1011. package/src/typings/common.ts +0 -18
  1012. package/src/typings/openapi.ts +0 -347
  1013. package/src/typings/overlay.ts +0 -19
  1014. package/src/typings/swagger.ts +0 -236
  1015. package/src/utils.ts +0 -357
  1016. package/src/visitors.ts +0 -598
  1017. package/src/walk.ts +0 -467
  1018. package/tsconfig.json +0 -8
  1019. package/tsconfig.tsbuildinfo +0 -1
@@ -1,88 +0,0 @@
1
- import { outdent } from 'outdent';
2
- import { lintDocument } from '../../../lint';
3
- import { parseYamlToDocument, replaceSourceWithRef, makeConfig } from '../../../../__tests__/utils';
4
- import { BaseResolver } from '../../../resolve';
5
-
6
- describe('Arazzo workflowId-unique', () => {
7
- const document = parseYamlToDocument(
8
- outdent`
9
- arazzo: '1.0.1'
10
- info:
11
- title: Cool API
12
- version: 1.0.0
13
- description: A cool API
14
- sourceDescriptions:
15
- - name: museum-api
16
- type: openapi
17
- url: openapi.yaml
18
- workflows:
19
- - workflowId: get-museum-hours
20
- description: This workflow demonstrates how to get the museum opening hours and buy tickets.
21
- parameters:
22
- - in: header
23
- name: Authorization
24
- value: Basic Og==
25
- steps:
26
- - stepId: get-museum-hours
27
- description: >-
28
- Get museum hours by resolving request details with getMuseumHours operationId from openapi.yaml description.
29
- operationId: museum-api.getMuseumHours
30
- successCriteria:
31
- - condition: $statusCode == 200
32
- - workflowId: get-museum-hours
33
- description: This workflow demonstrates how to get the museum opening hours and buy tickets.
34
- parameters:
35
- - in: header
36
- name: Authorization
37
- value: Basic Og==
38
- steps:
39
- - stepId: get-museum-hours
40
- description: >-
41
- Get museum hours by resolving request details with getMuseumHours operationId from openapi.yaml description.
42
- operationId: museum-api.getMuseumHours
43
- successCriteria:
44
- - condition: $statusCode == 200
45
- `,
46
- 'arazzo.yaml'
47
- );
48
-
49
- it('should report on workflowId unique violation', async () => {
50
- const results = await lintDocument({
51
- externalRefResolver: new BaseResolver(),
52
- document,
53
- config: await makeConfig({
54
- rules: { 'workflowId-unique': 'error' },
55
- }),
56
- });
57
-
58
- expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`
59
- [
60
- {
61
- "location": [
62
- {
63
- "pointer": "#/workflows/1/get-museum-hours",
64
- "reportOnKey": false,
65
- "source": "arazzo.yaml",
66
- },
67
- ],
68
- "message": "Every workflow must have a unique \`workflowId\`.",
69
- "ruleId": "workflowId-unique",
70
- "severity": "error",
71
- "suggest": [],
72
- },
73
- ]
74
- `);
75
- });
76
-
77
- it('should not report on workflowId unique violation', async () => {
78
- const results = await lintDocument({
79
- externalRefResolver: new BaseResolver(),
80
- document,
81
- config: await makeConfig({
82
- rules: { 'workflowId-unique': 'off' },
83
- }),
84
- });
85
-
86
- expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`[]`);
87
- });
88
- });
@@ -1,70 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const CriteriaUnique: Arazzo1Rule = () => {
5
- return {
6
- FailureActionObject: {
7
- enter(action, { report, location }: UserContext) {
8
- const criterias = action?.criteria;
9
- if (!Array.isArray(criterias)) {
10
- return;
11
- }
12
- const seen = new Set<string>();
13
- for (const criteria of criterias) {
14
- const key = JSON.stringify(criteria);
15
- if (seen.has(key)) {
16
- report({
17
- message: 'The FailureAction criteria items must be unique.',
18
- location: location.child(['criteria', criterias.indexOf(criteria)]),
19
- });
20
- } else {
21
- seen.add(key);
22
- }
23
- }
24
- },
25
- },
26
- SuccessActionObject: {
27
- enter(action, { report, location }: UserContext) {
28
- const criterias = action?.criteria;
29
- if (!Array.isArray(criterias)) {
30
- return;
31
- }
32
- const seen = new Set<string>();
33
- for (const criteria of criterias) {
34
- const key = JSON.stringify(criteria);
35
- if (seen.has(key)) {
36
- report({
37
- message: 'The SuccessAction criteria items must be unique.',
38
- location: location.child(['criteria', criterias.indexOf(criteria)]),
39
- });
40
- } else {
41
- seen.add(key);
42
- }
43
- }
44
- },
45
- },
46
- Step: {
47
- enter(step, { report, location }: UserContext) {
48
- const successCriterias = step?.successCriteria;
49
-
50
- if (!Array.isArray(successCriterias)) {
51
- return;
52
- }
53
-
54
- const seen = new Set<string>();
55
-
56
- for (const criteria of successCriterias) {
57
- const key = JSON.stringify(criteria);
58
- if (seen.has(key)) {
59
- report({
60
- message: 'The Step SuccessCriteria items must be unique.',
61
- location: location.child(['successCriteria', successCriterias.indexOf(criteria)]),
62
- });
63
- } else {
64
- seen.add(key);
65
- }
66
- }
67
- },
68
- },
69
- };
70
- };
@@ -1,38 +0,0 @@
1
- import { Struct } from '../common/struct';
2
- import { Assertions } from '../common/assertions';
3
- import { SourceDescriptionType } from '../arazzo/sourceDescription-type';
4
- import { SourceDescriptionsNotEmpty } from './sourceDescriptions-not-empty';
5
- import { RespectSupportedVersions } from '../respect/respect-supported-versions';
6
- import { WorkflowIdUnique } from './workflowId-unique';
7
- import { StepIdUnique } from './stepId-unique';
8
- import { SourceDescriptionsNameUnique } from './sourceDescriptions-name-unique';
9
- import { WorkflowDependsOn } from './workflow-dependsOn';
10
- import { ParametersUnique } from './parameters-unique';
11
- import { StepOnSuccessUnique } from './step-onSuccess-unique';
12
- import { StepOnFailureUnique } from './step-onFailure-unique';
13
- import { RequestBodyReplacementsUnique } from './requestBody-replacements-unique';
14
- import { NoCriteriaXpath } from '../respect/no-criteria-xpath';
15
- import { CriteriaUnique } from './criteria-unique';
16
-
17
- import type { Arazzo1Rule } from '../../visitors';
18
- import type { Arazzo1RuleSet } from '../../oas-types';
19
-
20
- export const rules: Arazzo1RuleSet<'built-in'> = {
21
- struct: Struct as Arazzo1Rule,
22
- assertions: Assertions as Arazzo1Rule,
23
- 'sourceDescription-type': SourceDescriptionType,
24
- 'respect-supported-versions': RespectSupportedVersions,
25
- 'workflowId-unique': WorkflowIdUnique,
26
- 'stepId-unique': StepIdUnique,
27
- 'sourceDescription-name-unique': SourceDescriptionsNameUnique,
28
- 'sourceDescriptions-not-empty': SourceDescriptionsNotEmpty,
29
- 'workflow-dependsOn': WorkflowDependsOn,
30
- 'parameters-unique': ParametersUnique,
31
- 'step-onSuccess-unique': StepOnSuccessUnique,
32
- 'step-onFailure-unique': StepOnFailureUnique,
33
- 'requestBody-replacements-unique': RequestBodyReplacementsUnique,
34
- 'no-criteria-xpath': NoCriteriaXpath,
35
- 'criteria-unique': CriteriaUnique,
36
- };
37
-
38
- export const preprocessors = {};
@@ -1,33 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const ParametersUnique: Arazzo1Rule = () => {
5
- return {
6
- Parameters: {
7
- enter(parameters, { report, location }: UserContext) {
8
- if (!parameters) return;
9
- const seenParameters = new Set();
10
-
11
- for (const parameter of parameters) {
12
- if (seenParameters.has(parameter?.name)) {
13
- report({
14
- message: 'The parameter `name` must be unique amongst listed parameters.',
15
- location: location.child([parameters.indexOf(parameter)]),
16
- });
17
- }
18
-
19
- if (seenParameters.has(parameter?.reference)) {
20
- report({
21
- message: 'The parameter `reference` must be unique amongst listed parameters.',
22
- location: location.child([parameters.indexOf(parameter)]),
23
- });
24
- }
25
-
26
- parameter?.name
27
- ? seenParameters.add(parameter.name)
28
- : seenParameters.add(parameter.reference);
29
- }
30
- },
31
- },
32
- };
33
- };
@@ -1,33 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const RequestBodyReplacementsUnique: Arazzo1Rule = () => {
5
- const seenReplacements = new Set();
6
-
7
- return {
8
- Step: {
9
- leave() {
10
- seenReplacements.clear();
11
- },
12
- RequestBody: {
13
- enter(requestBody, { report, location }: UserContext) {
14
- if (!requestBody.replacements) return;
15
-
16
- for (const replacement of requestBody.replacements) {
17
- if (seenReplacements.has(replacement.target)) {
18
- report({
19
- message: 'Every `replacement` in `requestBody` must be unique.',
20
- location: location.child([
21
- 'replacements',
22
- requestBody.replacements.indexOf(replacement),
23
- `target`,
24
- ]),
25
- });
26
- }
27
- seenReplacements.add(replacement.target);
28
- }
29
- },
30
- },
31
- },
32
- };
33
- };
@@ -1,21 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const SourceDescriptionType: Arazzo1Rule = () => {
5
- return {
6
- SourceDescriptions: {
7
- enter(sourceDescriptions, { report, location }: UserContext) {
8
- if (!sourceDescriptions.length) return;
9
- for (const sourceDescription of sourceDescriptions) {
10
- if (!['openapi', 'arazzo'].includes(sourceDescription?.type)) {
11
- report({
12
- message:
13
- 'The `type` property of the `sourceDescription` object must be either `openapi` or `arazzo`.',
14
- location: location.child([sourceDescriptions.indexOf(sourceDescription)]),
15
- });
16
- }
17
- }
18
- },
19
- },
20
- };
21
- };
@@ -1,23 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const SourceDescriptionsNameUnique: Arazzo1Rule = () => {
5
- const seenSourceDescriptions = new Set();
6
-
7
- return {
8
- SourceDescriptions: {
9
- enter(sourceDescriptions, { report, location }: UserContext) {
10
- if (!sourceDescriptions.length) return;
11
- for (const sourceDescription of sourceDescriptions) {
12
- if (seenSourceDescriptions.has(sourceDescription.name)) {
13
- report({
14
- message: 'The `name` must be unique amongst all SourceDescriptions.',
15
- location: location.child([sourceDescriptions.indexOf(sourceDescription)]),
16
- });
17
- }
18
- seenSourceDescriptions.add(sourceDescription.name);
19
- }
20
- },
21
- },
22
- };
23
- };
@@ -1,17 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const SourceDescriptionsNotEmpty: Arazzo1Rule = () => {
5
- return {
6
- SourceDescriptions: {
7
- enter(sourceDescriptions, { report, location }: UserContext) {
8
- if (!sourceDescriptions?.length) {
9
- report({
10
- message: 'The `sourceDescriptions` list must have at least one entry.',
11
- location,
12
- });
13
- }
14
- },
15
- },
16
- };
17
- };
@@ -1,33 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const StepOnFailureUnique: Arazzo1Rule = () => {
5
- return {
6
- OnFailureActionList: {
7
- enter(onFailureActionList, { report, location }: UserContext) {
8
- if (!onFailureActionList) return;
9
- const seenFailureActions = new Set();
10
-
11
- for (const onFailureAction of onFailureActionList) {
12
- if (seenFailureActions.has(onFailureAction?.name)) {
13
- report({
14
- message: 'The action `name` must be unique amongst listed `onFailure` actions.',
15
- location: location.child([onFailureActionList.indexOf(onFailureAction)]),
16
- });
17
- }
18
-
19
- if (seenFailureActions.has(onFailureAction?.reference)) {
20
- report({
21
- message: 'The action `reference` must be unique amongst listed `onFailure` actions.',
22
- location: location.child([onFailureActionList.indexOf(onFailureAction)]),
23
- });
24
- }
25
-
26
- onFailureAction?.name
27
- ? seenFailureActions.add(onFailureAction.name)
28
- : seenFailureActions.add(onFailureAction.reference);
29
- }
30
- },
31
- },
32
- };
33
- };
@@ -1,33 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const StepOnSuccessUnique: Arazzo1Rule = () => {
5
- return {
6
- OnSuccessActionList: {
7
- enter(onSuccessActionList, { report, location }: UserContext) {
8
- if (!onSuccessActionList) return;
9
- const seenSuccessActions = new Set();
10
-
11
- for (const onSuccessAction of onSuccessActionList) {
12
- if (seenSuccessActions.has(onSuccessAction?.name)) {
13
- report({
14
- message: 'The action `name` must be unique amongst listed `onSuccess` actions.',
15
- location: location.child([onSuccessActionList.indexOf(onSuccessAction)]),
16
- });
17
- }
18
-
19
- if (seenSuccessActions.has(onSuccessAction?.reference)) {
20
- report({
21
- message: 'The action `reference` must be unique amongst listed `onSuccess` actions.',
22
- location: location.child([onSuccessActionList.indexOf(onSuccessAction)]),
23
- });
24
- }
25
-
26
- onSuccessAction?.name
27
- ? seenSuccessActions.add(onSuccessAction.name)
28
- : seenSuccessActions.add(onSuccessAction.reference);
29
- }
30
- },
31
- },
32
- };
33
- };
@@ -1,24 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const StepIdUnique: Arazzo1Rule = () => {
5
- return {
6
- Workflow: {
7
- enter(workflow, { report, location }: UserContext) {
8
- if (!workflow.steps) return;
9
- const seenSteps = new Set();
10
-
11
- for (const step of workflow.steps) {
12
- if (!step.stepId) return;
13
- if (seenSteps.has(step.stepId)) {
14
- report({
15
- message: 'The `stepId` must be unique amongst all steps described in the workflow.',
16
- location: location.child(['steps', workflow.steps.indexOf(step)]),
17
- });
18
- }
19
- seenSteps.add(step.stepId);
20
- }
21
- },
22
- },
23
- };
24
- };
@@ -1,56 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const WorkflowDependsOn: Arazzo1Rule = () => {
5
- const seenWorkflow = new Set();
6
- const existingSourceDescriptions = new Set();
7
- const existingWorkflowIds = new Set();
8
-
9
- return {
10
- SourceDescriptions: {
11
- enter(sourceDescriptions) {
12
- for (const sourceDescription of sourceDescriptions) {
13
- existingSourceDescriptions.add(sourceDescription.name);
14
- }
15
- },
16
- },
17
- Workflows: {
18
- enter(workflows) {
19
- for (const workflow of workflows) {
20
- existingWorkflowIds.add(workflow.workflowId);
21
- }
22
- },
23
- },
24
- Workflow: {
25
- leave(workflow, { report, location }: UserContext) {
26
- if (!workflow.dependsOn) return;
27
-
28
- for (const item of workflow.dependsOn) {
29
- // Possible dependsOn workflow pattern: $sourceDescriptions.<name>.<workflowId>
30
- if (item.startsWith('$sourceDescriptions.')) {
31
- const sourceDescriptionName = item.split('.')[1];
32
- if (!existingSourceDescriptions.has(sourceDescriptionName)) {
33
- report({
34
- message: `SourceDescription ${sourceDescriptionName} must be defined in sourceDescriptions.`,
35
- location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]),
36
- });
37
- }
38
- }
39
- if (!item.startsWith('$sourceDescriptions') && !existingWorkflowIds.has(item)) {
40
- report({
41
- message: `Workflow ${item} must be defined in workflows.`,
42
- location: location.child([`dependsOn`, workflow.dependsOn.indexOf(item)]),
43
- });
44
- }
45
- if (seenWorkflow.has(item)) {
46
- report({
47
- message: 'Every workflow in dependsOn must be unique.',
48
- location: location.child([`dependsOn`]),
49
- });
50
- }
51
- seenWorkflow.add(item);
52
- }
53
- },
54
- },
55
- };
56
- };
@@ -1,21 +0,0 @@
1
- import type { Arazzo1Rule } from '../../visitors';
2
- import type { UserContext } from '../../walk';
3
-
4
- export const WorkflowIdUnique: Arazzo1Rule = () => {
5
- const seenWorkflow = new Set();
6
-
7
- return {
8
- Workflow: {
9
- enter(workflow, { report, location }: UserContext) {
10
- if (!workflow.workflowId) return;
11
- if (seenWorkflow.has(workflow.workflowId)) {
12
- report({
13
- message: 'Every workflow must have a unique `workflowId`.',
14
- location: location.child([workflow.workflowId]),
15
- });
16
- }
17
- seenWorkflow.add(workflow.workflowId);
18
- },
19
- },
20
- };
21
- };
@@ -1,145 +0,0 @@
1
- import { outdent } from 'outdent';
2
- import { lintDocument } from '../../../lint';
3
- import { parseYamlToDocument, replaceSourceWithRef, makeConfig } from '../../../../__tests__/utils';
4
- import { BaseResolver } from '../../../resolve';
5
-
6
- describe('Async2 channels-kebab-case', () => {
7
- it('should report on no kebab-case channel path', async () => {
8
- const document = parseYamlToDocument(
9
- outdent`
10
- asyncapi: '2.6.0'
11
- info:
12
- title: Cool API
13
- version: 1.0.0
14
- channels:
15
- NOT_A_KEBAB:
16
- subscribe:
17
- message:
18
- messageId: Message1
19
- `,
20
- 'asyncapi.yaml'
21
- );
22
-
23
- const results = await lintDocument({
24
- externalRefResolver: new BaseResolver(),
25
- document,
26
- config: await makeConfig({ rules: { 'channels-kebab-case': 'error' } }),
27
- });
28
-
29
- expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`
30
- [
31
- {
32
- "location": [
33
- {
34
- "pointer": "#/channels/NOT_A_KEBAB",
35
- "reportOnKey": true,
36
- "source": "asyncapi.yaml",
37
- },
38
- ],
39
- "message": "\`NOT_A_KEBAB\` does not use kebab-case.",
40
- "ruleId": "channels-kebab-case",
41
- "severity": "error",
42
- "suggest": [],
43
- },
44
- ]
45
- `);
46
- });
47
-
48
- it('should report on snake_case in channel path', async () => {
49
- const document = parseYamlToDocument(
50
- outdent`
51
- asyncapi: '2.6.0'
52
- info:
53
- title: Cool API
54
- version: 1.0.0
55
- channels:
56
- snake_kebab:
57
- subscribe:
58
- message:
59
- messageId: Message1
60
- `,
61
- 'asyncapi.yaml'
62
- );
63
-
64
- const results = await lintDocument({
65
- externalRefResolver: new BaseResolver(),
66
- document,
67
- config: await makeConfig({ rules: { 'channels-kebab-case': 'error' } }),
68
- });
69
-
70
- expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`
71
- [
72
- {
73
- "location": [
74
- {
75
- "pointer": "#/channels/snake_kebab",
76
- "reportOnKey": true,
77
- "source": "asyncapi.yaml",
78
- },
79
- ],
80
- "message": "\`snake_kebab\` does not use kebab-case.",
81
- "ruleId": "channels-kebab-case",
82
- "severity": "error",
83
- "suggest": [],
84
- },
85
- ]
86
- `);
87
- });
88
-
89
- it('should allow trailing slash in channel path with "channels-kebab-case" rule', async () => {
90
- const document = parseYamlToDocument(
91
- outdent`
92
- asyncapi: '2.6.0'
93
- info:
94
- title: Cool API
95
- version: 1.0.0
96
- channels:
97
- kebab/:
98
- subscribe:
99
- message:
100
- messageId: Message1
101
- `,
102
- 'asyncapi.yaml'
103
- );
104
-
105
- const results = await lintDocument({
106
- externalRefResolver: new BaseResolver(),
107
- document,
108
- config: await makeConfig({
109
- rules: {
110
- 'paths-kebab-case': 'error',
111
- 'no-path-trailing-slash': 'off',
112
- },
113
- }),
114
- });
115
- expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`[]`);
116
- });
117
-
118
- it('words with hyphens are allowed with "channels-kebab-case" rule', async () => {
119
- const document = parseYamlToDocument(
120
- outdent`
121
- asyncapi: '2.6.0'
122
- info:
123
- title: Cool API
124
- version: 1.0.0
125
- channels:
126
- kebab-with-longer-channel-path:
127
- subscribe:
128
- message:
129
- messageId: Message1
130
- `,
131
- 'asyncapi.yaml'
132
- );
133
-
134
- const results = await lintDocument({
135
- externalRefResolver: new BaseResolver(),
136
- document,
137
- config: await makeConfig({
138
- rules: {
139
- 'paths-kebab-case': 'error',
140
- },
141
- }),
142
- });
143
- expect(replaceSourceWithRef(results)).toMatchInlineSnapshot(`[]`);
144
- });
145
- });