zudoku 0.0.0-e101786 → 0.0.0-e20b2e4
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.
- package/dist/app/entry.server.d.ts +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +18 -8
- package/dist/app/main.js.map +1 -1
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/dev/handler.js +7 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/loader.js +4 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/common.d.ts +217 -28
- package/dist/config/validators/common.js +15 -6
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +88 -12
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +1 -1
- package/dist/lib/authentication/providers/openid.js +10 -6
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +9 -0
- package/dist/lib/authentication/state.js +11 -0
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.js +5 -2
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +13 -0
- package/dist/lib/components/Autocomplete.js +47 -0
- package/dist/lib/components/Autocomplete.js.map +1 -0
- package/dist/lib/components/Header.js +4 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Markdown.d.ts +2 -2
- package/dist/lib/components/Markdown.js +3 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/PathRenderer.d.ts +11 -0
- package/dist/lib/components/PathRenderer.js +28 -0
- package/dist/lib/components/PathRenderer.js.map +1 -0
- package/dist/lib/components/StatusPage.d.ts +7 -0
- package/dist/lib/components/StatusPage.js +71 -0
- package/dist/lib/components/StatusPage.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/components/SyntaxHighlight.js +2 -2
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +2 -2
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/cache.d.ts +6 -0
- package/dist/lib/components/cache.js +13 -0
- package/dist/lib/components/cache.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +10 -3
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +14 -2
- package/dist/lib/components/index.js +10 -3
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +6 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +17 -15
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +1 -0
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -0
- package/dist/lib/core/RouteGuard.js +32 -0
- package/dist/lib/core/RouteGuard.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +4 -2
- package/dist/lib/core/ZudokuContext.js +9 -7
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +3 -0
- package/dist/lib/oas/graphql/circular.js +38 -0
- package/dist/lib/oas/graphql/circular.js.map +1 -0
- package/dist/lib/oas/graphql/index.d.ts +8 -0
- package/dist/lib/oas/graphql/index.js +61 -42
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.d.ts +0 -1
- package/dist/lib/oas/parser/dereference/index.js +1 -1
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.js +2 -1
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +8 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -6
- package/dist/lib/plugins/markdown/resolver.js +0 -29
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +3 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +6 -7
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/{Route.d.ts → OpenApiRoute.d.ts} +2 -1
- package/dist/lib/plugins/openapi/{Route.js → OpenApiRoute.js} +3 -4
- package/dist/lib/plugins/openapi/OpenApiRoute.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +4 -1
- package/dist/lib/plugins/openapi/OperationList.js +29 -19
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +3 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +2 -2
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -3
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +2 -0
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +11 -16
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +17 -14
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +6 -2
- package/dist/lib/plugins/openapi/graphql/gql.js +3 -2
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +66 -29
- package/dist/lib/plugins/openapi/graphql/graphql.js +33 -15
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +126 -61
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +12 -4
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +4 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +84 -5
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +9 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +5 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -11
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +22 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +61 -56
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +20 -29
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/{SchemaComponents.js → SchemaPropertyItem.js} +10 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +2 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Badge.js +1 -0
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +9 -1
- package/dist/lib/ui/Command.js +5 -1
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Input.d.ts +1 -2
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/joinUrl.d.ts +1 -0
- package/dist/lib/util/joinUrl.js +40 -0
- package/dist/lib/util/joinUrl.js.map +1 -0
- package/dist/lib/util/joinUrl.test.d.ts +1 -0
- package/dist/lib/util/joinUrl.test.js +43 -0
- package/dist/lib/util/joinUrl.test.js.map +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.d.ts +1 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js +14 -0
- package/dist/lib/util/scrollIntoViewIfNeeded.js.map +1 -0
- package/dist/lib/util/useLatest.d.ts +1 -0
- package/dist/lib/util/useLatest.js +15 -0
- package/dist/lib/util/useLatest.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
- package/dist/lib/util/useScrollToAnchor.js +27 -28
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +6 -4
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/build.js +15 -12
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +4 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +5 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.js +4 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -1
- package/dist/vite/plugin-api.js +153 -98
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +4 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +20 -9
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme-css.js +7 -4
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/{prerender.d.ts → prerender/FileWritingResponse.d.ts} +0 -6
- package/dist/vite/prerender/FileWritingResponse.js +42 -0
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +6 -0
- package/dist/vite/prerender/prerender.js +101 -0
- package/dist/vite/prerender/prerender.js.map +1 -0
- package/dist/vite/prerender/worker.d.ts +11 -0
- package/dist/vite/prerender/worker.js +21 -0
- package/dist/vite/prerender/worker.js.map +1 -0
- package/dist/vite/reporter.d.ts +3 -0
- package/dist/vite/reporter.js +33 -0
- package/dist/vite/reporter.js.map +1 -0
- package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
- package/dist/zuplo/enrich-with-zuplo.js +184 -0
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
- package/dist/zuplo/env.d.ts +1 -0
- package/dist/zuplo/env.js +3 -0
- package/dist/zuplo/env.js.map +1 -1
- package/dist/zuplo/policy-types.d.ts +33 -0
- package/dist/zuplo/policy-types.js +8 -0
- package/dist/zuplo/policy-types.js.map +1 -0
- package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
- package/dist/zuplo/with-zuplo-processors.js +26 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +1 -1
- package/dist/zuplo/with-zuplo.js +7 -26
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{AuthenticationPlugin-D7G3me8L.js → AuthenticationPlugin-DjnQ5hs7.js} +4 -4
- package/lib/{AuthenticationPlugin-D7G3me8L.js.map → AuthenticationPlugin-DjnQ5hs7.js.map} +1 -1
- package/lib/{CategoryHeading-CBconmtI.js → CategoryHeading-MYL1u_6K.js} +3 -3
- package/lib/{CategoryHeading-CBconmtI.js.map → CategoryHeading-MYL1u_6K.js.map} +1 -1
- package/lib/{Markdown-CZDLNOFc.js → Markdown-8mv9nhGd.js} +3391 -3403
- package/lib/Markdown-8mv9nhGd.js.map +1 -0
- package/lib/{MdxPage-DKMbBROv.js → MdxPage-ZX2oquWw.js} +61 -56
- package/lib/MdxPage-ZX2oquWw.js.map +1 -0
- package/lib/OpenApiRoute-BP9kzG5k.js +36 -0
- package/lib/OpenApiRoute-BP9kzG5k.js.map +1 -0
- package/lib/OperationList-c72qPMtm.js +5180 -0
- package/lib/OperationList-c72qPMtm.js.map +1 -0
- package/lib/Select-NSz0gku6.js +223 -0
- package/lib/Select-NSz0gku6.js.map +1 -0
- package/lib/{SlotletProvider-pfc9oejW.js → SlotletProvider-D0mFmGJu.js} +53 -53
- package/lib/{SlotletProvider-pfc9oejW.js.map → SlotletProvider-D0mFmGJu.js.map} +1 -1
- package/lib/{Button-DeAoTouo.js → Spinner-BlzrEEk1.js} +16 -13
- package/lib/Spinner-BlzrEEk1.js.map +1 -0
- package/lib/{SyntaxHighlight-Bz-lOJtH.js → SyntaxHighlight-B0L4SC_N.js} +390 -383
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +1 -0
- package/lib/{chunk-D52XG6IA-Dl7HLe6j.js → chunk-SYFQ2XB5-QijJrSf0.js} +409 -411
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +1 -0
- package/lib/circular-DxaIIlWD.js +15409 -0
- package/lib/circular-DxaIIlWD.js.map +1 -0
- package/lib/context-rwLGh-6_.js +22 -0
- package/lib/{context-h_UkBLvr.js.map → context-rwLGh-6_.js.map} +1 -1
- package/lib/{createServer-BznDkeSA.js → createServer-ZDNGmPfQ.js} +3611 -5736
- package/lib/createServer-ZDNGmPfQ.js.map +1 -0
- package/lib/hook-Dnj3SwPC.js +1455 -0
- package/lib/hook-Dnj3SwPC.js.map +1 -0
- package/lib/index-B7mqiOei.js +509 -0
- package/lib/index-B7mqiOei.js.map +1 -0
- package/lib/index-CZjcfK-H.js +2063 -0
- package/lib/index-CZjcfK-H.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-CjJS0l4l.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-CjJS0l4l.js.map} +1 -1
- package/lib/index-Djenk2Hj.js +36 -0
- package/lib/{index-CPNSgwSb.js.map → index-Djenk2Hj.js.map} +1 -1
- package/lib/{index-CBXSgjaE.js → index-Dl3Yl0yb.js} +65 -69
- package/lib/index-Dl3Yl0yb.js.map +1 -0
- package/lib/{index.esm-BSV1C092.js → index.esm-9-TF9KQB.js} +52 -52
- package/lib/{index.esm-BSV1C092.js.map → index.esm-9-TF9KQB.js.map} +1 -1
- package/lib/index.esm-CrSoEshU.js +1207 -0
- package/lib/index.esm-CrSoEshU.js.map +1 -0
- package/lib/joinUrl-nLx9pD-Z.js +20 -0
- package/lib/joinUrl-nLx9pD-Z.js.map +1 -0
- package/lib/{jsx-runtime-Dx-03ztt.js → jsx-runtime-Bdg6XQ1m.js} +135 -135
- package/lib/{jsx-runtime-Dx-03ztt.js.map → jsx-runtime-Bdg6XQ1m.js.map} +1 -1
- package/lib/mutation-ByGtmi0-.js +208 -0
- package/lib/mutation-ByGtmi0-.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +7 -7
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removeParameters.js +48 -0
- package/lib/post-processors/removeParameters.js.map +1 -0
- package/lib/{prism-bash.min-DadFsM4Z.js → prism-bash.min-HHIMdNJ_.js} +4 -4
- package/lib/{prism-bash.min-DadFsM4Z.js.map → prism-bash.min-HHIMdNJ_.js.map} +1 -1
- package/lib/{prism-csharp.min-DUwvItt4.js → prism-csharp.min-bQAo2pmx.js} +33 -33
- package/lib/{prism-csharp.min-DUwvItt4.js.map → prism-csharp.min-bQAo2pmx.js.map} +1 -1
- package/lib/{prism-java.min-BtgBR4yd.js → prism-java.min-BpvsOuIa.js} +12 -12
- package/lib/{prism-java.min-BtgBR4yd.js.map → prism-java.min-BpvsOuIa.js.map} +1 -1
- package/lib/{prism-markdown.min-F3U-vPBi.js → prism-markdown.min-C0Qn0m-5.js} +30 -30
- package/lib/{prism-markdown.min-F3U-vPBi.js.map → prism-markdown.min-C0Qn0m-5.js.map} +1 -1
- package/lib/{prism-ruby.min-DeDXCp1r.js → prism-ruby.min-Dx9KO9ds.js} +16 -16
- package/lib/{prism-ruby.min-DeDXCp1r.js.map → prism-ruby.min-Dx9KO9ds.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +10 -11
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +3 -2
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +2 -2
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +3 -3
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Command.js +125 -13
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +520 -519
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +7 -7
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +3 -3
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/{useExposedProps-DE9lR6MF.js → useExposedProps-Bbf99zic.js} +2 -2
- package/lib/{useExposedProps-DE9lR6MF.js.map → useExposedProps-Bbf99zic.js.map} +1 -1
- package/lib/useScrollToAnchor-DkVfWsxe.js +286 -0
- package/lib/useScrollToAnchor-DkVfWsxe.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +8 -10
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +18 -18
- package/lib/zudoku.auth-openid.js +224 -221
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +828 -940
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +18 -19
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +15 -16
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +23 -44
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/package.json +53 -49
- package/src/app/demo-cdn.html +31 -31
- package/src/app/entry.server.tsx +1 -1
- package/src/app/main.css +52 -51
- package/src/app/main.tsx +31 -8
- package/src/lib/authentication/providers/auth0.tsx +1 -4
- package/src/lib/authentication/providers/openid.tsx +12 -5
- package/src/lib/authentication/state.ts +18 -0
- package/src/lib/components/AnchorLink.tsx +5 -2
- package/src/lib/components/Autocomplete.tsx +113 -0
- package/src/lib/components/Header.tsx +4 -4
- package/src/lib/components/Markdown.tsx +14 -15
- package/src/lib/components/PathRenderer.tsx +61 -0
- package/src/lib/components/StatusPage.tsx +91 -0
- package/src/lib/components/SyntaxHighlight.tsx +14 -0
- package/src/lib/components/ThemeSwitch.tsx +2 -2
- package/src/lib/components/cache.ts +15 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
- package/src/lib/components/context/ZudokuContext.ts +16 -3
- package/src/lib/components/index.ts +14 -3
- package/src/lib/components/navigation/Sidebar.tsx +7 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +46 -43
- package/src/lib/components/navigation/SidebarItem.tsx +1 -0
- package/src/lib/core/RouteGuard.tsx +39 -0
- package/src/lib/core/ZudokuContext.ts +9 -8
- package/src/lib/oas/graphql/circular.ts +50 -0
- package/src/lib/oas/graphql/index.ts +95 -69
- package/src/lib/oas/parser/dereference/index.ts +1 -2
- package/src/lib/oas/parser/upgrade/index.ts +2 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
- package/src/lib/plugins/markdown/resolver.ts +0 -33
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/Endpoint.tsx +11 -9
- package/src/lib/plugins/openapi/{Route.tsx → OpenApiRoute.tsx} +3 -3
- package/src/lib/plugins/openapi/OperationList.tsx +47 -19
- package/src/lib/plugins/openapi/OperationListItem.tsx +7 -4
- package/src/lib/plugins/openapi/ParameterListItem.tsx +3 -6
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +11 -1
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +2 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +27 -34
- package/src/lib/plugins/openapi/SidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +24 -24
- package/src/lib/plugins/openapi/graphql/gql.ts +12 -4
- package/src/lib/plugins/openapi/graphql/graphql.ts +92 -45
- package/src/lib/plugins/openapi/index.tsx +163 -78
- package/src/lib/plugins/openapi/interfaces.ts +16 -12
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +165 -36
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +13 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +35 -75
- package/src/lib/plugins/openapi/playground/Playground.tsx +251 -213
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +6 -3
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +84 -114
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
- package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
- package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
- package/src/lib/plugins/openapi/schema/{SchemaComponents.tsx → SchemaPropertyItem.tsx} +11 -7
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +4 -1
- package/src/lib/plugins/openapi/schema/utils.ts +4 -0
- package/src/lib/ui/Badge.tsx +1 -0
- package/src/lib/ui/Command.tsx +20 -0
- package/src/lib/ui/Input.tsx +1 -2
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +2 -1
- package/src/lib/util/joinUrl.test.ts +62 -0
- package/src/lib/util/joinUrl.ts +57 -0
- package/src/lib/util/scrollIntoViewIfNeeded.ts +18 -0
- package/src/lib/util/useLatest.ts +18 -0
- package/src/lib/util/useScrollToAnchor.ts +33 -34
- package/src/lib/util/useScrollToTop.ts +8 -3
- package/dist/lib/plugins/openapi/Route.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
- package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
- package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +0 -1
- package/dist/vite/prerender.js +0 -89
- package/dist/vite/prerender.js.map +0 -1
- package/lib/AnchorLink-DFZZbmvr.js +0 -34
- package/lib/AnchorLink-DFZZbmvr.js.map +0 -1
- package/lib/Button-DeAoTouo.js.map +0 -1
- package/lib/Command-9x_kZHr4.js +0 -611
- package/lib/Command-9x_kZHr4.js.map +0 -1
- package/lib/Markdown-CZDLNOFc.js.map +0 -1
- package/lib/MdxPage-DKMbBROv.js.map +0 -1
- package/lib/OperationList-DFa3DqhW.js +0 -5143
- package/lib/OperationList-DFa3DqhW.js.map +0 -1
- package/lib/Route-DYwKZ_c_.js +0 -35
- package/lib/Route-DYwKZ_c_.js.map +0 -1
- package/lib/Select-B_IxRUUC.js +0 -223
- package/lib/Select-B_IxRUUC.js.map +0 -1
- package/lib/Spinner-DuxJLLNE.js +0 -7
- package/lib/Spinner-DuxJLLNE.js.map +0 -1
- package/lib/StaggeredRender-DgsamH_G.js +0 -17
- package/lib/StaggeredRender-DgsamH_G.js.map +0 -1
- package/lib/SyntaxHighlight-Bz-lOJtH.js.map +0 -1
- package/lib/ZudokuContext-hmLMUdf2.js +0 -1217
- package/lib/ZudokuContext-hmLMUdf2.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +0 -1
- package/lib/context-h_UkBLvr.js +0 -22
- package/lib/createServer-BznDkeSA.js.map +0 -1
- package/lib/hook-CHq7pFyz.js +0 -227
- package/lib/hook-CHq7pFyz.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-CBXSgjaE.js.map +0 -1
- package/lib/index-CPNSgwSb.js +0 -36
- package/lib/index-PqKef_jH.js +0 -1292
- package/lib/index-PqKef_jH.js.map +0 -1
- package/lib/index-TaRXY2w1.js +0 -43
- package/lib/index-TaRXY2w1.js.map +0 -1
- package/lib/index.esm-BnnBRKJX.js +0 -1214
- package/lib/index.esm-BnnBRKJX.js.map +0 -1
- package/lib/state-CFQsUZUP.js +0 -202
- package/lib/state-CFQsUZUP.js.map +0 -1
- package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
- /package/dist/lib/plugins/openapi/schema/{SchemaComponents.d.ts → SchemaPropertyItem.d.ts} +0 -0
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { OperationListItemResult } from "./OperationList.js";
|
|
2
|
-
|
|
2
|
+
import { Content } from "./SidecarExamples.js";
|
|
3
|
+
export declare const PlaygroundDialogWrapper: ({ server, servers, operation, examples, }: {
|
|
3
4
|
server: string;
|
|
4
5
|
servers?: string[];
|
|
5
6
|
operation: OperationListItemResult;
|
|
7
|
+
examples?: Content;
|
|
6
8
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { PlaygroundDialog } from "./playground/PlaygroundDialog.js";
|
|
3
|
-
export const PlaygroundDialogWrapper = ({ server, servers, operation, }) => {
|
|
3
|
+
export const PlaygroundDialogWrapper = ({ server, servers, operation, examples, }) => {
|
|
4
4
|
const headers = operation.parameters
|
|
5
5
|
?.filter((p) => p.in === "header")
|
|
6
|
+
.sort((a, b) => (a.required && !b.required ? -1 : 1))
|
|
6
7
|
.map((p) => ({
|
|
7
8
|
name: p.name,
|
|
8
|
-
defaultValue: p.examples?.find((x) => x.value)?.value ?? "",
|
|
9
|
+
defaultValue: p.schema?.default ?? p.examples?.find((x) => x.value)?.value ?? "",
|
|
10
|
+
defaultActive: p.required ?? false,
|
|
11
|
+
isRequired: p.required ?? false,
|
|
12
|
+
enum: p.schema?.type == "array" ? p.schema?.items?.enum : p.schema?.enum,
|
|
13
|
+
type: p.schema?.type ?? "string",
|
|
9
14
|
}));
|
|
10
15
|
const queryParams = operation.parameters
|
|
11
16
|
?.filter((p) => p.in === "query")
|
|
@@ -20,6 +25,6 @@ export const PlaygroundDialogWrapper = ({ server, servers, operation, }) => {
|
|
|
20
25
|
const pathParams = operation.parameters
|
|
21
26
|
?.filter((p) => p.in === "path")
|
|
22
27
|
.map((p) => ({ name: p.name }));
|
|
23
|
-
return (_jsx(PlaygroundDialog, { server: server, servers: servers, method: operation.method, url: operation.path, headers: headers, queryParams: queryParams, pathParams: pathParams }));
|
|
28
|
+
return (_jsx(PlaygroundDialog, { server: server, servers: servers, method: operation.method, url: operation.path, headers: headers, queryParams: queryParams, pathParams: pathParams, examples: examples }));
|
|
24
29
|
};
|
|
25
30
|
//# sourceMappingURL=PlaygroundDialogWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaygroundDialogWrapper.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"PlaygroundDialogWrapper.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACtC,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,GAMT,EAAE,EAAE;IACH,MAAM,OAAO,GAAG,SAAS,CAAC,UAAU;QAClC,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC;SACjC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACpD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACX,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,YAAY,EACV,CAAC,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,EAAE;QACpE,aAAa,EAAE,CAAC,CAAC,QAAQ,IAAI,KAAK;QAClC,UAAU,EAAE,CAAC,CAAC,QAAQ,IAAI,KAAK;QAC/B,IAA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AC,CAAC,CAAC;IAElC,OAAO,CACL,KAAC,gBAAgB,IACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,CAAC,MAAM,EACxB,GAAG,EAAE,SAAS,CAAC,IAAI,EACnB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -2,4 +2,4 @@ import { type Content } from "./SidecarExamples.js";
|
|
|
2
2
|
export declare const RequestBodySidecarBox: ({ content, onExampleChange, }: {
|
|
3
3
|
content: Content;
|
|
4
4
|
onExampleChange?: (example: unknown) => void;
|
|
5
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -2,6 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as SidecarBox from "./SidecarBox.js";
|
|
3
3
|
import { SidecarExamples } from "./SidecarExamples.js";
|
|
4
4
|
export const RequestBodySidecarBox = ({ content, onExampleChange, }) => {
|
|
5
|
+
if (content.length === 0)
|
|
6
|
+
return null;
|
|
5
7
|
return (_jsxs(SidecarBox.Root, { children: [_jsx(SidecarBox.Head, { className: "text-xs flex justify-between items-center", children: _jsx("span", { className: "font-mono", children: "Request Body Example" }) }), _jsx(SidecarExamples, { content: content, onExampleChange: onExampleChange })] }));
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=RequestBodySidecarBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestBodySidecarBox.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/RequestBodySidecarBox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAgB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,OAAO,EACP,eAAe,GAIhB,EAAE,EAAE;IACH,OAAO,CACL,MAAC,UAAU,CAAC,IAAI,eACd,KAAC,UAAU,CAAC,IAAI,IAAC,SAAS,EAAC,2CAA2C,YACpE,eAAM,SAAS,EAAC,WAAW,qCAA4B,GACvC,EAClB,KAAC,eAAe,IAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,GAAI,IACvD,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"RequestBodySidecarBox.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/RequestBodySidecarBox.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAgB,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAErE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EACpC,OAAO,EACP,eAAe,GAIhB,EAAE,EAAE;IACH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,OAAO,CACL,MAAC,UAAU,CAAC,IAAI,eACd,KAAC,UAAU,CAAC,IAAI,IAAC,SAAS,EAAC,2CAA2C,YACpE,eAAM,SAAS,EAAC,WAAW,qCAA4B,GACvC,EAClB,KAAC,eAAe,IAAC,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,eAAe,GAAI,IACvD,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
3
3
|
import { HTTPSnippet } from "@zudoku/httpsnippet";
|
|
4
|
-
import {
|
|
4
|
+
import { useMemo, useState, useTransition } from "react";
|
|
5
5
|
import { useSearchParams } from "react-router";
|
|
6
|
-
import {
|
|
6
|
+
import { useSelectedServer } from "../../authentication/state.js";
|
|
7
|
+
import { PathRenderer } from "../../components/PathRenderer.js";
|
|
7
8
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
8
9
|
import { cn } from "../../util/cn.js";
|
|
9
10
|
import { useOnScreen } from "../../util/useOnScreen.js";
|
|
@@ -85,25 +86,19 @@ const EXAMPLE_LANGUAGES = [
|
|
|
85
86
|
{ value: "swift", label: "Swift" },
|
|
86
87
|
];
|
|
87
88
|
export const Sidecar = ({ operation, selectedResponse, onSelectResponse, }) => {
|
|
88
|
-
const { input, type } = useOasConfig();
|
|
89
|
+
const { input, type, options } = useOasConfig();
|
|
89
90
|
const query = useCreateQuery(GetServerQuery, { input, type });
|
|
90
91
|
const result = useSuspenseQuery(query);
|
|
91
92
|
const methodTextColor = methodForColor(operation.method);
|
|
92
93
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
93
94
|
const [, startTransition] = useTransition();
|
|
94
95
|
const [selectedExample, setSelectedExample] = useState();
|
|
95
|
-
const selectedLang = searchParams.get("lang") ?? "shell";
|
|
96
|
+
const selectedLang = searchParams.get("lang") ?? options?.examplesDefaultLanguage ?? "shell";
|
|
96
97
|
const requestBodyContent = operation.requestBody?.content;
|
|
97
|
-
const path = operation.path
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
102
|
-
_jsxs(Fragment, { children: [paramName ? (_jsx(ColorizedParam, { name: paramName, backgroundOpacity: "0",
|
|
103
|
-
// same as in `ParameterListItem`
|
|
104
|
-
slug: `${operation.slug}-${paramName.toLocaleLowerCase()}`, children: part })) : (part), i < arr.length - 1 ? "/" : null, _jsx("wbr", {})] }, part + i));
|
|
105
|
-
});
|
|
106
|
-
const { selectedServer } = useSelectedServerStore();
|
|
98
|
+
const path = (_jsx(PathRenderer, { path: operation.path, renderParam: ({ name }) => (_jsx(ColorizedParam, { name: name, backgroundOpacity: "0",
|
|
99
|
+
// same as in `ParameterListItem`
|
|
100
|
+
slug: `${operation.slug}-${name}`, children: `{${name}}` })) }));
|
|
101
|
+
const { selectedServer } = useSelectedServer(result.data.schema.servers);
|
|
107
102
|
const code = useMemo(() => {
|
|
108
103
|
const example = selectedExample ??
|
|
109
104
|
(requestBodyContent?.[0]?.schema
|
|
@@ -111,7 +106,7 @@ export const Sidecar = ({ operation, selectedResponse, onSelectResponse, }) => {
|
|
|
111
106
|
: undefined);
|
|
112
107
|
const snippet = new HTTPSnippet({
|
|
113
108
|
method: operation.method.toLocaleUpperCase(),
|
|
114
|
-
url:
|
|
109
|
+
url: selectedServer +
|
|
115
110
|
operation.path.replaceAll("{", ":").replaceAll("}", ""),
|
|
116
111
|
postData: example
|
|
117
112
|
? {
|
|
@@ -137,7 +132,7 @@ export const Sidecar = ({ operation, selectedResponse, onSelectResponse, }) => {
|
|
|
137
132
|
selectedLang,
|
|
138
133
|
]);
|
|
139
134
|
const [ref, isOnScreen] = useOnScreen({ rootMargin: "200px 0px 200px 0px" });
|
|
140
|
-
return (_jsxs("aside", { ref: ref, className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4", children: [_jsxs(SidecarBox.Root, { children: [_jsxs(SidecarBox.Head, { className: "flex justify-between items-center flex-nowrap py-
|
|
135
|
+
return (_jsxs("aside", { ref: ref, className: "flex flex-col overflow-hidden sticky top-[--scroll-padding] gap-4", children: [_jsxs(SidecarBox.Root, { children: [_jsxs(SidecarBox.Head, { className: "flex justify-between items-center flex-nowrap py-2.5 gap-2 text-xs", children: [_jsxs("span", { className: "font-mono break-words", children: [_jsx("span", { className: cn("font-semibold", methodTextColor), children: operation.method.toLocaleUpperCase() }), "\u00A0", path] }), isOnScreen && (_jsx(PlaygroundDialogWrapper, { server: selectedServer, servers: result.data.schema.servers.map((server) => server.url), operation: operation, examples: requestBodyContent ?? undefined }))] }), isOnScreen && (_jsxs(_Fragment, { children: [_jsx(SidecarBox.Body, { className: "p-0", children: _jsx(CollapsibleCode, { children: _jsx(SyntaxHighlight, { language: selectedLang, noBackground: true, className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2", code: code }) }) }), _jsxs(SidecarBox.Footer, { className: "flex items-center text-xs gap-2 justify-end py-2.5", children: [_jsx("span", { children: "Show example in" }), _jsx(SimpleSelect, { className: "self-start max-w-[150px]", value: selectedLang, onChange: (e) => {
|
|
141
136
|
startTransition(() => {
|
|
142
137
|
setSearchParams((prev) => {
|
|
143
138
|
prev.set("lang", e.target.value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidecar.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/Sidecar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Sidecar.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/Sidecar.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO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CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;oDACjC,OAAO,IAAI,CAAC;gDACd,CAAC,CAAC,CAAC;4CACL,CAAC,CAAC,CAAC;wCACL,CAAC,EACD,OAAO,EAAE,iBAAiB,GAC1B,IACgB,IACnB,CACJ,IACe,EACjB,UAAU,IAAI,kBAAkB,IAAI,CACnC,KAAC,qBAAqB,IACpB,OAAO,EAAE,kBAAkB,EAC3B,eAAe,EAAE,kBAAkB,GACnC,CACH,EACA,UAAU,IAAI,SAAS,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,CAC/C,KAAC,mBAAmB,IAClB,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,CAAC,SAAS,GAC9B,CACH,IACK,CACT,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../util/cn.js";
|
|
3
3
|
export const Root = ({ children, className }) => (_jsx("div", { className: cn("rounded-xl overflow-hidden border border-border", className), children: children }));
|
|
4
|
-
export const Head = ({ children, className }) => (_jsx("div", { className: cn("border-b bg-muted dark:bg-transparent text-card-foreground p-3", className), children: children }));
|
|
4
|
+
export const Head = ({ children, className }) => (_jsx("div", { className: cn("border-b bg-muted dark:bg-transparent text-card-foreground p-3 py-2.5", className), children: children }));
|
|
5
5
|
export const Body = ({ children, className }) => (_jsx("div", { className: cn("bg-card overflow-auto p-2", className), children: children }));
|
|
6
6
|
export const Footer = ({ children, className }) => (_jsx("div", { className: cn("border-t bg-muted dark:bg-transparent p-3", className), children: children }));
|
|
7
7
|
//# sourceMappingURL=SidecarBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidecarBox.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/SidecarBox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE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1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
2
|
+
import { useEffect, useMemo, useState } from "react";
|
|
3
3
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
4
4
|
import { CollapsibleCode } from "./CollapsibleCode.js";
|
|
5
5
|
import * as SidecarBox from "./SidecarBox.js";
|
|
@@ -35,23 +35,26 @@ export const SidecarExamples = ({ content, description, onExampleChange, }) => {
|
|
|
35
35
|
// Get example value, with fallback to schema-generated example
|
|
36
36
|
const examples = effectiveContent?.examples ?? [];
|
|
37
37
|
const selectedExample = examples[selectedExampleIndex];
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
const exampleValue = useMemo(() => {
|
|
39
|
+
if (selectedExample) {
|
|
40
|
+
// If it's a wrapped example with a value field, use that
|
|
41
|
+
return "value" in selectedExample
|
|
42
|
+
? selectedExample.value
|
|
43
|
+
: selectedExample;
|
|
44
|
+
}
|
|
45
|
+
else if (effectiveContent?.schema) {
|
|
46
|
+
// No example provided, generate one from schema
|
|
47
|
+
return generateSchemaExample(effectiveContent.schema);
|
|
48
|
+
}
|
|
49
|
+
}, [selectedExample, effectiveContent?.schema]);
|
|
48
50
|
useEffect(() => {
|
|
51
|
+
if (!exampleValue)
|
|
52
|
+
return;
|
|
49
53
|
onExampleChange?.(exampleValue);
|
|
50
54
|
}, [exampleValue, onExampleChange]);
|
|
51
55
|
const formattedExample = formatForDisplay(exampleValue);
|
|
52
56
|
const language = getLanguage(effectiveContent?.mediaType);
|
|
53
|
-
|
|
54
|
-
return (_jsxs(_Fragment, { children: [_jsxs(SidecarBox.Body, { className: "p-0", children: [selectedExample?.externalValue ? (_jsx("div", { className: "p-2", children: _jsx("a", { href: selectedExample.externalValue, target: "_blank", rel: "noopener noreferrer", className: "text-xs text-primary hover:underline", children: "View External Example \u2192" }) })) : (_jsx(CollapsibleCode, { children: _jsx(SyntaxHighlight, { language: language, noBackground: true, copyable: true, className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2", code: formattedExample }) })), selectedExample?.description && (_jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: selectedExample.description }))] }), hasContent && (_jsxs(SidecarBox.Footer, { className: "text-xs p-0", children: [description && (_jsx("div", { className: "text-muted-foreground text-xs border-b px-3 py-2", children: description })), _jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [_jsx("div", { className: "flex items-center gap-2 min-w-0", children: content.length > 1 ? (_jsx(SimpleSelect, { className: "max-w-[200px]", value: selectedContentTypeIndex.toString(), onChange: (e) => setSelectedContentTypeIndex(Number(e.target.value)), options: content.map((c, index) => ({
|
|
57
|
+
return (_jsxs(_Fragment, { children: [_jsxs(SidecarBox.Body, { className: "p-0", children: [selectedExample?.externalValue ? (_jsx("div", { className: "p-2", children: _jsx("a", { href: selectedExample.externalValue, target: "_blank", rel: "noopener noreferrer", className: "text-xs text-primary hover:underline", children: "View External Example \u2192" }) })) : (_jsx(CollapsibleCode, { children: _jsx(SyntaxHighlight, { language: language, noBackground: true, copyable: true, className: "[--scrollbar-color:gray] text-xs max-h-[500px] p-2", code: formattedExample }) })), selectedExample?.description && (_jsx("div", { className: "border-t text-xs px-3 py-1.5 text-muted-foreground", children: selectedExample.description }))] }), _jsxs(SidecarBox.Footer, { className: "text-xs p-0 divide-y divide-border", children: [description && (_jsx("div", { className: "text-muted-foreground text-xs px-3 py-2", children: description })), (examples.length !== 0 || content.length !== 0) && (_jsxs("div", { className: "flex items-center gap-2 justify-between min-w-0 px-3 py-2", children: [_jsx("div", { className: "flex items-center gap-2 min-w-0", children: content.length > 1 ? (_jsx(SimpleSelect, { className: "max-w-[200px]", value: selectedContentTypeIndex.toString(), onChange: (e) => setSelectedContentTypeIndex(Number(e.target.value)), options: content.map((c, index) => ({
|
|
55
58
|
value: index.toString(),
|
|
56
59
|
label: c.mediaType,
|
|
57
60
|
})) })) : (_jsx("span", { className: "font-mono text-[11px]", children: content[0]?.mediaType })) }), examples.length > 1 && (_jsx("div", { className: "flex items-center gap-1", children: _jsx(SimpleSelect, { className: "max-w-[180px]", value: selectedExampleIndex.toString(), onChange: (e) => setSelectedExampleIndex(Number(e.target.value)), options: examples.map((example, index) => ({
|
|
@@ -60,6 +63,6 @@ export const SidecarExamples = ({ content, description, onExampleChange, }) => {
|
|
|
60
63
|
example.name ||
|
|
61
64
|
example.description ||
|
|
62
65
|
`Example ${index + 1}`,
|
|
63
|
-
})) }) }))] })] })
|
|
66
|
+
})) }) }))] }))] })] }));
|
|
64
67
|
};
|
|
65
68
|
//# sourceMappingURL=SidecarExamples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidecarExamples.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/SidecarExamples.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SidecarExamples.js","sourceRoot":"","sources":["../../../../src/lib/plugins/openapi/SidecarExamples.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AASxE,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAU,EAAE;IAClD,IAAI,KAAK,IAAI,IAAI;QAAE,O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EAAE;wCACvB,KAAK,EACH,OAAO,CAAC,OAAO;4CACf,OAAO,CAAC,IAAI;4CACZ,OAAO,CAAC,WAAW;4CACnB,WAAW,KAAK,GAAG,CAAC,EAAE;qCACzB,CAAC,CAAC,GACH,GACE,CACP,IACG,CACP,IACiB,IACnB,CACJ,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -9,7 +9,7 @@ export declare function graphql(source: "\n fragment OperationsFragment on Oper
|
|
|
9
9
|
/**
|
|
10
10
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
11
11
|
*/
|
|
12
|
-
export declare function graphql(source: "\n query AllOperations($input: JSON
|
|
12
|
+
export declare function graphql(source: "\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n"): typeof import("./graphql.js").AllOperationsDocument;
|
|
13
13
|
/**
|
|
14
14
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
15
15
|
*/
|
|
@@ -17,4 +17,8 @@ export declare function graphql(source: "\n query getServerQuery($input: JSON!,
|
|
|
17
17
|
/**
|
|
18
18
|
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
19
19
|
*/
|
|
20
|
-
export declare function graphql(source: "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n
|
|
20
|
+
export declare function graphql(source: "\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n"): typeof import("./graphql.js").GetCategoriesDocument;
|
|
21
|
+
/**
|
|
22
|
+
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
|
23
|
+
*/
|
|
24
|
+
export declare function graphql(source: "\n query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {\n schema(input: $input, type: $type) {\n operations(tag: $tag) {\n slug\n deprecated\n method\n summary\n operationId\n path\n tags {\n name\n }\n }\n untagged: operations(untagged: true) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n"): typeof import("./graphql.js").GetOperationsDocument;
|
|
@@ -14,9 +14,10 @@ import * as types from "./graphql.js";
|
|
|
14
14
|
const documents = {
|
|
15
15
|
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": types.ServersQueryDocument,
|
|
16
16
|
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": types.OperationsFragmentFragmentDoc,
|
|
17
|
-
"\n query AllOperations($input: JSON
|
|
17
|
+
"\n query AllOperations(\n $input: JSON!\n $type: SchemaType!\n $tag: String\n $untagged: Boolean\n ) {\n schema(input: $input, type: $type) {\n servers {\n url\n }\n description\n summary\n title\n url\n version\n tags(name: $tag) {\n name\n description\n }\n operations(tag: $tag, untagged: $untagged) {\n slug\n ...OperationsFragment\n }\n }\n }\n": types.AllOperationsDocument,
|
|
18
18
|
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": types.GetServerQueryDocument,
|
|
19
|
-
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n
|
|
19
|
+
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n name\n }\n }\n }\n": types.GetCategoriesDocument,
|
|
20
|
+
"\n query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {\n schema(input: $input, type: $type) {\n operations(tag: $tag) {\n slug\n deprecated\n method\n summary\n operationId\n path\n tags {\n name\n }\n }\n untagged: operations(untagged: true) {\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n": types.GetOperationsDocument,
|
|
20
21
|
};
|
|
21
22
|
export function graphql(source) {
|
|
22
23
|
return documents[source] ?? {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/graphql/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,SAAS,GAAG;IAChB,uKAAuK,EACrK,KAAK,CAAC,oBAAoB;IAC5B,m+BAAm+B,EACj+B,KAAK,CAAC,6BAA6B;IACrC,
|
|
1
|
+
{"version":3,"file":"gql.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/graphql/gql.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAM,SAAS,GAAG;IAChB,uKAAuK,EACrK,KAAK,CAAC,oBAAoB;IAC5B,m+BAAm+B,EACj+B,KAAK,CAAC,6BAA6B;IACrC,8cAA8c,EAC5c,KAAK,CAAC,qBAAqB;IAC7B,yKAAyK,EACvK,KAAK,CAAC,sBAAsB;IAC9B,sKAAsK,EACpK,KAAK,CAAC,qBAAqB;IAC7B,0dAA0d,EACxd,KAAK,CAAC,qBAAqB;CAC9B,CAAC;AAuCF,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,OAAQ,SAAiB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAC1C,CAAC"}
|
|
@@ -52,6 +52,11 @@ export type Scalars = {
|
|
|
52
52
|
input: any;
|
|
53
53
|
output: any;
|
|
54
54
|
};
|
|
55
|
+
/** OpenAPI schema scalar type that handles circular references */
|
|
56
|
+
JSONSchema: {
|
|
57
|
+
input: any;
|
|
58
|
+
output: any;
|
|
59
|
+
};
|
|
55
60
|
};
|
|
56
61
|
export type EncodingItem = {
|
|
57
62
|
__typename?: "EncodingItem";
|
|
@@ -75,7 +80,7 @@ export type MediaTypeObject = {
|
|
|
75
80
|
encoding?: Maybe<Array<EncodingItem>>;
|
|
76
81
|
examples?: Maybe<Array<ExampleItem>>;
|
|
77
82
|
mediaType: Scalars["String"]["output"];
|
|
78
|
-
schema?: Maybe<Scalars["
|
|
83
|
+
schema?: Maybe<Scalars["JSONSchema"]["output"]>;
|
|
79
84
|
};
|
|
80
85
|
export type OperationItem = {
|
|
81
86
|
__typename?: "OperationItem";
|
|
@@ -104,7 +109,7 @@ export type ParameterItem = {
|
|
|
104
109
|
in: ParameterIn;
|
|
105
110
|
name: Scalars["String"]["output"];
|
|
106
111
|
required?: Maybe<Scalars["Boolean"]["output"]>;
|
|
107
|
-
schema?: Maybe<Scalars["
|
|
112
|
+
schema?: Maybe<Scalars["JSONSchema"]["output"]>;
|
|
108
113
|
style?: Maybe<Scalars["String"]["output"]>;
|
|
109
114
|
};
|
|
110
115
|
export type PathItem = {
|
|
@@ -141,17 +146,18 @@ export type Schema = {
|
|
|
141
146
|
operations: Array<OperationItem>;
|
|
142
147
|
paths: Array<PathItem>;
|
|
143
148
|
servers: Array<Server>;
|
|
149
|
+
summary?: Maybe<Scalars["String"]["output"]>;
|
|
144
150
|
tags: Array<SchemaTag>;
|
|
145
151
|
title: Scalars["String"]["output"];
|
|
146
|
-
url
|
|
152
|
+
url?: Maybe<Scalars["String"]["output"]>;
|
|
147
153
|
version: Scalars["String"]["output"];
|
|
148
|
-
summary?: Maybe<Scalars["String"]["output"]>;
|
|
149
154
|
};
|
|
150
155
|
export type SchemaOperationsArgs = {
|
|
151
156
|
method?: InputMaybe<Scalars["String"]["input"]>;
|
|
152
157
|
operationId?: InputMaybe<Scalars["String"]["input"]>;
|
|
153
158
|
path?: InputMaybe<Scalars["String"]["input"]>;
|
|
154
159
|
tag?: InputMaybe<Scalars["String"]["input"]>;
|
|
160
|
+
untagged?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
155
161
|
};
|
|
156
162
|
export type SchemaTagsArgs = {
|
|
157
163
|
name?: InputMaybe<Scalars["String"]["input"]>;
|
|
@@ -159,7 +165,7 @@ export type SchemaTagsArgs = {
|
|
|
159
165
|
export type SchemaTag = {
|
|
160
166
|
__typename?: "SchemaTag";
|
|
161
167
|
description?: Maybe<Scalars["String"]["output"]>;
|
|
162
|
-
name
|
|
168
|
+
name: Scalars["String"]["output"];
|
|
163
169
|
operations: Array<OperationItem>;
|
|
164
170
|
};
|
|
165
171
|
export type SchemaType = "file" | "raw" | "url";
|
|
@@ -181,7 +187,7 @@ export type ServersQueryQuery = {
|
|
|
181
187
|
__typename?: "Query";
|
|
182
188
|
schema: {
|
|
183
189
|
__typename?: "Schema";
|
|
184
|
-
url
|
|
190
|
+
url?: string | null;
|
|
185
191
|
servers: Array<{
|
|
186
192
|
__typename?: "Server";
|
|
187
193
|
url: string;
|
|
@@ -265,6 +271,8 @@ export type OperationsFragmentFragment = {
|
|
|
265
271
|
export type AllOperationsQueryVariables = Exact<{
|
|
266
272
|
input: Scalars["JSON"]["input"];
|
|
267
273
|
type: SchemaType;
|
|
274
|
+
tag?: InputMaybe<Scalars["String"]["input"]>;
|
|
275
|
+
untagged?: InputMaybe<Scalars["Boolean"]["input"]>;
|
|
268
276
|
}>;
|
|
269
277
|
export type AllOperationsQuery = {
|
|
270
278
|
__typename?: "Query";
|
|
@@ -273,20 +281,24 @@ export type AllOperationsQuery = {
|
|
|
273
281
|
description?: string | null;
|
|
274
282
|
summary?: string | null;
|
|
275
283
|
title: string;
|
|
276
|
-
url
|
|
284
|
+
url?: string | null;
|
|
277
285
|
version: string;
|
|
286
|
+
servers: Array<{
|
|
287
|
+
__typename?: "Server";
|
|
288
|
+
url: string;
|
|
289
|
+
}>;
|
|
278
290
|
tags: Array<{
|
|
279
291
|
__typename?: "SchemaTag";
|
|
280
|
-
name
|
|
292
|
+
name: string;
|
|
281
293
|
description?: string | null;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
}
|
|
294
|
+
}>;
|
|
295
|
+
operations: Array<{
|
|
296
|
+
__typename?: "OperationItem";
|
|
297
|
+
slug: string;
|
|
298
|
+
} & {
|
|
299
|
+
" $fragmentRefs"?: {
|
|
300
|
+
OperationsFragmentFragment: OperationsFragmentFragment;
|
|
301
|
+
};
|
|
290
302
|
}>;
|
|
291
303
|
};
|
|
292
304
|
};
|
|
@@ -298,7 +310,7 @@ export type GetServerQueryQuery = {
|
|
|
298
310
|
__typename?: "Query";
|
|
299
311
|
schema: {
|
|
300
312
|
__typename?: "Schema";
|
|
301
|
-
url
|
|
313
|
+
url?: string | null;
|
|
302
314
|
servers: Array<{
|
|
303
315
|
__typename?: "Server";
|
|
304
316
|
url: string;
|
|
@@ -313,19 +325,43 @@ export type GetCategoriesQuery = {
|
|
|
313
325
|
__typename?: "Query";
|
|
314
326
|
schema: {
|
|
315
327
|
__typename?: "Schema";
|
|
316
|
-
url
|
|
328
|
+
url?: string | null;
|
|
317
329
|
tags: Array<{
|
|
318
|
-
__typename
|
|
319
|
-
name
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
330
|
+
__typename?: "SchemaTag";
|
|
331
|
+
name: string;
|
|
332
|
+
}>;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
export type GetOperationsQueryVariables = Exact<{
|
|
336
|
+
input: Scalars["JSON"]["input"];
|
|
337
|
+
type: SchemaType;
|
|
338
|
+
tag?: InputMaybe<Scalars["String"]["input"]>;
|
|
339
|
+
}>;
|
|
340
|
+
export type GetOperationsQuery = {
|
|
341
|
+
__typename?: "Query";
|
|
342
|
+
schema: {
|
|
343
|
+
__typename?: "Schema";
|
|
344
|
+
operations: Array<{
|
|
345
|
+
__typename?: "OperationItem";
|
|
346
|
+
slug: string;
|
|
347
|
+
deprecated?: boolean | null;
|
|
348
|
+
method: string;
|
|
349
|
+
summary?: string | null;
|
|
350
|
+
operationId?: string | null;
|
|
351
|
+
path: string;
|
|
352
|
+
tags?: Array<{
|
|
353
|
+
__typename?: "TagItem";
|
|
354
|
+
name: string;
|
|
355
|
+
}> | null;
|
|
356
|
+
}>;
|
|
357
|
+
untagged: Array<{
|
|
358
|
+
__typename?: "OperationItem";
|
|
359
|
+
slug: string;
|
|
360
|
+
deprecated?: boolean | null;
|
|
361
|
+
method: string;
|
|
362
|
+
summary?: string | null;
|
|
363
|
+
operationId?: string | null;
|
|
364
|
+
path: string;
|
|
329
365
|
}>;
|
|
330
366
|
};
|
|
331
367
|
};
|
|
@@ -341,3 +377,4 @@ export declare const ServersQueryDocument: TypedDocumentString<ServersQueryQuery
|
|
|
341
377
|
export declare const AllOperationsDocument: TypedDocumentString<AllOperationsQuery, AllOperationsQueryVariables>;
|
|
342
378
|
export declare const GetServerQueryDocument: TypedDocumentString<GetServerQueryQuery, GetServerQueryQueryVariables>;
|
|
343
379
|
export declare const GetCategoriesDocument: TypedDocumentString<GetCategoriesQuery, GetCategoriesQueryVariables>;
|
|
380
|
+
export declare const GetOperationsDocument: TypedDocumentString<GetOperationsQuery, GetOperationsQueryVariables>;
|
|
@@ -85,20 +85,23 @@ export const ServersQueryDocument = new TypedDocumentString(`
|
|
|
85
85
|
}
|
|
86
86
|
`);
|
|
87
87
|
export const AllOperationsDocument = new TypedDocumentString(`
|
|
88
|
-
query AllOperations($input: JSON!, $type: SchemaType
|
|
88
|
+
query AllOperations($input: JSON!, $type: SchemaType!, $tag: String, $untagged: Boolean) {
|
|
89
89
|
schema(input: $input, type: $type) {
|
|
90
|
+
servers {
|
|
91
|
+
url
|
|
92
|
+
}
|
|
90
93
|
description
|
|
91
94
|
summary
|
|
92
95
|
title
|
|
93
96
|
url
|
|
94
97
|
version
|
|
95
|
-
tags {
|
|
98
|
+
tags(name: $tag) {
|
|
96
99
|
name
|
|
97
100
|
description
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
101
|
+
}
|
|
102
|
+
operations(tag: $tag, untagged: $untagged) {
|
|
103
|
+
slug
|
|
104
|
+
...OperationsFragment
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
}
|
|
@@ -178,18 +181,33 @@ export const GetCategoriesDocument = new TypedDocumentString(`
|
|
|
178
181
|
schema(input: $input, type: $type) {
|
|
179
182
|
url
|
|
180
183
|
tags {
|
|
181
|
-
__typename
|
|
182
184
|
name
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
`);
|
|
189
|
+
export const GetOperationsDocument = new TypedDocumentString(`
|
|
190
|
+
query GetOperations($input: JSON!, $type: SchemaType!, $tag: String) {
|
|
191
|
+
schema(input: $input, type: $type) {
|
|
192
|
+
operations(tag: $tag) {
|
|
193
|
+
slug
|
|
194
|
+
deprecated
|
|
195
|
+
method
|
|
196
|
+
summary
|
|
197
|
+
operationId
|
|
198
|
+
path
|
|
199
|
+
tags {
|
|
200
|
+
name
|
|
191
201
|
}
|
|
192
202
|
}
|
|
203
|
+
untagged: operations(untagged: true) {
|
|
204
|
+
slug
|
|
205
|
+
deprecated
|
|
206
|
+
method
|
|
207
|
+
summary
|
|
208
|
+
operationId
|
|
209
|
+
path
|
|
210
|
+
}
|
|
193
211
|
}
|
|
194
212
|
}
|
|
195
213
|
`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/graphql/graphql.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../../../../src/lib/plugins/openapi/graphql/graphql.ts"],"names":[],"mappings":"AA6VA,MAAM,OAAO,mBACX,SAAQ,MAAM;IAMJ;IACD;IAJT,SAAS,CAA4D;IAErE,YACU,KAAa,EACd,QAA0C;QAEjD,KAAK,CAAC,KAAK,CAAC,CAAC;QAHL,UAAK,GAAL,KAAK,CAAQ;QACd,aAAQ,GAAR,QAAQ,CAAkC;IAGnD,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AACD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,mBAAmB,CAClE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8DG,EACH,EAAE,YAAY,EAAE,oBAAoB,EAAE,CACgC,CAAC;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;KASvD,CAGJ,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiF3D,CAGD,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;KASzD,CAGJ,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;KASxD,CAGJ,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;KAwBxD,CAGJ,CAAC"}
|