Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { createStorage, hashArray } from "@theme/ApiExplorer/storage-utils";
import {
import type {
SecurityRequirementObject,
SecuritySchemeObject,
} from "docusaurus-plugin-openapi-docs/src/openapi/types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import FormSelect from "@theme/ApiExplorer/FormSelect";
import FormTextInput from "@theme/ApiExplorer/FormTextInput";
import LiveApp from "@theme/ApiExplorer/LiveEditor";
import { useTypedDispatch } from "@theme/ApiItem/hooks";
import { SchemaObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import type { SchemaObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import { clearFormBodyKey, setFileFormBody, setStringFormBody } from "../slice";
import FileArrayFormBodyItem from "../FileArrayFormBodyItem";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import Markdown from "@theme/Markdown";
import SchemaTabs from "@theme/SchemaTabs";
import TabItem from "@theme/TabItem";
import { OPENAPI_BODY, OPENAPI_REQUEST } from "@theme/translationIds";
import { RequestBodyObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import { sampleFromSchema } from "docusaurus-plugin-openapi-docs/src/openapi/createSchemaExample";
import type { RequestBodyObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import { sampleFromSchema } from "docusaurus-plugin-openapi-docs/lib/openapi/createSchemaExample";
import format from "xml-formatter";

import { clearRawBody, setFileRawBody, setStringRawBody } from "./slice";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
* ========================================================================== */

import { SchemaObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import type { SchemaObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import merge from "lodash/merge";

export interface SchemaSelections {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* ========================================================================== */

import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { ParameterObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import type { ParameterObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";

export type Param = ParameterObject & { value?: string[] | string };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {
import Server from "@theme/ApiExplorer/Server";
import { useTypedDispatch, useTypedSelector } from "@theme/ApiItem/hooks";
import { OPENAPI_REQUEST } from "@theme/translationIds";
import { ParameterObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import type { ParameterObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import type { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import type { ThemeConfig } from "docusaurus-theme-openapi-docs/src/types";
import * as sdk from "postman-collection";
import { FormProvider, useForm } from "react-hook-form";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import SchemaTabs from "@theme/SchemaTabs";
import TabItem from "@theme/TabItem";
import { OPENAPI_RESPONSE } from "@theme/translationIds";
import clsx from "clsx";
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import type { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import type { ThemeConfig } from "docusaurus-theme-openapi-docs/src/types";

import { clearResponse, clearCode, clearHeaders } from "./slice";
Expand Down Expand Up @@ -47,8 +47,7 @@ function Response({ item }: { item: ApiItem }) {
const { siteConfig } = useDocusaurusContext();
const themeConfig = siteConfig.themeConfig as ThemeConfig;
const hideSendButton = metadata.frontMatter.hide_send_button;
const proxy =
metadata.frontMatter.proxy ?? themeConfig.api?.proxy;
const proxy = metadata.frontMatter.proxy ?? themeConfig.api?.proxy;
const prismTheme = usePrismTheme();
const code = useTypedSelector((state: any) => state.response.code);
const headers = useTypedSelector((state: any) => state.response.headers);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* ========================================================================== */

import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { ServerObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
import type { ServerObject } from "docusaurus-plugin-openapi-docs/src/openapi/types";
// TODO: we might want to export this

export interface State {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { AuthState, Scheme } from "@theme/ApiExplorer/Authorization/slice";
import { Body, Content } from "@theme/ApiExplorer/Body/slice";
import {
import type {
ParameterObject,
ServerObject,
} from "docusaurus-plugin-openapi-docs/src/openapi/types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import CodeSnippets from "@theme/ApiExplorer/CodeSnippets";
import Request from "@theme/ApiExplorer/Request";
import Response from "@theme/ApiExplorer/Response";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import type { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import * as sdk from "postman-collection";

function ApiExplorer({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import type { Props } from "@theme/DocItem";
import DocItemMetadata from "@theme/DocItem/Metadata";
import SkeletonLoader from "@theme/SkeletonLoader";
import clsx from "clsx";
import {
import type {
ParameterObject,
ServerObject,
} from "docusaurus-plugin-openapi-docs/src/openapi/types";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import ResponseHeaders from "@theme/ResponseHeaders";
import ResponseSchema from "@theme/ResponseSchema";
import TabItem from "@theme/TabItem";
import { OPENAPI_STATUS_CODES } from "@theme/translationIds";
import { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";
import type { ApiItem } from "docusaurus-plugin-openapi-docs/src/types";

interface Props {
id?: string;
Expand Down