@camunda8/docusaurus-theme-openapi-docs 4.5.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 (312) hide show
  1. package/babel.config.js +35 -0
  2. package/lib/index.d.ts +2 -0
  3. package/lib/index.js +81 -0
  4. package/lib/markdown/createDescription.d.ts +1 -0
  5. package/lib/markdown/createDescription.js +15 -0
  6. package/lib/markdown/schema.d.ts +3 -0
  7. package/lib/markdown/schema.js +154 -0
  8. package/lib/markdown/utils.d.ts +10 -0
  9. package/lib/markdown/utils.js +49 -0
  10. package/lib/markdown/utils.test.d.ts +1 -0
  11. package/lib/markdown/utils.test.js +43 -0
  12. package/lib/theme/ApiExplorer/Accept/index.d.ts +3 -0
  13. package/lib/theme/ApiExplorer/Accept/index.js +38 -0
  14. package/lib/theme/ApiExplorer/Accept/slice.d.ts +11 -0
  15. package/lib/theme/ApiExplorer/Accept/slice.js +22 -0
  16. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  17. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.d.ts +4 -0
  18. package/lib/theme/ApiExplorer/ApiCodeBlock/Container/index.js +35 -0
  19. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.d.ts +3 -0
  20. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/Element.js +41 -0
  21. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.d.ts +3 -0
  22. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/String.js +153 -0
  23. package/lib/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  24. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  25. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.d.ts +7 -0
  26. package/lib/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.js +147 -0
  27. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  28. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.d.ts +6 -0
  29. package/lib/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.js +58 -0
  30. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  31. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.d.ts +14 -0
  32. package/lib/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.js +248 -0
  33. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
  34. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.d.ts +3 -0
  35. package/lib/theme/ApiExplorer/ApiCodeBlock/Line/index.js +59 -0
  36. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  37. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.d.ts +7 -0
  38. package/lib/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.js +51 -0
  39. package/lib/theme/ApiExplorer/ApiCodeBlock/index.d.ts +3 -0
  40. package/lib/theme/ApiExplorer/ApiCodeBlock/index.js +110 -0
  41. package/lib/theme/ApiExplorer/Authorization/auth-types.d.ts +3 -0
  42. package/lib/theme/ApiExplorer/Authorization/auth-types.js +28 -0
  43. package/lib/theme/ApiExplorer/Authorization/index.d.ts +3 -0
  44. package/lib/theme/ApiExplorer/Authorization/index.js +201 -0
  45. package/lib/theme/ApiExplorer/Authorization/slice.d.ts +40 -0
  46. package/lib/theme/ApiExplorer/Authorization/slice.js +102 -0
  47. package/lib/theme/ApiExplorer/Body/index.d.ts +10 -0
  48. package/lib/theme/ApiExplorer/Body/index.js +394 -0
  49. package/lib/theme/ApiExplorer/Body/json2xml.js +43 -0
  50. package/lib/theme/ApiExplorer/Body/slice.d.ts +82 -0
  51. package/lib/theme/ApiExplorer/Body/slice.js +97 -0
  52. package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.d.ts +21 -0
  53. package/lib/theme/ApiExplorer/CodeSnippets/code-snippets-types.js +8 -0
  54. package/lib/theme/ApiExplorer/CodeSnippets/index.d.ts +11 -0
  55. package/lib/theme/ApiExplorer/CodeSnippets/index.js +435 -0
  56. package/lib/theme/ApiExplorer/CodeSnippets/languages.d.ts +5 -0
  57. package/lib/theme/ApiExplorer/CodeSnippets/languages.js +133 -0
  58. package/lib/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
  59. package/lib/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
  60. package/lib/theme/ApiExplorer/CodeTabs/index.d.ts +15 -0
  61. package/lib/theme/ApiExplorer/CodeTabs/index.js +283 -0
  62. package/lib/theme/ApiExplorer/ContentType/index.d.ts +3 -0
  63. package/lib/theme/ApiExplorer/ContentType/index.js +40 -0
  64. package/lib/theme/ApiExplorer/ContentType/slice.d.ts +11 -0
  65. package/lib/theme/ApiExplorer/ContentType/slice.js +22 -0
  66. package/lib/theme/ApiExplorer/Export/index.d.ts +3 -0
  67. package/lib/theme/ApiExplorer/Export/index.js +57 -0
  68. package/lib/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
  69. package/lib/theme/ApiExplorer/FloatingButton/index.d.ts +8 -0
  70. package/lib/theme/ApiExplorer/FloatingButton/index.js +28 -0
  71. package/lib/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
  72. package/lib/theme/ApiExplorer/FormFileUpload/index.d.ts +7 -0
  73. package/lib/theme/ApiExplorer/FormFileUpload/index.js +178 -0
  74. package/lib/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  75. package/lib/theme/ApiExplorer/FormItem/index.d.ts +10 -0
  76. package/lib/theme/ApiExplorer/FormItem/index.js +49 -0
  77. package/lib/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  78. package/lib/theme/ApiExplorer/FormMultiSelect/index.d.ts +9 -0
  79. package/lib/theme/ApiExplorer/FormMultiSelect/index.js +51 -0
  80. package/lib/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
  81. package/lib/theme/ApiExplorer/FormSelect/index.d.ts +8 -0
  82. package/lib/theme/ApiExplorer/FormSelect/index.js +35 -0
  83. package/lib/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  84. package/lib/theme/ApiExplorer/FormTextInput/index.d.ts +11 -0
  85. package/lib/theme/ApiExplorer/FormTextInput/index.js +80 -0
  86. package/lib/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  87. package/lib/theme/ApiExplorer/LiveEditor/index.d.ts +6 -0
  88. package/lib/theme/ApiExplorer/LiveEditor/index.js +176 -0
  89. package/lib/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  90. package/lib/theme/ApiExplorer/MethodEndpoint/index.d.ts +8 -0
  91. package/lib/theme/ApiExplorer/MethodEndpoint/index.js +86 -0
  92. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.d.ts +6 -0
  93. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.js +230 -0
  94. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.d.ts +6 -0
  95. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.js +71 -0
  96. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.d.ts +6 -0
  97. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.js +97 -0
  98. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.d.ts +6 -0
  99. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.js +72 -0
  100. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.d.ts +6 -0
  101. package/lib/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.js +38 -0
  102. package/lib/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
  103. package/lib/theme/ApiExplorer/ParamOptions/index.d.ts +7 -0
  104. package/lib/theme/ApiExplorer/ParamOptions/index.js +233 -0
  105. package/lib/theme/ApiExplorer/ParamOptions/slice.d.ts +17 -0
  106. package/lib/theme/ApiExplorer/ParamOptions/slice.js +25 -0
  107. package/lib/theme/ApiExplorer/Request/_Request.scss +129 -0
  108. package/lib/theme/ApiExplorer/Request/index.d.ts +6 -0
  109. package/lib/theme/ApiExplorer/Request/index.js +443 -0
  110. package/lib/theme/ApiExplorer/Request/makeRequest.d.ts +4 -0
  111. package/lib/theme/ApiExplorer/Request/makeRequest.js +223 -0
  112. package/lib/theme/ApiExplorer/Response/_Response.scss +121 -0
  113. package/lib/theme/ApiExplorer/Response/index.d.ts +6 -0
  114. package/lib/theme/ApiExplorer/Response/index.js +207 -0
  115. package/lib/theme/ApiExplorer/Response/slice.d.ts +17 -0
  116. package/lib/theme/ApiExplorer/Response/slice.js +51 -0
  117. package/lib/theme/ApiExplorer/SecuritySchemes/index.d.ts +3 -0
  118. package/lib/theme/ApiExplorer/SecuritySchemes/index.js +519 -0
  119. package/lib/theme/ApiExplorer/Server/_Server.scss +26 -0
  120. package/lib/theme/ApiExplorer/Server/index.d.ts +3 -0
  121. package/lib/theme/ApiExplorer/Server/index.js +213 -0
  122. package/lib/theme/ApiExplorer/Server/slice.d.ts +13 -0
  123. package/lib/theme/ApiExplorer/Server/slice.js +33 -0
  124. package/lib/theme/ApiExplorer/buildPostmanRequest.d.ts +20 -0
  125. package/lib/theme/ApiExplorer/buildPostmanRequest.js +511 -0
  126. package/lib/theme/ApiExplorer/index.d.ts +7 -0
  127. package/lib/theme/ApiExplorer/index.js +107 -0
  128. package/lib/theme/ApiExplorer/persistanceMiddleware.d.ts +19 -0
  129. package/lib/theme/ApiExplorer/persistanceMiddleware.js +54 -0
  130. package/lib/theme/ApiExplorer/storage-utils.d.ts +4 -0
  131. package/lib/theme/ApiExplorer/storage-utils.js +41 -0
  132. package/lib/theme/ApiItem/Layout/index.d.ts +3 -0
  133. package/lib/theme/ApiItem/Layout/index.js +121 -0
  134. package/lib/theme/ApiItem/Layout/styles.module.css +17 -0
  135. package/lib/theme/ApiItem/hooks.d.ts +12 -0
  136. package/lib/theme/ApiItem/hooks.js +13 -0
  137. package/lib/theme/ApiItem/index.d.ts +2 -0
  138. package/lib/theme/ApiItem/index.js +238 -0
  139. package/lib/theme/ApiItem/store.d.ts +58 -0
  140. package/lib/theme/ApiItem/store.js +53 -0
  141. package/lib/theme/ApiLogo/index.d.ts +2 -0
  142. package/lib/theme/ApiLogo/index.js +51 -0
  143. package/lib/theme/ApiTabs/_ApiTabs.scss +142 -0
  144. package/lib/theme/ApiTabs/index.d.ts +7 -0
  145. package/lib/theme/ApiTabs/index.js +275 -0
  146. package/lib/theme/ArrayBrackets/index.d.ts +3 -0
  147. package/lib/theme/ArrayBrackets/index.js +50 -0
  148. package/lib/theme/CodeSamples/_CodeSamples.scss +3 -0
  149. package/lib/theme/CodeSamples/index.d.ts +8 -0
  150. package/lib/theme/CodeSamples/index.js +27 -0
  151. package/lib/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
  152. package/lib/theme/DiscriminatorTabs/index.d.ts +3 -0
  153. package/lib/theme/DiscriminatorTabs/index.js +258 -0
  154. package/lib/theme/Markdown/Details/_Details.scss +122 -0
  155. package/lib/theme/Markdown/index.js +179 -0
  156. package/lib/theme/MimeTabs/_MimeTabs.scss +70 -0
  157. package/lib/theme/MimeTabs/index.d.ts +6 -0
  158. package/lib/theme/MimeTabs/index.js +286 -0
  159. package/lib/theme/OperationTabs/_OperationTabs.scss +72 -0
  160. package/lib/theme/OperationTabs/index.d.ts +3 -0
  161. package/lib/theme/OperationTabs/index.js +248 -0
  162. package/lib/theme/ParamsDetails/index.d.ts +6 -0
  163. package/lib/theme/ParamsDetails/index.js +93 -0
  164. package/lib/theme/ParamsItem/_ParamsItem.scss +54 -0
  165. package/lib/theme/ParamsItem/index.d.ts +22 -0
  166. package/lib/theme/ParamsItem/index.js +281 -0
  167. package/lib/theme/RequestSchema/index.d.ts +15 -0
  168. package/lib/theme/RequestSchema/index.js +208 -0
  169. package/lib/theme/ResponseExamples/index.d.ts +18 -0
  170. package/lib/theme/ResponseExamples/index.js +213 -0
  171. package/lib/theme/ResponseHeaders/index.d.ts +13 -0
  172. package/lib/theme/ResponseHeaders/index.js +39 -0
  173. package/lib/theme/ResponseSchema/index.d.ts +15 -0
  174. package/lib/theme/ResponseSchema/index.js +165 -0
  175. package/lib/theme/Schema/index.d.ts +8 -0
  176. package/lib/theme/Schema/index.js +853 -0
  177. package/lib/theme/SchemaItem/_SchemaItem.scss +89 -0
  178. package/lib/theme/SchemaItem/index.d.ts +12 -0
  179. package/lib/theme/SchemaItem/index.js +314 -0
  180. package/lib/theme/SchemaTabs/_SchemaTabs.scss +61 -0
  181. package/lib/theme/SchemaTabs/index.d.ts +3 -0
  182. package/lib/theme/SchemaTabs/index.js +255 -0
  183. package/lib/theme/SkeletonLoader/index.d.ts +6 -0
  184. package/lib/theme/SkeletonLoader/index.js +20 -0
  185. package/lib/theme/StatusCodes/index.d.ts +9 -0
  186. package/lib/theme/StatusCodes/index.js +90 -0
  187. package/lib/theme/styles.scss +215 -0
  188. package/lib/theme/translationIds.d.ts +83 -0
  189. package/lib/theme/translationIds.js +106 -0
  190. package/lib/types.d.ts +46 -0
  191. package/lib/types.js +8 -0
  192. package/package.json +85 -0
  193. package/src/index.ts +85 -0
  194. package/src/markdown/createDescription.ts +13 -0
  195. package/src/markdown/schema.ts +186 -0
  196. package/src/markdown/utils.test.ts +49 -0
  197. package/src/markdown/utils.ts +59 -0
  198. package/src/plugin-content-docs.d.ts +20 -0
  199. package/src/postman-code-generators.d.ts +9 -0
  200. package/src/react-magic-dropzone.d.ts +9 -0
  201. package/src/theme/ApiExplorer/Accept/index.tsx +36 -0
  202. package/src/theme/ApiExplorer/Accept/slice.ts +29 -0
  203. package/src/theme/ApiExplorer/ApiCodeBlock/Container/_Container.scss +7 -0
  204. package/src/theme/ApiExplorer/ApiCodeBlock/Container/index.tsx +32 -0
  205. package/src/theme/ApiExplorer/ApiCodeBlock/Content/Element.tsx +34 -0
  206. package/src/theme/ApiExplorer/ApiCodeBlock/Content/String.tsx +134 -0
  207. package/src/theme/ApiExplorer/ApiCodeBlock/Content/_Content.scss +91 -0
  208. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/_CopyButton.scss +44 -0
  209. package/src/theme/ApiExplorer/ApiCodeBlock/CopyButton/index.tsx +83 -0
  210. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/_ExitButton.scss +16 -0
  211. package/src/theme/ApiExplorer/ApiCodeBlock/ExitButton/index.tsx +55 -0
  212. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/_ExpandButton.scss +62 -0
  213. package/src/theme/ApiExplorer/ApiCodeBlock/ExpandButton/index.tsx +166 -0
  214. package/src/theme/ApiExplorer/ApiCodeBlock/Line/_Line.scss +34 -0
  215. package/src/theme/ApiExplorer/ApiCodeBlock/Line/index.tsx +48 -0
  216. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/_WordWrapButton.scss +10 -0
  217. package/src/theme/ApiExplorer/ApiCodeBlock/WordWrapButton/index.tsx +54 -0
  218. package/src/theme/ApiExplorer/ApiCodeBlock/index.tsx +45 -0
  219. package/src/theme/ApiExplorer/Authorization/auth-types.ts +30 -0
  220. package/src/theme/ApiExplorer/Authorization/index.tsx +199 -0
  221. package/src/theme/ApiExplorer/Authorization/slice.ts +146 -0
  222. package/src/theme/ApiExplorer/Body/index.tsx +388 -0
  223. package/src/theme/ApiExplorer/Body/json2xml.d.ts +8 -0
  224. package/src/theme/ApiExplorer/Body/json2xml.js +43 -0
  225. package/src/theme/ApiExplorer/Body/slice.ts +133 -0
  226. package/src/theme/ApiExplorer/CodeSnippets/code-snippets-types.ts +57 -0
  227. package/src/theme/ApiExplorer/CodeSnippets/index.tsx +383 -0
  228. package/src/theme/ApiExplorer/CodeSnippets/languages.json +1290 -0
  229. package/src/theme/ApiExplorer/CodeSnippets/languages.ts +139 -0
  230. package/src/theme/ApiExplorer/CodeTabs/_CodeTabs.scss +505 -0
  231. package/src/theme/ApiExplorer/CodeTabs/index.tsx +261 -0
  232. package/src/theme/ApiExplorer/ContentType/index.tsx +38 -0
  233. package/src/theme/ApiExplorer/ContentType/slice.ts +29 -0
  234. package/src/theme/ApiExplorer/Export/index.tsx +47 -0
  235. package/src/theme/ApiExplorer/FloatingButton/_FloatingButton.scss +27 -0
  236. package/src/theme/ApiExplorer/FloatingButton/index.tsx +29 -0
  237. package/src/theme/ApiExplorer/FormFileUpload/_FormFileUpload.scss +74 -0
  238. package/src/theme/ApiExplorer/FormFileUpload/index.tsx +124 -0
  239. package/src/theme/ApiExplorer/FormItem/_FormItem.scss +21 -0
  240. package/src/theme/ApiExplorer/FormItem/index.tsx +40 -0
  241. package/src/theme/ApiExplorer/FormMultiSelect/_FormMultiSelect.scss +30 -0
  242. package/src/theme/ApiExplorer/FormMultiSelect/index.tsx +57 -0
  243. package/src/theme/ApiExplorer/FormSelect/_FormSelect.scss +43 -0
  244. package/src/theme/ApiExplorer/FormSelect/index.tsx +38 -0
  245. package/src/theme/ApiExplorer/FormTextInput/_FormTextInput.scss +34 -0
  246. package/src/theme/ApiExplorer/FormTextInput/index.tsx +89 -0
  247. package/src/theme/ApiExplorer/LiveEditor/_LiveEditor.scss +15 -0
  248. package/src/theme/ApiExplorer/LiveEditor/index.tsx +122 -0
  249. package/src/theme/ApiExplorer/MethodEndpoint/_MethodEndpoint.scss +22 -0
  250. package/src/theme/ApiExplorer/MethodEndpoint/index.tsx +91 -0
  251. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamArrayFormItem.tsx +185 -0
  252. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamBooleanFormItem.tsx +72 -0
  253. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamMultiSelectFormItem.tsx +94 -0
  254. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamSelectFormItem.tsx +74 -0
  255. package/src/theme/ApiExplorer/ParamOptions/ParamFormItems/ParamTextFormItem.tsx +38 -0
  256. package/src/theme/ApiExplorer/ParamOptions/_ParamOptions.scss +123 -0
  257. package/src/theme/ApiExplorer/ParamOptions/index.tsx +154 -0
  258. package/src/theme/ApiExplorer/ParamOptions/slice.ts +37 -0
  259. package/src/theme/ApiExplorer/Request/_Request.scss +129 -0
  260. package/src/theme/ApiExplorer/Request/index.tsx +352 -0
  261. package/src/theme/ApiExplorer/Request/makeRequest.ts +255 -0
  262. package/src/theme/ApiExplorer/Response/_Response.scss +121 -0
  263. package/src/theme/ApiExplorer/Response/index.tsx +173 -0
  264. package/src/theme/ApiExplorer/Response/slice.ts +52 -0
  265. package/src/theme/ApiExplorer/SecuritySchemes/index.tsx +375 -0
  266. package/src/theme/ApiExplorer/Server/_Server.scss +26 -0
  267. package/src/theme/ApiExplorer/Server/index.tsx +138 -0
  268. package/src/theme/ApiExplorer/Server/slice.ts +39 -0
  269. package/src/theme/ApiExplorer/buildPostmanRequest.ts +524 -0
  270. package/src/theme/ApiExplorer/index.tsx +52 -0
  271. package/src/theme/ApiExplorer/persistanceMiddleware.ts +73 -0
  272. package/src/theme/ApiExplorer/storage-utils.ts +39 -0
  273. package/src/theme/ApiItem/Layout/index.tsx +85 -0
  274. package/src/theme/ApiItem/Layout/styles.module.css +17 -0
  275. package/src/theme/ApiItem/hooks.ts +13 -0
  276. package/src/theme/ApiItem/index.tsx +222 -0
  277. package/src/theme/ApiItem/store.ts +51 -0
  278. package/src/theme/ApiLogo/index.tsx +52 -0
  279. package/src/theme/ApiTabs/_ApiTabs.scss +142 -0
  280. package/src/theme/ApiTabs/index.tsx +243 -0
  281. package/src/theme/ArrayBrackets/index.tsx +37 -0
  282. package/src/theme/CodeSamples/_CodeSamples.scss +3 -0
  283. package/src/theme/CodeSamples/index.tsx +26 -0
  284. package/src/theme/DiscriminatorTabs/_DiscriminatorTabs.scss +98 -0
  285. package/src/theme/DiscriminatorTabs/index.tsx +229 -0
  286. package/src/theme/Markdown/Details/_Details.scss +122 -0
  287. package/src/theme/Markdown/index.d.ts +8 -0
  288. package/src/theme/Markdown/index.js +179 -0
  289. package/src/theme/MimeTabs/_MimeTabs.scss +70 -0
  290. package/src/theme/MimeTabs/index.tsx +257 -0
  291. package/src/theme/OperationTabs/_OperationTabs.scss +72 -0
  292. package/src/theme/OperationTabs/index.tsx +220 -0
  293. package/src/theme/ParamsDetails/index.tsx +90 -0
  294. package/src/theme/ParamsItem/_ParamsItem.scss +54 -0
  295. package/src/theme/ParamsItem/index.tsx +246 -0
  296. package/src/theme/RequestSchema/index.tsx +172 -0
  297. package/src/theme/ResponseExamples/index.tsx +209 -0
  298. package/src/theme/ResponseHeaders/index.tsx +49 -0
  299. package/src/theme/ResponseSchema/index.tsx +150 -0
  300. package/src/theme/Schema/index.tsx +938 -0
  301. package/src/theme/SchemaItem/_SchemaItem.scss +89 -0
  302. package/src/theme/SchemaItem/index.tsx +273 -0
  303. package/src/theme/SchemaTabs/_SchemaTabs.scss +61 -0
  304. package/src/theme/SchemaTabs/index.tsx +224 -0
  305. package/src/theme/SkeletonLoader/index.tsx +18 -0
  306. package/src/theme/StatusCodes/index.tsx +83 -0
  307. package/src/theme/styles.scss +215 -0
  308. package/src/theme/translationIds.ts +103 -0
  309. package/src/theme-classic.d.ts +80 -0
  310. package/src/theme-openapi.d.ts +20 -0
  311. package/src/types.ts +72 -0
  312. package/tsconfig.json +16 -0
