UNPKG

docusaurus-theme-redoc

Version:
44 lines (37 loc) 928 B
import type { Props as LayoutProps } from '@theme/Layout'; import type { ObjectDescriptionProps } from 'redoc'; import type { OpenAPISpec } from 'redoc/typings/types'; export type ParsedSpec = OpenAPISpec; export interface SpecProps { spec: ParsedSpec; url?: string; isSpecFile?: boolean; themeId?: string; normalizeUrl?: boolean; } export type RedocProps = SpecProps; export interface MdxProps { /** * If you have multiple apis, then add a `id` field in the specs array * And pass the same here */ id?: string; } export type ApiSchemaProps = Omit< ObjectDescriptionProps, 'parser' | 'options' | 'schemaRef' > & MdxProps & { /** * Show the example or not */ example?: boolean; /** * Ref to the schema */ pointer: ObjectDescriptionProps['schemaRef']; }; export type ApiDocProps = { specProps: SpecProps; layoutProps?: Omit<LayoutProps, 'children'>; };