@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,13 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NormalizedConfigTypes = exports.ConfigTypes = void 0;
4
- exports.createConfigTypes = createConfigTypes;
5
- const config_1 = require("@redocly/config");
6
- const _1 = require(".");
7
- const oas_types_1 = require("../oas-types");
8
- const utils_1 = require("../utils");
9
- const json_schema_adapter_1 = require("./json-schema-adapter");
10
- const types_1 = require("../types");
1
+ import path from 'node:path';
2
+ import { rootRedoclyConfigSchema } from '@redocly/config';
3
+ import { listOf } from './index.js';
4
+ import { SpecVersion, getTypes } from '../oas-types.js';
5
+ import { isCustomRuleId } from '../utils.js';
6
+ import { getNodeTypesFromJSONSchema } from './json-schema-adapter.js';
7
+ import { normalizeTypes } from '../types/index.js';
8
+ import { isAbsoluteUrl } from '../ref-utils.js';
11
9
  const builtInOAS2Rules = [
12
10
  'info-contact',
13
11
  'operation-operationId',
@@ -53,6 +51,7 @@ const builtInOAS2Rules = [
53
51
  'request-mime-type',
54
52
  'response-contains-property',
55
53
  'response-mime-type',
54
+ 'no-duplicated-tag-names',
56
55
  ];
57
56
  const builtInOAS3Rules = [
58
57
  'info-contact',
@@ -111,6 +110,8 @@ const builtInOAS3Rules = [
111
110
  'response-mime-type',
112
111
  'spec-components-invalid-map-name',
113
112
  'array-parameter-serialization',
113
+ 'no-duplicated-tag-names',
114
+ 'nullable-type-sibling',
114
115
  ];
115
116
  const builtInAsync2Rules = [
116
117
  'info-contact',
@@ -120,6 +121,7 @@ const builtInAsync2Rules = [
120
121
  'tags-alphabetical',
121
122
  'channels-kebab-case',
122
123
  'no-channel-trailing-slash',
124
+ 'no-duplicated-tag-names',
123
125
  ];
124
126
  const builtInAsync3Rules = [
125
127
  'info-contact',
@@ -129,6 +131,7 @@ const builtInAsync3Rules = [
129
131
  'tags-alphabetical',
130
132
  'channels-kebab-case',
131
133
  'no-channel-trailing-slash',
134
+ 'no-duplicated-tag-names',
132
135
  ];
133
136
  const builtInArazzo1Rules = [
134
137
  'sourceDescription-type',
@@ -144,6 +147,9 @@ const builtInArazzo1Rules = [
144
147
  'requestBody-replacements-unique',
145
148
  'no-criteria-xpath',
146
149
  'criteria-unique',
150
+ 'no-x-security-scheme-name-without-openapi',
151
+ 'x-security-scheme-required-values',
152
+ 'no-x-security-scheme-name-in-workflow',
147
153
  ];
148
154
  const builtInOverlay1Rules = ['info-contact'];
149
155
  const builtInRules = [
@@ -153,163 +159,57 @@ const builtInRules = [
153
159
  ...builtInAsync3Rules,
154
160
  ...builtInArazzo1Rules,
155
161
  ...builtInOverlay1Rules,
156
- 'spec', // TODO: depricated in favor of struct
157
162
  'struct',
158
163
  ];
159
- const oas2NodeTypesList = [
160
- 'Root',
161
- 'Tag',
162
- 'TagList',
163
- 'ExternalDocs',
164
- 'SecurityRequirement',
165
- 'SecurityRequirementList',
166
- 'Info',
167
- 'Contact',
168
- 'License',
169
- 'Paths',
170
- 'PathItem',
171
- 'Parameter',
172
- 'ParameterList',
173
- 'ParameterItems',
174
- 'Operation',
175
- 'Example',
176
- 'ExamplesMap',
177
- 'Examples',
178
- 'Header',
179
- 'Responses',
180
- 'Response',
181
- 'Schema',
182
- 'Xml',
183
- 'SchemaProperties',
184
- 'NamedSchemas',
185
- 'NamedResponses',
186
- 'NamedParameters',
187
- 'NamedSecuritySchemes',
188
- 'SecurityScheme',
189
- 'TagGroup',
190
- 'TagGroups',
191
- 'EnumDescriptions',
192
- 'Logo',
193
- 'XCodeSample',
194
- 'XCodeSampleList',
195
- 'XServer',
196
- 'XServerList',
197
- ];
198
- const oas3NodeTypesList = [
199
- 'Root',
200
- 'Tag',
201
- 'TagList',
202
- 'ExternalDocs',
203
- 'Server',
204
- 'ServerList',
205
- 'ServerVariable',
206
- 'ServerVariablesMap',
207
- 'SecurityRequirement',
208
- 'SecurityRequirementList',
209
- 'Info',
210
- 'Contact',
211
- 'License',
212
- 'Paths',
213
- 'PathItem',
214
- 'Parameter',
215
- 'ParameterList',
216
- 'Operation',
217
- 'Callback',
218
- 'CallbacksMap',
219
- 'RequestBody',
220
- 'MediaTypesMap',
221
- 'MediaType',
222
- 'Example',
223
- 'ExamplesMap',
224
- 'Encoding',
225
- 'EncodingMap',
226
- 'Header',
227
- 'HeadersMap',
228
- 'Responses',
229
- 'Response',
230
- 'Link',
231
- 'LinksMap',
232
- 'Schema',
233
- 'Xml',
234
- 'SchemaProperties',
235
- 'DiscriminatorMapping',
236
- 'Discriminator',
237
- 'Components',
238
- 'NamedSchemas',
239
- 'NamedResponses',
240
- 'NamedParameters',
241
- 'NamedExamples',
242
- 'NamedRequestBodies',
243
- 'NamedHeaders',
244
- 'NamedSecuritySchemes',
245
- 'NamedLinks',
246
- 'NamedCallbacks',
247
- 'ImplicitFlow',
248
- 'PasswordFlow',
249
- 'ClientCredentials',
250
- 'AuthorizationCode',
251
- 'OAuth2Flows',
252
- 'SecurityScheme',
253
- 'TagGroup',
254
- 'TagGroups',
255
- 'EnumDescriptions',
256
- 'Logo',
257
- 'XCodeSample',
258
- 'XCodeSampleList',
259
- 'XUsePkce',
260
- 'WebhooksMap',
261
- ];
262
- const oas3_1NodeTypesList = [
263
- 'Root',
264
- 'Schema',
265
- 'SchemaProperties',
266
- 'PatternProperties',
267
- 'Info',
268
- 'License',
269
- 'Components',
270
- 'NamedPathItems',
271
- 'SecurityScheme',
272
- 'Operation',
273
- 'DependentRequired',
274
- ];
275
- const ConfigStyleguide = {
276
- properties: {
277
- extends: {
278
- type: 'array',
279
- items: {
280
- type: 'string',
281
- },
164
+ const configGovernanceProperties = {
165
+ extends: {
166
+ name: 'ConfigGovernanceList',
167
+ properties: {},
168
+ items: (node) => {
169
+ // check if it's preset name
170
+ if (typeof node === 'string' && !isAbsoluteUrl(node) && !path.extname(node)) {
171
+ return { type: 'string' };
172
+ }
173
+ return {
174
+ ...ConfigGovernance,
175
+ directResolveAs: { name: 'ConfigGovernance', ...ConfigGovernance },
176
+ };
282
177
  },
283
- rules: 'Rules',
284
- oas2Rules: 'Rules',
285
- oas3_0Rules: 'Rules',
286
- oas3_1Rules: 'Rules',
287
- async2Rules: 'Rules',
288
- arazzo1Rules: 'Rules',
289
- preprocessors: { type: 'object' },
290
- oas2Preprocessors: { type: 'object' },
291
- oas3_0Preprocessors: { type: 'object' },
292
- oas3_1Preprocessors: { type: 'object' },
293
- async2Preprocessors: { type: 'object' },
294
- arazzoPreprocessors: { type: 'object' },
295
- decorators: { type: 'object' },
296
- oas2Decorators: { type: 'object' },
297
- oas3_0Decorators: { type: 'object' },
298
- oas3_1Decorators: { type: 'object' },
299
- async2Decorators: { type: 'object' },
300
- arazzo1Decorators: { type: 'object' },
301
178
  },
179
+ rules: 'Rules',
180
+ oas2Rules: 'Rules',
181
+ oas3_0Rules: 'Rules',
182
+ oas3_1Rules: 'Rules',
183
+ async2Rules: 'Rules',
184
+ async3Rules: 'Rules',
185
+ arazzo1Rules: 'Rules',
186
+ overlay1Rules: 'Rules',
187
+ preprocessors: { type: 'object' },
188
+ oas2Preprocessors: { type: 'object' },
189
+ oas3_0Preprocessors: { type: 'object' },
190
+ oas3_1Preprocessors: { type: 'object' },
191
+ async2Preprocessors: { type: 'object' },
192
+ async3Preprocessors: { type: 'object' },
193
+ arazzo1Preprocessors: { type: 'object' },
194
+ overlay1Preprocessors: { type: 'object' },
195
+ decorators: { type: 'object' },
196
+ oas2Decorators: { type: 'object' },
197
+ oas3_0Decorators: { type: 'object' },
198
+ oas3_1Decorators: { type: 'object' },
199
+ async2Decorators: { type: 'object' },
200
+ async3Decorators: { type: 'object' },
201
+ arazzo1Decorators: { type: 'object' },
202
+ overlay1Decorators: { type: 'object' },
203
+ };
204
+ const ConfigGovernance = {
205
+ properties: configGovernanceProperties,
302
206
  };
303
207
  const createConfigRoot = (nodeTypes) => ({
304
208
  ...nodeTypes.rootRedoclyConfigSchema,
305
209
  properties: {
306
210
  ...nodeTypes.rootRedoclyConfigSchema.properties,
307
- ...ConfigStyleguide.properties,
211
+ ...ConfigGovernance.properties,
308
212
  apis: 'ConfigApis', // Override apis with internal format
309
- 'features.openapi': 'ConfigReferenceDocs', // deprecated
310
- 'features.mockServer': 'ConfigMockServer', // deprecated
311
- organization: { type: 'string' },
312
- region: { enum: ['us', 'eu'] },
313
213
  telemetry: { enum: ['on', 'off'] },
314
214
  resolve: {
315
215
  properties: {
@@ -317,12 +217,6 @@ const createConfigRoot = (nodeTypes) => ({
317
217
  doNotResolveExamples: { type: 'boolean' },
318
218
  },
319
219
  },
320
- files: {
321
- type: 'array',
322
- items: {
323
- type: 'string',
324
- },
325
- },
326
220
  },
327
221
  });
328
222
  const ConfigApis = {
@@ -333,21 +227,7 @@ const createConfigApisProperties = (nodeTypes) => ({
333
227
  ...nodeTypes['rootRedoclyConfigSchema.apis_additionalProperties'],
334
228
  properties: {
335
229
  ...nodeTypes['rootRedoclyConfigSchema.apis_additionalProperties']?.properties,
336
- labels: {
337
- type: 'array',
338
- items: {
339
- type: 'string',
340
- },
341
- },
342
- ...ConfigStyleguide.properties,
343
- 'features.openapi': 'ConfigReferenceDocs', // deprecated
344
- 'features.mockServer': 'ConfigMockServer', // deprecated
345
- files: {
346
- type: 'array',
347
- items: {
348
- type: 'string',
349
- },
350
- },
230
+ ...ConfigGovernance.properties,
351
231
  },
352
232
  });
353
233
  const ConfigHTTP = {
@@ -371,16 +251,7 @@ const Rules = {
371
251
  return 'Assert';
372
252
  }
373
253
  }
374
- else if (key.startsWith('assert/')) {
375
- // keep the old assert/ prefix as an alias
376
- if (typeof value === 'string') {
377
- return { enum: ['error', 'warn', 'off'] };
378
- }
379
- else {
380
- return 'Assert';
381
- }
382
- }
383
- else if (builtInRules.includes(key) || (0, utils_1.isCustomRuleId)(key)) {
254
+ else if (builtInRules.includes(key) || isCustomRuleId(key)) {
384
255
  if (typeof value === 'string') {
385
256
  return { enum: ['error', 'warn', 'off'] };
386
257
  }
@@ -431,6 +302,15 @@ function createAssertionDefinitionSubject(nodeNames) {
431
302
  required: ['type'],
432
303
  };
433
304
  }
305
+ function createScorecardLevelsItems(nodeTypes) {
306
+ return {
307
+ ...nodeTypes['rootRedoclyConfigSchema.scorecard.levels_items'],
308
+ properties: {
309
+ ...nodeTypes['rootRedoclyConfigSchema.scorecard.levels_items']?.properties,
310
+ ...configGovernanceProperties,
311
+ },
312
+ };
313
+ }
434
314
  const AssertionDefinitionAssertions = {
435
315
  properties: {
436
316
  enum: { type: 'array', items: { type: 'string' } },
@@ -453,7 +333,6 @@ const AssertionDefinitionAssertions = {
453
333
  requireAny: { type: 'array', items: { type: 'string' } },
454
334
  disallowed: { type: 'array', items: { type: 'string' } },
455
335
  defined: { type: 'boolean' },
456
- // undefined: { type: 'boolean' }, // TODO: Remove `undefined` assertion from codebase overall
457
336
  nonEmpty: { type: 'boolean' },
458
337
  minLength: { type: 'integer' },
459
338
  maxLength: { type: 'integer' },
@@ -475,7 +354,7 @@ const AssertionDefinitionAssertions = {
475
354
  },
476
355
  additionalProperties: (_value, key) => {
477
356
  if (/^\w+\/\w+$/.test(key))
478
- return { type: 'object' };
357
+ return {};
479
358
  return;
480
359
  },
481
360
  };
@@ -490,653 +369,40 @@ const Assert = {
490
369
  properties: {
491
370
  subject: 'AssertionDefinitionSubject',
492
371
  assertions: 'AssertionDefinitionAssertions',
493
- where: (0, _1.listOf)('AssertDefinition'),
372
+ where: listOf('AssertDefinition'),
494
373
  message: { type: 'string' },
495
374
  suggest: { type: 'array', items: { type: 'string' } },
496
375
  severity: { enum: ['error', 'warn', 'off'] },
497
376
  },
498
377
  required: ['subject', 'assertions'],
499
378
  };
500
- const ConfigLanguage = {
501
- properties: {
502
- label: { type: 'string' },
503
- lang: {
504
- enum: [
505
- 'curl',
506
- 'C#',
507
- 'Go',
508
- 'Java',
509
- 'Java8+Apache',
510
- 'JavaScript',
511
- 'Node.js',
512
- 'PHP',
513
- 'Python',
514
- 'R',
515
- 'Ruby',
516
- ],
517
- },
518
- },
519
- required: ['lang'],
520
- };
521
- const ConfigLabels = {
522
- properties: {
523
- enum: { type: 'string' },
524
- enumSingleValue: { type: 'string' },
525
- enumArray: { type: 'string' },
526
- default: { type: 'string' },
527
- deprecated: { type: 'string' },
528
- example: { type: 'string' },
529
- examples: { type: 'string' },
530
- nullable: { type: 'string' },
531
- recursive: { type: 'string' },
532
- arrayOf: { type: 'string' },
533
- webhook: { type: 'string' },
534
- authorizations: { type: 'string' },
535
- tryItAuthBasicUsername: { type: 'string' },
536
- tryItAuthBasicPassword: { type: 'string' },
537
- },
538
- };
539
- const ConfigSidebarLinks = {
540
- properties: {
541
- beforeInfo: (0, _1.listOf)('CommonConfigSidebarLinks'),
542
- end: (0, _1.listOf)('CommonConfigSidebarLinks'),
543
- },
544
- };
545
- const CommonConfigSidebarLinks = {
546
- properties: {
547
- label: { type: 'string' },
548
- link: { type: 'string' },
549
- target: { type: 'string' },
550
- },
551
- required: ['label', 'link'],
552
- };
553
- const CommonThemeColors = {
554
- properties: {
555
- main: { type: 'string' },
556
- light: { type: 'string' },
557
- dark: { type: 'string' },
558
- contrastText: { type: 'string' },
559
- },
560
- };
561
- const CommonColorProps = {
562
- properties: {
563
- backgroundColor: { type: 'string' },
564
- borderColor: { type: 'string' },
565
- color: { type: 'string' },
566
- tabTextColor: { type: 'string' },
567
- },
568
- };
569
- const BorderThemeColors = {
570
- properties: (0, utils_1.pickObjectProps)(CommonThemeColors.properties, ['light', 'dark']),
571
- };
572
- const HttpColors = {
573
- properties: {
574
- basic: { type: 'string' },
575
- delete: { type: 'string' },
576
- get: { type: 'string' },
577
- head: { type: 'string' },
578
- link: { type: 'string' },
579
- options: { type: 'string' },
580
- patch: { type: 'string' },
581
- post: { type: 'string' },
582
- put: { type: 'string' },
583
- },
584
- };
585
- const ResponseColors = {
586
- properties: {
587
- error: 'CommonColorProps',
588
- info: 'CommonColorProps',
589
- redirect: 'CommonColorProps',
590
- success: 'CommonColorProps',
591
- },
592
- };
593
- const SecondaryColors = {
594
- properties: (0, utils_1.omitObjectProps)(CommonThemeColors.properties, ['dark']),
595
- };
596
- const TextThemeColors = {
597
- properties: {
598
- primary: { type: 'string' },
599
- secondary: { type: 'string' },
600
- light: { type: 'string' },
601
- },
602
- };
603
- const ThemeColors = {
604
- properties: {
605
- accent: 'CommonThemeColors',
606
- border: 'BorderThemeColors',
607
- error: 'CommonThemeColors',
608
- http: 'HttpColors',
609
- primary: 'CommonThemeColors',
610
- responses: 'ResponseColors',
611
- secondary: 'SecondaryColors',
612
- success: 'CommonThemeColors',
613
- text: 'TextThemeColors',
614
- tonalOffset: { type: 'number' },
615
- warning: 'CommonThemeColors',
616
- },
617
- };
618
- const SizeProps = {
619
- properties: {
620
- fontSize: { type: 'string' },
621
- padding: { type: 'string' },
622
- minWidth: { type: 'string' },
623
- },
624
- };
625
- const Sizes = {
626
- properties: {
627
- small: 'SizeProps',
628
- medium: 'SizeProps',
629
- large: 'SizeProps',
630
- xlarge: 'SizeProps',
631
- },
632
- };
633
- const FontConfig = {
634
- properties: {
635
- fontFamily: { type: 'string' },
636
- fontSize: { type: 'string' },
637
- fontWeight: { type: 'string' },
638
- lineHeight: { type: 'string' },
639
- },
640
- };
641
- const ButtonsConfig = {
642
- properties: {
643
- ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']),
644
- borderRadius: { type: 'string' },
645
- hoverStyle: { type: 'string' },
646
- boxShadow: { type: 'string' },
647
- hoverBoxShadow: { type: 'string' },
648
- sizes: 'Sizes',
649
- },
650
- };
651
- const BadgeFontConfig = {
652
- properties: (0, utils_1.pickObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']),
653
- };
654
- const BadgeSizes = {
655
- properties: {
656
- medium: 'BadgeFontConfig',
657
- small: 'BadgeFontConfig',
658
- },
659
- };
660
- const HttpBadgesConfig = {
661
- properties: {
662
- ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize', 'lineHeight']),
663
- borderRadius: { type: 'string' },
664
- color: { type: 'string' },
665
- sizes: 'BadgeSizes',
666
- },
667
- };
668
- const LabelControls = {
669
- properties: {
670
- top: { type: 'string' },
671
- width: { type: 'string' },
672
- height: { type: 'string' },
673
- },
674
- };
675
- const Panels = {
676
- properties: {
677
- borderRadius: { type: 'string' },
678
- backgroundColor: { type: 'string' },
679
- },
680
- };
681
- const TryItButton = {
682
- properties: {
683
- fullWidth: { type: 'boolean' },
684
- },
685
- };
686
- const ConfigThemeComponents = {
687
- properties: {
688
- buttons: 'ButtonsConfig',
689
- httpBadges: 'HttpBadgesConfig',
690
- layoutControls: 'LabelControls',
691
- panels: 'Panels',
692
- tryItButton: 'TryItButton',
693
- tryItSendButton: 'TryItButton',
694
- },
695
- };
696
- const Breakpoints = {
697
- properties: {
698
- small: { type: 'string' },
699
- medium: { type: 'string' },
700
- large: { type: 'string' },
701
- },
702
- };
703
- const StackedConfig = {
704
- properties: {
705
- maxWidth: 'Breakpoints',
706
- },
707
- };
708
- const ThreePanelConfig = {
709
- properties: {
710
- maxWidth: 'Breakpoints',
711
- middlePanelMaxWidth: 'Breakpoints',
712
- },
713
- };
714
- const Layout = {
715
- properties: {
716
- showDarkRightPanel: { type: 'boolean' },
717
- stacked: 'StackedConfig',
718
- 'three-panel': 'ThreePanelConfig',
719
- },
720
- };
721
- const SchemaColorsConfig = {
722
- properties: {
723
- backgroundColor: { type: 'string' },
724
- border: { type: 'string' },
725
- },
726
- };
727
- const ConfigThemeSchema = {
728
- properties: {
729
- breakFieldNames: { type: 'boolean' },
730
- caretColor: { type: 'string' },
731
- caretSize: { type: 'string' },
732
- constraints: 'SchemaColorsConfig',
733
- defaultDetailsWidth: { type: 'string' },
734
- examples: 'SchemaColorsConfig',
735
- labelsTextSize: { type: 'string' },
736
- linesColor: { type: 'string' },
737
- nestedBackground: { type: 'string' },
738
- nestingSpacing: { type: 'string' },
739
- requireLabelColor: { type: 'string' },
740
- typeNameColor: { type: 'string' },
741
- typeTitleColor: { type: 'string' },
742
- },
743
- };
744
- const GroupItemsConfig = {
745
- properties: {
746
- subItemsColor: { type: 'string' },
747
- textTransform: { type: 'string' },
748
- fontWeight: { type: 'string' },
749
- },
750
- };
751
- const Level1Items = {
752
- properties: (0, utils_1.pickObjectProps)(GroupItemsConfig.properties, ['textTransform']),
753
- };
754
- const SpacingConfig = {
755
- properties: {
756
- unit: { type: 'number' },
757
- paddingHorizontal: { type: 'string' },
758
- paddingVertical: { type: 'string' },
759
- offsetTop: { type: 'string' },
760
- offsetLeft: { type: 'string' },
761
- offsetNesting: { type: 'string' },
762
- },
763
- };
764
- const Sidebar = {
765
- properties: {
766
- ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontWeight', 'lineHeight']),
767
- activeBgColor: { type: 'string' },
768
- activeTextColor: { type: 'string' },
769
- backgroundColor: { type: 'string' },
770
- borderRadius: { type: 'string' },
771
- breakPath: { type: 'boolean' },
772
- caretColor: { type: 'string' },
773
- caretSize: { type: 'string' },
774
- groupItems: 'GroupItemsConfig',
775
- level1items: 'Level1Items',
776
- rightLineColor: { type: 'string' },
777
- separatorLabelColor: { type: 'string' },
778
- showAtBreakpoint: { type: 'string' },
779
- spacing: 'SpacingConfig',
780
- textColor: { type: 'string' },
781
- width: { type: 'string' },
782
- },
783
- };
784
- const Heading = {
785
- properties: {
786
- ...FontConfig.properties,
787
- color: { type: 'string' },
788
- transform: { type: 'string' },
789
- },
790
- };
791
- const CodeConfig = {
792
- properties: {
793
- ...FontConfig.properties,
794
- backgroundColor: { type: 'string' },
795
- color: { type: 'string' },
796
- wordBreak: {
797
- enum: [
798
- 'break-all',
799
- 'break-word',
800
- 'keep-all',
801
- 'normal',
802
- 'revert',
803
- 'unset',
804
- 'inherit',
805
- 'initial',
806
- ],
807
- },
808
- wrap: { type: 'boolean' },
809
- },
810
- };
811
- const HeadingsConfig = {
812
- properties: (0, utils_1.omitObjectProps)(FontConfig.properties, ['fontSize']),
813
- };
814
- const LinksConfig = {
815
- properties: {
816
- color: { type: 'string' },
817
- hover: { type: 'string' },
818
- textDecoration: { type: 'string' },
819
- hoverTextDecoration: { type: 'string' },
820
- visited: { type: 'string' },
821
- },
822
- };
823
- const Typography = {
824
- properties: {
825
- code: 'CodeConfig',
826
- fieldName: 'FontConfig',
827
- ...(0, utils_1.pickObjectProps)(FontConfig.properties, ['fontSize', 'fontFamily']),
828
- fontWeightBold: { type: 'string' },
829
- fontWeightLight: { type: 'string' },
830
- fontWeightRegular: { type: 'string' },
831
- heading1: 'Heading',
832
- heading2: 'Heading',
833
- heading3: 'Heading',
834
- headings: 'HeadingsConfig',
835
- lineHeight: { type: 'string' },
836
- links: 'LinksConfig',
837
- optimizeSpeed: { type: 'boolean' },
838
- rightPanelHeading: 'Heading',
839
- smoothing: { enum: ['auto', 'none', 'antialiased', 'subpixel-antialiased', 'grayscale'] },
840
- },
841
- };
842
- const TokenProps = {
843
- properties: {
844
- color: { type: 'string' },
845
- ...(0, utils_1.omitObjectProps)(FontConfig.properties, ['fontWeight']),
846
- },
847
- };
848
- const CodeBlock = {
849
- properties: {
850
- backgroundColor: { type: 'string' },
851
- borderRadius: { type: 'string' },
852
- tokens: 'TokenProps',
853
- },
854
- };
855
- const ConfigThemeLogo = {
856
- properties: {
857
- gutter: { type: 'string' },
858
- maxHeight: { type: 'string' },
859
- maxWidth: { type: 'string' },
860
- },
861
- };
862
- const Fab = {
863
- properties: {
864
- backgroundColor: { type: 'string' },
865
- color: { type: 'string' },
866
- },
867
- };
868
- const ButtonOverrides = {
869
- properties: {
870
- custom: { type: 'string' },
871
- },
872
- };
873
- const Overrides = {
874
- properties: {
875
- DownloadButton: 'ButtonOverrides',
876
- NextSectionButton: 'ButtonOverrides',
877
- },
878
- };
879
- const RightPanel = {
880
- properties: {
881
- backgroundColor: { type: 'string' },
882
- panelBackgroundColor: { type: 'string' },
883
- panelControlsBackgroundColor: { type: 'string' },
884
- showAtBreakpoint: { type: 'string' },
885
- textColor: { type: 'string' },
886
- width: { type: 'string' },
887
- },
888
- };
889
- const Shape = {
890
- properties: { borderRadius: { type: 'string' } },
891
- };
892
- const ThemeSpacing = {
893
- properties: {
894
- sectionHorizontal: { type: 'number' },
895
- sectionVertical: { type: 'number' },
896
- unit: { type: 'number' },
897
- },
898
- };
899
- const ConfigTheme = {
900
- properties: {
901
- breakpoints: 'Breakpoints',
902
- codeBlock: 'CodeBlock',
903
- colors: 'ThemeColors',
904
- components: 'ConfigThemeComponents',
905
- layout: 'Layout',
906
- logo: 'ConfigThemeLogo',
907
- fab: 'Fab',
908
- overrides: 'Overrides',
909
- rightPanel: 'RightPanel',
910
- schema: 'ConfigThemeSchema',
911
- shape: 'Shape',
912
- sidebar: 'Sidebar',
913
- spacing: 'ThemeSpacing',
914
- typography: 'Typography',
915
- links: { properties: { color: { type: 'string' } } }, // deprecated
916
- codeSample: { properties: { backgroundColor: { type: 'string' } } }, // deprecated
917
- },
918
- };
919
- const GenerateCodeSamples = {
920
- properties: {
921
- skipOptionalParameters: { type: 'boolean' },
922
- languages: (0, _1.listOf)('ConfigLanguage'),
923
- },
924
- required: ['languages'],
925
- };
926
- // TODO: deprecated
927
- const ConfigReferenceDocs = {
928
- properties: {
929
- theme: 'ConfigTheme',
930
- corsProxyUrl: { type: 'string' },
931
- ctrlFHijack: { type: 'boolean' },
932
- defaultSampleLanguage: { type: 'string' },
933
- disableDeepLinks: { type: 'boolean' },
934
- disableSearch: { type: 'boolean' },
935
- disableSidebar: { type: 'boolean' },
936
- downloadDefinitionUrl: { type: 'string' },
937
- expandDefaultServerVariables: { type: 'boolean' },
938
- enumSkipQuotes: { type: 'boolean' },
939
- expandDefaultRequest: { type: 'boolean' },
940
- expandDefaultResponse: { type: 'boolean' },
941
- expandResponses: { type: 'string' },
942
- expandSingleSchemaField: { type: 'boolean' },
943
- generateCodeSamples: 'GenerateCodeSamples',
944
- generatedPayloadSamplesMaxDepth: { type: 'number' },
945
- hideDownloadButton: { type: 'boolean' },
946
- hideHostname: { type: 'boolean' },
947
- hideInfoSection: { type: 'boolean' },
948
- hideLoading: { type: 'boolean' },
949
- hideLogo: { type: 'boolean' },
950
- hideRequestPayloadSample: { type: 'boolean' },
951
- hideRightPanel: { type: 'boolean' },
952
- hideSchemaPattern: { type: 'boolean' },
953
- hideSchemaTitles: { type: 'boolean' },
954
- hideSingleRequestSampleTab: { type: 'boolean' },
955
- hideSecuritySection: { type: 'boolean' },
956
- hideTryItPanel: { type: 'boolean' },
957
- hideFab: { type: 'boolean' },
958
- hideOneOfDescription: { type: 'boolean' },
959
- htmlTemplate: { type: 'string' },
960
- jsonSampleExpandLevel: (value) => {
961
- if (typeof value === 'number') {
962
- return { type: 'number', minimum: 1 };
963
- }
964
- else {
965
- return { type: 'string' };
966
- }
967
- },
968
- labels: 'ConfigLabels',
969
- layout: { enum: ['stacked', 'three-panel'] },
970
- maxDisplayedEnumValues: { type: 'number' },
971
- menuToggle: { type: 'boolean' },
972
- nativeScrollbars: { type: 'boolean' },
973
- noAutoAuth: { type: 'boolean' }, // deprecated
974
- oAuth2RedirectURI: { type: 'string' },
975
- onDeepLinkClick: { type: 'object' },
976
- onlyRequiredInSamples: { type: 'boolean' },
977
- pagination: { enum: ['none', 'section', 'item'] },
978
- pathInMiddlePanel: { type: 'boolean' },
979
- payloadSampleIdx: { type: 'number', minimum: 0 },
980
- requestInterceptor: { type: 'object' },
981
- requiredPropsFirst: { type: 'boolean' },
982
- routingBasePath: { type: 'string' },
983
- routingStrategy: { type: 'string' }, // deprecated
984
- samplesTabsMaxCount: { type: 'number' },
985
- schemaExpansionLevel: (value) => {
986
- if (typeof value === 'number') {
987
- return { type: 'number', minimum: 0 };
988
- }
989
- else {
990
- return { type: 'string' };
991
- }
992
- },
993
- schemaDefinitionsTagName: { type: 'string' },
994
- minCharacterLengthToInitSearch: { type: 'number', minimum: 1 },
995
- maxResponseHeadersToShowInTryIt: { type: 'number', minimum: 0 },
996
- scrollYOffset: (value) => {
997
- if (typeof value === 'number') {
998
- return { type: 'number' };
999
- }
1000
- else {
1001
- return { type: 'string' };
1002
- }
1003
- },
1004
- searchAutoExpand: { type: 'boolean' },
1005
- searchFieldLevelBoost: { type: 'number', minimum: 0 },
1006
- searchMaxDepth: { type: 'number', minimum: 1 },
1007
- searchMode: { enum: ['default', 'path-only'] },
1008
- searchOperationTitleBoost: { type: 'number' },
1009
- searchTagTitleBoost: { type: 'number' },
1010
- sendXUserAgentInTryIt: { type: 'boolean' },
1011
- showChangeLayoutButton: { type: 'boolean' },
1012
- showConsole: { type: 'boolean' }, // deprecated
1013
- showExtensions: (value) => {
1014
- if (typeof value === 'boolean') {
1015
- return { type: 'boolean' };
1016
- }
1017
- else {
1018
- return {
1019
- type: 'array',
1020
- items: {
1021
- type: 'string',
1022
- },
1023
- };
1024
- }
1025
- },
1026
- showNextButton: { type: 'boolean' },
1027
- showRightPanelToggle: { type: 'boolean' },
1028
- showSecuritySchemeType: { type: 'boolean' },
1029
- showWebhookVerb: { type: 'boolean' },
1030
- showObjectSchemaExamples: { type: 'boolean' },
1031
- disableTryItRequestUrlEncoding: { type: 'boolean' },
1032
- sidebarLinks: 'ConfigSidebarLinks',
1033
- sideNavStyle: { enum: ['summary-only', 'path-first', 'id-only', 'path-only'] },
1034
- simpleOneOfTypeLabel: { type: 'boolean' },
1035
- sortEnumValuesAlphabetically: { type: 'boolean' },
1036
- sortOperationsAlphabetically: { type: 'boolean' },
1037
- sortPropsAlphabetically: { type: 'boolean' },
1038
- sortTagsAlphabetically: { type: 'boolean' },
1039
- suppressWarnings: { type: 'boolean' }, // deprecated
1040
- unstable_externalDescription: { type: 'boolean' }, // deprecated
1041
- unstable_ignoreMimeParameters: { type: 'boolean' },
1042
- untrustedDefinition: { type: 'boolean' },
1043
- mockServer: {
1044
- properties: {
1045
- url: { type: 'string' },
1046
- position: { enum: ['first', 'last', 'replace', 'off'] },
1047
- description: { type: 'string' },
1048
- },
1049
- },
1050
- showAccessMode: { type: 'boolean' },
1051
- preserveOriginalExtensionsName: { type: 'boolean' },
1052
- markdownHeadingsAnchorLevel: { type: 'number' },
1053
- },
1054
- additionalProperties: {},
1055
- };
1056
- const ConfigMockServer = {
1057
- properties: {
1058
- strictExamples: { type: 'boolean' },
1059
- errorIfForcedExampleNotFound: { type: 'boolean' },
1060
- },
1061
- };
1062
- function createConfigTypes(extraSchemas, config) {
1063
- const nodeNames = Object.values(oas_types_1.SpecVersion).flatMap((version) => {
1064
- const types = config?.styleguide
1065
- ? config.styleguide.extendTypes((0, oas_types_1.getTypes)(version), version)
1066
- : (0, oas_types_1.getTypes)(version);
379
+ export function createConfigTypes(extraSchemas, config) {
380
+ const nodeNames = Object.values(SpecVersion).flatMap((version) => {
381
+ const types = config ? config.extendTypes(getTypes(version), version) : getTypes(version);
1067
382
  return Object.keys(types);
1068
383
  });
1069
384
  // Create types based on external schemas
1070
- const nodeTypes = (0, json_schema_adapter_1.getNodeTypesFromJSONSchema)('rootRedoclyConfigSchema', extraSchemas);
385
+ const nodeTypes = getNodeTypesFromJSONSchema('rootRedoclyConfigSchema', extraSchemas);
1071
386
  return {
1072
387
  ...CoreConfigTypes,
1073
388
  ConfigRoot: createConfigRoot(nodeTypes), // This is the REAL config root type
1074
389
  ConfigApisProperties: createConfigApisProperties(nodeTypes),
1075
390
  AssertionDefinitionSubject: createAssertionDefinitionSubject(nodeNames),
1076
391
  ...nodeTypes,
392
+ 'rootRedoclyConfigSchema.scorecard.levels_items': createScorecardLevelsItems(nodeTypes),
1077
393
  };
1078
394
  }
1079
395
  const CoreConfigTypes = {
1080
396
  Assert,
1081
397
  ConfigApis,
1082
- ConfigStyleguide,
1083
- ConfigReferenceDocs,
1084
- ConfigMockServer,
398
+ ConfigGovernance,
1085
399
  ConfigHTTP,
1086
- ConfigLanguage,
1087
- ConfigLabels,
1088
- ConfigSidebarLinks,
1089
- CommonConfigSidebarLinks,
1090
- ConfigTheme,
1091
400
  AssertDefinition,
1092
- ThemeColors,
1093
- CommonThemeColors,
1094
- BorderThemeColors,
1095
- HttpColors,
1096
- ResponseColors,
1097
- SecondaryColors,
1098
- TextThemeColors,
1099
- Sizes,
1100
- ButtonsConfig,
1101
- CommonColorProps,
1102
- BadgeFontConfig,
1103
- BadgeSizes,
1104
- HttpBadgesConfig,
1105
- LabelControls,
1106
- Panels,
1107
- TryItButton,
1108
- Breakpoints,
1109
- StackedConfig,
1110
- ThreePanelConfig,
1111
- SchemaColorsConfig,
1112
- SizeProps,
1113
- Level1Items,
1114
- SpacingConfig,
1115
- FontConfig,
1116
- CodeConfig,
1117
- HeadingsConfig,
1118
- LinksConfig,
1119
- TokenProps,
1120
- CodeBlock,
1121
- ConfigThemeLogo,
1122
- Fab,
1123
- ButtonOverrides,
1124
- Overrides,
1125
401
  ObjectRule,
1126
402
  Schema,
1127
- RightPanel,
1128
403
  Rules,
1129
- Shape,
1130
- ThemeSpacing,
1131
- GenerateCodeSamples,
1132
- GroupItemsConfig,
1133
- ConfigThemeComponents,
1134
- Layout,
1135
- ConfigThemeSchema,
1136
- Sidebar,
1137
- Heading,
1138
- Typography,
1139
404
  AssertionDefinitionAssertions,
1140
405
  };
1141
- exports.ConfigTypes = createConfigTypes(config_1.rootRedoclyConfigSchema);
1142
- exports.NormalizedConfigTypes = (0, types_1.normalizeTypes)(exports.ConfigTypes);
406
+ export const ConfigTypes = createConfigTypes(rootRedoclyConfigSchema);
407
+ export const NormalizedConfigTypes = normalizeTypes(ConfigTypes);
408
+ //# sourceMappingURL=redocly-yaml.js.map