@@ -0,0 +1,83 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import React from "react";
9
+
10
+ import { translate } from "@docusaurus/Translate";
11
+
12
+ import ApiTabs from "@theme/ApiTabs";
13
+ import Details from "@theme/Details";
14
+ import Markdown from "@theme/Markdown";
15
+ import ResponseHeaders from "@theme/ResponseHeaders";
16
+ import ResponseSchema from "@theme/ResponseSchema";
17
+ import TabItem from "@theme/TabItem";
18
+ import { OPENAPI_STATUS_CODES } from "@theme/translationIds";
19
+ import { ApiItem } from "@camunda8/docusaurus-plugin-openapi-docs/lib/types";
20
+
21
+ interface Props {
22
+ id?: string;
23
+ label?: string;
24
+ responses: ApiItem["responses"];
25
+ }
26
+
27
+ const StatusCodes: React.FC<Props> = ({ label, id, responses }: any) => {
28
+ if (!responses) return null;
29
+
30
+ const codes = Object.keys(responses);
31
+ if (codes.length === 0) return null;
32
+
33
+ return (
34
+ <ApiTabs label={label} id={id}>
35
+ {codes.map((code) => {
36
+ const response = responses[code];
37
+ const responseHeaders = response.headers;
38
+
39
+ return (
40
+ // @ts-ignore
41
+ <TabItem key={code} label={code} value={code}>
42
+ <div>
43
+ {response.description && (
44
+ <div style={{ marginTop: ".5rem", marginBottom: ".5rem" }}>
45
+ <Markdown>{response.description}</Markdown>
46
+ </div>
47
+ )}
48
+ </div>
49
+ {responseHeaders && (
50
+ <Details
51
+ className="openapi-markdown__details"
52
+ data-collapsed={true}
53
+ open={false}
54
+ style={{ textAlign: "left", marginBottom: "1rem" }}
55
+ summary={
56
+ <summary>
57
+ <strong>
58
+ {translate({
59
+ id: OPENAPI_STATUS_CODES.RESPONSE_HEADERS,
60
+ message: "Response Headers",
61
+ })}
62
+ </strong>
63
+ </summary>
64
+ }
65
+ >
66
+ <ResponseHeaders responseHeaders={responseHeaders} />
67
+ </Details>
68
+ )}
69
+ <ResponseSchema
70
+ title={translate({
71
+ id: OPENAPI_STATUS_CODES.SCHEMA_TITLE,
72
+ message: "Schema",
73
+ })}
74
+ body={{ content: response.content }}
75
+ />
76
+ </TabItem>
77
+ );
78
+ })}
79
+ </ApiTabs>
80
+ );
81
+ };
82
+
83
+ export default StatusCodes;
@@ -0,0 +1,215 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+ /* API Demo Panel */
8
+ @use "./ApiExplorer/CodeTabs/CodeTabs";
9
+ @use "./ApiExplorer/FloatingButton/FloatingButton";
10
+ @use "./ApiExplorer/FormFileUpload/FormFileUpload";
11
+ @use "./ApiExplorer/FormItem/FormItem";
12
+ @use "./ApiExplorer/FormMultiSelect/FormMultiSelect";
13
+ @use "./ApiExplorer/FormSelect/FormSelect";
14
+ @use "./ApiExplorer/FormTextInput/FormTextInput";
15
+ @use "./ApiExplorer/LiveEditor/LiveEditor";
16
+ @use "./ApiExplorer/MethodEndpoint/MethodEndpoint";
17
+ @use "./ApiExplorer/ParamOptions/ParamOptions";
18
+ @use "./ApiExplorer/Request/Request";
19
+ @use "./ApiExplorer/Response/Response";
20
+ @use "./ApiExplorer/Server/Server";
21
+
22
+ /* Api Demo Panel / ApiCodeBlock */
23
+ @use "./ApiExplorer/ApiCodeBlock/Container/Container";
24
+ @use "./ApiExplorer/ApiCodeBlock/Content/Content";
25
+ @use "./ApiExplorer/ApiCodeBlock/CopyButton/CopyButton";
26
+ @use "./ApiExplorer/ApiCodeBlock/ExitButton/ExitButton";
27
+ @use "./ApiExplorer/ApiCodeBlock/ExpandButton/ExpandButton";
28
+ @use "./ApiExplorer/ApiCodeBlock/Line/Line";
29
+ @use "./ApiExplorer/ApiCodeBlock/WordWrapButton/WordWrapButton";
30
+
31
+ /* Schema Styling */
32
+ @use "./ParamsItem/ParamsItem";
33
+ @use "./SchemaItem/SchemaItem";
34
+ /* Tabs Styling */
35
+ @use "./ApiTabs/ApiTabs";
36
+ @use "./DiscriminatorTabs/DiscriminatorTabs";
37
+ @use "./MimeTabs/MimeTabs";
38
+ @use "./SchemaTabs/SchemaTabs";
39
+ @use "./OperationTabs/OperationTabs";
40
+ /* Code Samples */
41
+ @use "./CodeSamples/CodeSamples";
42
+ /* Markdown Styling */
43
+ @use "./Markdown/Details/Details";
44
+
45
+ :root {
46
+ --openapi-required: var(--ifm-color-danger);
47
+ --openapi-deprecated: var(--ifm-color-warning);
48
+ --openapi-nullable: var(--ifm-color-info);
49
+ --openapi-code-blue: var(--ifm-color-info);
50
+ --openapi-code-red: var(--ifm-color-danger);
51
+ --openapi-code-orange: var(--ifm-color-warning);
52
+ --openapi-code-green: var(--ifm-color-success);
53
+ --openapi-card-background-color: var(--ifm-color-gray-100);
54
+ --openapi-card-border-radius: var(--ifm-pre-border-radius);
55
+ --openapi-input-border: var(--ifm-color-primary);
56
+ --openapi-input-background: var(--openapi-card-background-color);
57
+ --openapi-tree-line-color: var(--ifm-toc-border-color);
58
+ --openapi-code-tab-border-color: var(--ifm-toc-border-color);
59
+ --openapi-code-tab-border-color-python: #ffdb50;
60
+ --openapi-code-tab-border-color-bash: var(--ifm-color-danger);
61
+ --openapi-code-tab-border-color-go: var(--ifm-color-info);
62
+ --openapi-code-tab-border-color-js: var(--ifm-color-warning);
63
+ --openapi-code-tab-border-color-ruby: var(--ifm-color-danger);
64
+ --openapi-code-tab-border-color-csharp: #9b4f96;
65
+ --openapi-code-tab-border-color-nodejs: var(--ifm-color-success);
66
+ --openapi-code-tab-border-color-php: #6181b6;
67
+ --openapi-code-tab-border-color-java: #0374bd;
68
+ --openapi-code-tab-border-color-powershell: #00adef;
69
+ --openapi-code-tab-shadow-color-python: rgba(255, 219, 80, 0.25);
70
+ --openapi-code-tab-shadow-color-curl: var(
71
+ --openapi-code-tab-shadow-color-bash
72
+ );
73
+ --openapi-code-tab-shadow-color-bash: rgba(250, 56, 62, 0.25);
74
+ --openapi-code-tab-shadow-color-go: rgba(84, 199, 236, 0.25);
75
+ --openapi-code-tab-shadow-color-js: rgba(255, 186, 0, 0.25);
76
+ --openapi-code-tab-shadow-color-ruby: rgba(250, 56, 62, 0.25);
77
+ --openapi-code-tab-shadow-color-csharp: rgba(155, 79, 150, 0.25);
78
+ --opeanpi-code-tab-shadow-color-nodejs: rgba(0, 164, 0, 0.25);
79
+ --openapi-code-tab-shadow-color-php: rgba(97, 129, 182, 0.25);
80
+ --openapi-code-tab-shadow-color-java: rgba(3, 116, 189, 0.25);
81
+ --opeanpi-code-tab-shadow-color-powershell: rgba(3, 116, 189, 0.25);
82
+ --openapi-explorer-font-size-input: 12px;
83
+ --openapi-explorer-font-size-code: 12px;
84
+ --openapi-explorer-padding-input: 0.5rem;
85
+ --openapi-explorer-border-color: var(--ifm-toc-border-color);
86
+ --openapi-explorer-caret-bg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>');
87
+ --openapi-skeleton-background: var(--ifm-color-emphasis-100);
88
+ }
89
+
90
+ [data-theme="dark"] {
91
+ --openapi-card-background-color: var(--ifm-color-gray-900) !important;
92
+ --openapi-explorer-caret-bg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 24 24" fill="white"><path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"></path></svg>') !important;
93
+ }
94
+
95
+ .docs-wrapper {
96
+ height: 100%;
97
+ }
98
+
99
+ // @media (min-width: 997px) {
100
+ // .docItemCol {
101
+ // max-width: 75% !important;
102
+ // }
103
+
104
+ // /* Prevent hydration FOUC, as the mobile TOC needs to be server-rendered */
105
+ // .tocMobile {
106
+ // display: none;
107
+ // }
108
+ // }
109
+
110
+ /* Begin OpenAPI theme styles */
111
+ // [data-theme="dark"] {
112
+ // --openapi-card-background-color: var(--ifm-color-gray-900) !important;
113
+ // }
114
+
115
+ // .theme-api-markdown div[class^="collapsibleContent"] {
116
+ // margin-top: 0 !important;
117
+ // padding-left: 2px;
118
+ // }
119
+
120
+ /* Demo panel details */
121
+
122
+ // .theme-api-markdown .openapi-explorer__details > div > div > pre {
123
+ // border-top-left-radius: 0;
124
+ // border-top-right-radius: 0;
125
+ // }
126
+
127
+ /* Code block */
128
+
129
+ // .theme-api-markdown code {
130
+ // max-width: 600px;
131
+ // max-height: 500px;
132
+ // overflow: auto;
133
+ // }
134
+
135
+ /* Version button */
136
+
137
+ .version-button div {
138
+ display: block;
139
+ }
140
+
141
+ .version-button div > button > span::after {
142
+ border-color: currentcolor transparent;
143
+ border-style: solid;
144
+ border-width: 0.4em 0.4em 0;
145
+ content: "";
146
+ margin-left: 0.3em;
147
+ position: relative;
148
+ transform: translateY(-50%);
149
+ display: inline-block;
150
+ font-size: 0.8rem;
151
+ top: 1px;
152
+ }
153
+
154
+ .openapi__logo {
155
+ width: 250px;
156
+ }
157
+
158
+ .openapi__heading {
159
+ font-size: 2rem;
160
+ margin-bottom: 0.5rem !important;
161
+ }
162
+
163
+ .openapi-left-panel__container {
164
+ border-right: thin solid var(--ifm-toc-border-color);
165
+ }
166
+
167
+ @media (max-width: 997px) {
168
+ .schema {
169
+ margin-bottom: 1rem;
170
+ }
171
+ }
172
+
173
+ .openapi-tabs__heading {
174
+ margin-bottom: 1rem;
175
+ }
176
+
177
+ /* Loading Skeleton */
178
+ @keyframes pulsing {
179
+ 0% {
180
+ opacity: 1;
181
+ background-color: var(--ifm-color-emphasis-100);
182
+ }
183
+ 50% {
184
+ opacity: 0.6;
185
+ background-color: var(--ifm-toc-border-color);
186
+ }
187
+ 100% {
188
+ opacity: 1;
189
+ background-color: var(--ifm-color-emphasis-100);
190
+ }
191
+ }
192
+
193
+ .openapi-skeleton {
194
+ animation: pulsing 2s infinite ease-in-out;
195
+ }
196
+
197
+ /* Loading Skeleton */
198
+ .openapi-skeleton {
199
+ border-radius: var(--ifm-pre-border-radius);
200
+ background-color: var(--openapi-skeleton-background);
201
+ max-width: 100%;
202
+ margin: 1rem auto;
203
+ }
204
+
205
+ .openapi-skeleton.sm {
206
+ height: 100px;
207
+ }
208
+
209
+ .openapi-skeleton.md {
210
+ height: 350px;
211
+ }
212
+
213
+ .openapi-skeleton.lg {
214
+ height: 96.5%;
215
+ }
@@ -0,0 +1,103 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ export const OPENAPI_RESPONSE = {
9
+ TITLE: "theme.openapi.response.title",
10
+ CLEAR: "theme.openapi.response.clear",
11
+ PLACEHOLDER: "theme.openapi.response.placeholder",
12
+ HEADERS_TAB: "theme.openapi.response.headersTab",
13
+ };
14
+
15
+ export const OPENAPI_TABS = {
16
+ RESPONSES_LABEL: "theme.openapi.tabs.responses.label",
17
+ };
18
+
19
+ export const OPENAPI_REQUEST = {
20
+ BODY_TITLE: "theme.openapi.request.body.title",
21
+ ACCEPT_TITLE: "theme.openapi.request.accept.title",
22
+ SEND_BUTTON: "theme.openapi.request.sendButton",
23
+ REQUIRED_LABEL: "theme.openapi.request.requiredLabel",
24
+ REQUEST_TITLE: "theme.openapi.request.title",
25
+ COLLAPSE_ALL: "theme.openapi.request.collapseAll",
26
+ EXPAND_ALL: "theme.openapi.request.expandAll",
27
+ BASE_URL_TITLE: "theme.openapi.request.baseUrl.title",
28
+ AUTH_TITLE: "theme.openapi.request.auth.title",
29
+ PARAMETERS_TITLE: "theme.openapi.request.parameters.title",
30
+ FETCHING_MESSAGE: "theme.openapi.request.fetchingMessage",
31
+ CONNECTION_FAILED: "theme.openapi.request.connectionFailed",
32
+ };
33
+
34
+ export const OPENAPI_SERVER = {
35
+ EDIT_BUTTON: "theme.openapi.server.editButton",
36
+ HIDE_BUTTON: "theme.openapi.server.hideButton",
37
+ };
38
+
39
+ export const OPENAPI_PARAM_OPTIONS = {
40
+ SHOW_OPTIONAL: "theme.openapi.paramOptions.showOptional",
41
+ HIDE_OPTIONAL: "theme.openapi.paramOptions.hideOptional",
42
+ };
43
+
44
+ export const OPENAPI_FORM_FILE_UPLOAD = {
45
+ CLEAR_BUTTON: "theme.openapi.formFileUpload.clearButton",
46
+ };
47
+
48
+ export const OPENAPI_FORM = {
49
+ FIELD_REQUIRED: "theme.openapi.form.fieldRequired",
50
+ };
51
+
52
+ export const OPENAPI_AUTH = {
53
+ BEARER_TOKEN: "theme.openapi.auth.bearerToken",
54
+ USERNAME: "theme.openapi.auth.username",
55
+ PASSWORD: "theme.openapi.auth.password",
56
+ SECURITY_SCHEME: "theme.openapi.auth.securityScheme",
57
+ };
58
+
59
+ export const OPENAPI_RESPONSE_EXAMPLES = {
60
+ EXAMPLE: "theme.openapi.responseExamples.example",
61
+ AUTO_EXAMPLE: "theme.openapi.responseExamples.autoExample",
62
+ };
63
+
64
+ export const OPENAPI_BODY = {
65
+ EXAMPLE_FROM_SCHEMA: "theme.openapi.body.exampleFromSchema",
66
+ };
67
+
68
+ export const OPENAPI_STATUS_CODES = {
69
+ RESPONSE_HEADERS: "theme.openapi.statusCodes.responseHeaders",
70
+ SCHEMA_TITLE: "theme.openapi.statusCodes.schemaTitle",
71
+ };
72
+
73
+ export const OPENAPI_SCHEMA_ITEM = {
74
+ REQUIRED: "theme.openapi.schemaItem.required",
75
+ DEPRECATED: "theme.openapi.schemaItem.deprecated",
76
+ NULLABLE: "theme.openapi.schemaItem.nullable",
77
+ DEFAULT_VALUE: "theme.openapi.schemaItem.defaultValue",
78
+ EXAMPLE: "theme.openapi.schemaItem.example",
79
+ EXAMPLES: "theme.openapi.schemaItem.examples",
80
+ DESCRIPTION: "theme.openapi.schemaItem.description",
81
+ CONSTANT_VALUE: "theme.openapi.schemaItem.constantValue",
82
+ ENUM_VALUE: "theme.openapi.schemaItem.enumValue",
83
+ ENUM_DESCRIPTION: "theme.openapi.schemaItem.enumDescription",
84
+ POSSIBLE_VALUES: "theme.openapi.schemaItem.possibleValues",
85
+ ONE_OF: "theme.openapi.schemaItem.oneOf",
86
+ ANY_OF: "theme.openapi.schemaItem.anyOf",
87
+ };
88
+
89
+ export const OPENAPI_PARAMS_DETAILS = {
90
+ PARAMETERS_TITLE: "theme.openapi.paramsDetails.parametersTitle",
91
+ };
92
+
93
+ export const OPENAPI_SECURITY_SCHEMES = {
94
+ NAME: "theme.openapi.securitySchemes.name",
95
+ TYPE: "theme.openapi.securitySchemes.type",
96
+ SCOPES: "theme.openapi.securitySchemes.scopes",
97
+ IN: "theme.openapi.securitySchemes.in",
98
+ FLOWS: "theme.openapi.securitySchemes.flows",
99
+ DESCRIPTION: "theme.openapi.securitySchemes.description",
100
+ SCHEME: "theme.openapi.securitySchemes.scheme",
101
+ BEARER_FORMAT: "theme.openapi.securitySchemes.bearerFormat",
102
+ OPEN_ID_CONNECT_URL: "theme.openapi.securitySchemes.openIdConnectUrl",
103
+ };
@@ -0,0 +1,80 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ /// <reference types="@docusaurus/theme-classic" />
9
+
10
+ declare module "@docusaurus/theme-common/internal" {
11
+ import { CSSProperties, ReactNode, RefObject } from "react";
12
+
13
+ import type { PropDocContent } from "@docusaurus/plugin-content-docs";
14
+ import { MagicCommentConfig } from "@docusaurus/theme-common/lib/utils/codeBlockUtils";
15
+ import {
16
+ TabsProps as ITabsProps,
17
+ TabValue,
18
+ } from "@docusaurus/theme-common/lib/utils/tabsUtils";
19
+ import { Props as ICodeBlockProps } from "@theme/CodeBlock";
20
+ import { Props as ICopyButtonProps } from "@theme/CodeBlock/CopyButton";
21
+ import { Props as ILineProps } from "@theme/CodeBlock/Line";
22
+ import { PrismTheme } from "prism-react-renderer";
23
+
24
+ export interface TabProps extends ITabsProps {
25
+ length?: number;
26
+ }
27
+
28
+ export interface CopyButtonProps extends ICopyButtonProps {}
29
+ export interface LineProps extends ILineProps {}
30
+ export interface CodeBlockProps extends ICodeBlockProps {}
31
+
32
+ export function usePrismTheme(): PrismTheme;
33
+
34
+ export function sanitizeTabsChildren(children: TabProps["children"]);
35
+
36
+ export function getPrismCssVariables(prismTheme: PrismTheme): CSSProperties;
37
+
38
+ export function parseCodeBlockTitle(metastring?: string): string;
39
+
40
+ export function parseLanguage(className: string): string | undefined;
41
+
42
+ export function containsLineNumbers(metastring?: string): boolean;
43
+
44
+ export function useScrollPositionBlocker(): {
45
+ blockElementScrollPositionUntilNextRender: (el: HTMLElement) => void;
46
+ };
47
+
48
+ export function DocProvider({
49
+ children,
50
+ content,
51
+ }: {
52
+ children: ReactNode;
53
+ content: PropDocContent;
54
+ });
55
+
56
+ export function useTabs(props: TabProps): {
57
+ selectedValue: string;
58
+ selectValue: (value: string) => void;
59
+ tabValues: readonly TabValue[];
60
+ };
61
+
62
+ export function parseLines(
63
+ content: string,
64
+ options: {
65
+ metastring: string | undefined;
66
+ language: string | undefined;
67
+ magicComments: MagicCommentConfig[];
68
+ }
69
+ ): {
70
+ lineClassNames: { [lineIndex: number]: string[] };
71
+ code: string;
72
+ };
73
+
74
+ export function useCodeWordWrap(): {
75
+ readonly codeBlockRef: RefObject<HTMLPreElement>;
76
+ readonly isEnabled: boolean;
77
+ readonly isCodeScrollable: boolean;
78
+ readonly toggle: () => void;
79
+ };
80
+ }
@@ -0,0 +1,20 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ /// <reference types="@camunda8/docusaurus-plugin-openapi-docs" />
9
+
10
+ export type {
11
+ PropSidebarItemCategory,
12
+ SidebarItemLink,
13
+ PropSidebar,
14
+ PropSidebarItem,
15
+ PropSidebars,
16
+ } from "@docusaurus/plugin-content-docs/lib/sidebars/types";
17
+
18
+ declare module "docusaurus-theme-openapi-docs" {
19
+ export type ThemeConfig = Partial<import("./types").ThemeConfig>;
20
+ }
package/src/types.ts ADDED
@@ -0,0 +1,72 @@
1
+ /* ============================================================================
2
+ * Copyright (c) Palo Alto Networks
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ * ========================================================================== */
7
+
8
+ import type { DocFrontMatter as DocusaurusDocFrontMatter } from "@docusaurus/plugin-content-docs";
9
+ import type { JSONSchema4, JSONSchema6, JSONSchema7 } from "json-schema";
10
+
11
+ export interface ThemeConfig {
12
+ api?: {
13
+ proxy?: string;
14
+ authPersistance?: false | "localStorage" | "sessionStorage";
15
+ };
16
+ }
17
+
18
+ export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
19
+ export type SchemaObject = Omit<
20
+ JSONSchema,
21
+ | "type"
22
+ | "allOf"
23
+ | "oneOf"
24
+ | "anyOf"
25
+ | "not"
26
+ | "items"
27
+ | "properties"
28
+ | "additionalProperties"
29
+ > & {
30
+ // OpenAPI specific overrides
31
+ type?: "string" | "number" | "integer" | "boolean" | "object" | "array";
32
+ allOf?: SchemaObject[];
33
+ oneOf?: SchemaObject[];
34
+ anyOf?: SchemaObject[];
35
+ not?: SchemaObject;
36
+ items?: SchemaObject;
37
+ properties?: Record<string, SchemaObject>;
38
+ additionalProperties?: boolean | SchemaObject;
39
+
40
+ // OpenAPI additions
41
+ nullable?: boolean;
42
+ discriminator?: DiscriminatorObject;
43
+ readOnly?: boolean;
44
+ writeOnly?: boolean;
45
+ xml?: XMLObject;
46
+ externalDocs?: ExternalDocumentationObject;
47
+ example?: any;
48
+ deprecated?: boolean;
49
+ };
50
+
51
+ export interface DiscriminatorObject {
52
+ propertyName: string;
53
+ mapping?: Record<string, string>;
54
+ }
55
+
56
+ export interface XMLObject {
57
+ name?: string;
58
+ namespace?: string;
59
+ prefix?: string;
60
+ attribute?: boolean;
61
+ wrapped?: boolean;
62
+ }
63
+
64
+ export interface ExternalDocumentationObject {
65
+ description?: string;
66
+ url: string;
67
+ }
68
+
69
+ export interface DocFrontMatter extends DocusaurusDocFrontMatter {
70
+ /** Provides OpenAPI Docs with a reference path to their respective Info Doc */
71
+ info_path?: string;
72
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "../../tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "lib": ["ESNext", "DOM"],
5
+ "rootDir": "src",
6
+ "module": "CommonJS",
7
+ "target": "ESNext",
8
+ "noEmit": false,
9
+ "outDir": "lib",
10
+ "jsx": "react",
11
+ "paths": {
12
+ "@theme/*": ["./src/theme/*"]
13
+ }
14
+ },
15
+ "include": ["src"]
16
+ }