redoc 2.1.3 → 2.1.5
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/CHANGELOG.md +20 -0
- package/README.md +7 -8
- package/bundles/756674defce81e90acea.worker.js.LICENSE.txt +1 -1
- package/bundles/redoc.browser.lib.js +151 -145
- package/bundles/redoc.browser.lib.js.LICENSE.txt +1 -1
- package/bundles/redoc.browser.lib.js.map +1 -1
- package/bundles/redoc.lib.js +149 -143
- package/bundles/redoc.lib.js.LICENSE.txt +1 -1
- package/bundles/redoc.lib.js.map +1 -1
- package/bundles/redoc.standalone.js +258 -252
- package/bundles/redoc.standalone.js.LICENSE.txt +31 -24
- package/bundles/redoc.standalone.js.map +1 -1
- package/package.json +30 -32
- package/typings/common-elements/Tooltip.d.ts +2 -2
- package/typings/common-elements/linkify.d.ts +3 -3
- package/typings/common-elements/perfect-scrollbar.d.ts +3 -3
- package/typings/components/ApiInfo/ApiInfo.d.ts +1 -1
- package/typings/components/ApiLogo/ApiLogo.d.ts +1 -1
- package/typings/components/ApiLogo/styled.elements.d.ts +2 -2
- package/typings/components/CallbackSamples/CallbackReqSamples.d.ts +1 -1
- package/typings/components/CallbackSamples/CallbackSamples.d.ts +1 -1
- package/typings/components/Callbacks/CallbackDetails.d.ts +1 -1
- package/typings/components/Callbacks/CallbackOperation.d.ts +1 -1
- package/typings/components/Callbacks/CallbackTitle.d.ts +2 -2
- package/typings/components/Callbacks/CallbacksList.d.ts +1 -1
- package/typings/components/Callbacks/styled.elements.d.ts +1 -1
- package/typings/components/ContentItems/ContentItems.d.ts +4 -4
- package/typings/components/Endpoint/Endpoint.d.ts +1 -1
- package/typings/components/ErrorBoundary.d.ts +1 -1
- package/typings/components/ExternalDocumentation/ExternalDocumentation.d.ts +1 -1
- package/typings/components/Fields/ArrayItemDetails.d.ts +2 -2
- package/typings/components/Fields/EnumValues.d.ts +1 -1
- package/typings/components/Fields/Examples.d.ts +2 -2
- package/typings/components/Fields/Extensions.d.ts +1 -1
- package/typings/components/Fields/Field.d.ts +1 -1
- package/typings/components/Fields/FieldConstraints.d.ts +1 -1
- package/typings/components/Fields/FieldDetails.d.ts +1 -1
- package/typings/components/Fields/Pattern.d.ts +2 -2
- package/typings/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +1 -1
- package/typings/components/JsonViewer/JsonViewer.d.ts +2 -2
- package/typings/components/Loading/Loading.d.ts +1 -1
- package/typings/components/Loading/Spinner.svg.d.ts +2 -2
- package/typings/components/Markdown/AdvancedMarkdown.d.ts +2 -2
- package/typings/components/Markdown/Markdown.d.ts +1 -1
- package/typings/components/Markdown/SanitizedMdBlock.d.ts +2 -2
- package/typings/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +1 -1
- package/typings/components/Parameters/Parameters.d.ts +1 -1
- package/typings/components/Parameters/ParametersGroup.d.ts +1 -1
- package/typings/components/PayloadSamples/Example.d.ts +3 -3
- package/typings/components/PayloadSamples/ExampleValue.d.ts +2 -2
- package/typings/components/PayloadSamples/MediaTypeSamples.d.ts +1 -1
- package/typings/components/PayloadSamples/PayloadSamples.d.ts +1 -1
- package/typings/components/Redoc/Redoc.d.ts +1 -1
- package/typings/components/RedocStandalone.d.ts +2 -2
- package/typings/components/RequestSamples/RequestSamples.d.ts +1 -1
- package/typings/components/ResponseSamples/ResponseSamples.d.ts +1 -1
- package/typings/components/Responses/ResponseDetails.d.ts +1 -1
- package/typings/components/Responses/ResponseHeaders.d.ts +1 -1
- package/typings/components/Responses/ResponsesList.d.ts +1 -1
- package/typings/components/Schema/ArraySchema.d.ts +1 -1
- package/typings/components/Schema/DiscriminatorDropdown.d.ts +1 -1
- package/typings/components/Schema/ObjectSchema.d.ts +2 -2
- package/typings/components/Schema/OneOfSchema.d.ts +2 -2
- package/typings/components/Schema/RecursiveSchema.d.ts +2 -2
- package/typings/components/Schema/Schema.d.ts +1 -1
- package/typings/components/SchemaDefinition/SchemaDefinition.d.ts +1 -1
- package/typings/components/SearchBox/SearchBox.d.ts +3 -1
- package/typings/components/SearchBox/styled.elements.d.ts +2 -2
- package/typings/components/SecurityRequirement/OAuthFlow.d.ts +1 -1
- package/typings/components/SecurityRequirement/SecurityDetails.d.ts +2 -2
- package/typings/components/SecurityRequirement/SecurityHeader.d.ts +2 -2
- package/typings/components/SecurityRequirement/SecurityRequirement.d.ts +2 -2
- package/typings/components/SecuritySchemes/SecuritySchemes.d.ts +1 -1
- package/typings/components/SelectOnClick/SelectOnClick.d.ts +2 -2
- package/typings/components/SideMenu/MenuItem.d.ts +2 -2
- package/typings/components/SideMenu/MenuItems.d.ts +1 -1
- package/typings/components/SideMenu/SideMenu.d.ts +3 -1
- package/typings/components/SourceCode/SourceCode.d.ts +3 -3
- package/typings/components/StickySidebar/ChevronSvg.d.ts +2 -2
- package/typings/components/StickySidebar/StickyResponsiveSidebar.d.ts +2 -2
- package/typings/services/OpenAPIParser.d.ts +4 -4
|
@@ -7,9 +7,9 @@ export interface OneOfButtonProps {
|
|
|
7
7
|
schema: SchemaModel;
|
|
8
8
|
}
|
|
9
9
|
export declare class OneOfButton extends React.Component<OneOfButtonProps> {
|
|
10
|
-
render(): JSX.Element;
|
|
10
|
+
render(): React.JSX.Element;
|
|
11
11
|
activateOneOf: () => void;
|
|
12
12
|
}
|
|
13
13
|
export declare class OneOfSchema extends React.Component<SchemaProps> {
|
|
14
|
-
render(): JSX.Element | null;
|
|
14
|
+
render(): React.JSX.Element | null;
|
|
15
15
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { SchemaProps } from '.';
|
|
3
|
-
export declare const RecursiveSchema: ({ schema }: SchemaProps) => JSX.Element;
|
|
3
|
+
export declare const RecursiveSchema: ({ schema }: SchemaProps) => React.JSX.Element;
|
|
@@ -3,6 +3,7 @@ import type { IMenuItem, SearchResult } from '../../services/types';
|
|
|
3
3
|
import type { SearchStore } from '../../services/SearchStore';
|
|
4
4
|
import type { MarkerService } from '../../services/MarkerService';
|
|
5
5
|
import { MenuItem } from '../SideMenu/MenuItem';
|
|
6
|
+
import { OptionsContext } from '../OptionsProvider';
|
|
6
7
|
export interface SearchBoxProps {
|
|
7
8
|
search: SearchStore<string>;
|
|
8
9
|
marker: MarkerService;
|
|
@@ -19,6 +20,7 @@ export interface SearchBoxState {
|
|
|
19
20
|
export declare class SearchBox extends React.PureComponent<SearchBoxProps, SearchBoxState> {
|
|
20
21
|
activeItemRef: MenuItem | null;
|
|
21
22
|
static contextType: React.Context<import("../..").RedocNormalizedOptions>;
|
|
23
|
+
context: React.ContextType<typeof OptionsContext>;
|
|
22
24
|
constructor(props: any);
|
|
23
25
|
clearResults(term: string): void;
|
|
24
26
|
clear: () => void;
|
|
@@ -26,5 +28,5 @@ export declare class SearchBox extends React.PureComponent<SearchBoxProps, Searc
|
|
|
26
28
|
setResults(results: SearchResult[], term: string): void;
|
|
27
29
|
searchCallback(searchTerm: string): void;
|
|
28
30
|
search: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
29
|
-
render(): JSX.Element;
|
|
31
|
+
render(): React.JSX.Element;
|
|
30
32
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export declare const SearchWrap: import("styled-components").StyledComponent<"div", import("../../theme").ResolvedThemeInterface, {}, never>;
|
|
3
3
|
export declare const SearchInput: import("styled-components").StyledComponent<"input", import("../../theme").ResolvedThemeInterface, {
|
|
4
4
|
className: "search-input";
|
|
5
5
|
}, "className">;
|
|
6
6
|
export declare const SearchIcon: import("styled-components").StyledComponent<(props: {
|
|
7
7
|
className?: string;
|
|
8
|
-
}) => JSX.Element, import("../../theme").ResolvedThemeInterface, {
|
|
8
|
+
}) => React.JSX.Element, import("../../theme").ResolvedThemeInterface, {
|
|
9
9
|
className: "search-icon";
|
|
10
10
|
}, "className">;
|
|
11
11
|
export declare const SearchResultsBox: import("styled-components").StyledComponent<"div", import("../../theme").ResolvedThemeInterface, {}, never>;
|
|
@@ -5,5 +5,5 @@ export interface OAuthFlowProps {
|
|
|
5
5
|
flow: OpenAPISecurityScheme['flows'][keyof OpenAPISecurityScheme['flows']];
|
|
6
6
|
RequiredScopes?: JSX.Element;
|
|
7
7
|
}
|
|
8
|
-
export declare function OAuthFlowComponent(props: OAuthFlowProps): JSX.Element;
|
|
8
|
+
export declare function OAuthFlowComponent(props: OAuthFlowProps): React.JSX.Element;
|
|
9
9
|
export declare const OAuthFlow: React.NamedExoticComponent<OAuthFlowProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { SecuritySchemeModel } from '../../services';
|
|
3
3
|
interface SecuritySchemaProps {
|
|
4
4
|
RequiredScopes?: JSX.Element;
|
|
5
5
|
scheme: SecuritySchemeModel;
|
|
6
6
|
}
|
|
7
|
-
export declare function SecurityDetails(props: SecuritySchemaProps): JSX.Element;
|
|
7
|
+
export declare function SecurityDetails(props: SecuritySchemaProps): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { SecurityRequirementModel } from '../../services/models/SecurityRequirement';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
export interface SecurityRequirementProps {
|
|
4
4
|
security: SecurityRequirementModel;
|
|
5
5
|
showSecuritySchemeType?: boolean;
|
|
6
6
|
expanded: boolean;
|
|
7
7
|
}
|
|
8
|
-
export declare function SecurityHeader(props: SecurityRequirementProps): JSX.Element;
|
|
8
|
+
export declare function SecurityHeader(props: SecurityRequirementProps): React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { SecurityRequirementModel } from '../../services/models/SecurityRequirement';
|
|
3
3
|
export interface SecurityRequirementsProps {
|
|
4
4
|
securities: SecurityRequirementModel[];
|
|
5
5
|
}
|
|
6
|
-
export declare function SecurityRequirements(props: SecurityRequirementsProps): JSX.Element | null;
|
|
6
|
+
export declare function SecurityRequirements(props: SecurityRequirementsProps): React.JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare class SelectOnClick extends React.PureComponent {
|
|
2
|
+
export declare class SelectOnClick extends React.PureComponent<React.PropsWithChildren<any>> {
|
|
3
3
|
private child;
|
|
4
4
|
selectElement: () => void;
|
|
5
|
-
render(): JSX.Element;
|
|
5
|
+
render(): React.JSX.Element;
|
|
6
6
|
}
|
|
@@ -13,10 +13,10 @@ export declare class MenuItem extends React.Component<MenuItemProps> {
|
|
|
13
13
|
componentDidMount(): void;
|
|
14
14
|
componentDidUpdate(): void;
|
|
15
15
|
scrollIntoViewIfActive(): void;
|
|
16
|
-
render(): JSX.Element;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
17
|
}
|
|
18
18
|
export interface OperationMenuItemContentProps {
|
|
19
19
|
item: OperationModel;
|
|
20
20
|
children?: React.ReactChild;
|
|
21
21
|
}
|
|
22
|
-
export declare const OperationMenuItemContent: (props: OperationMenuItemContentProps) => JSX.Element;
|
|
22
|
+
export declare const OperationMenuItemContent: (props: OperationMenuItemContentProps) => React.JSX.Element;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { MenuStore } from '../../services';
|
|
3
3
|
import type { IMenuItem } from '../../services';
|
|
4
|
+
import { OptionsContext } from '../OptionsProvider';
|
|
4
5
|
export declare class SideMenu extends React.Component<{
|
|
5
6
|
menu: MenuStore;
|
|
6
7
|
className?: string;
|
|
7
8
|
}> {
|
|
8
9
|
static contextType: React.Context<import("../../services").RedocNormalizedOptions>;
|
|
10
|
+
context: React.ContextType<typeof OptionsContext>;
|
|
9
11
|
private _updateScroll?;
|
|
10
|
-
render(): JSX.Element;
|
|
12
|
+
render(): React.JSX.Element;
|
|
11
13
|
activate: (item: IMenuItem) => void;
|
|
12
14
|
private saveScrollUpdate;
|
|
13
15
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
export interface SourceCodeProps {
|
|
3
3
|
source: string;
|
|
4
4
|
lang: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const SourceCode: (props: SourceCodeProps) => JSX.Element;
|
|
7
|
-
export declare const SourceCodeWithCopy: (props: SourceCodeProps) => JSX.Element;
|
|
6
|
+
export declare const SourceCode: (props: SourceCodeProps) => React.JSX.Element;
|
|
7
|
+
export declare const SourceCodeWithCopy: (props: SourceCodeProps) => React.JSX.Element;
|
|
@@ -10,7 +10,7 @@ export interface StickySidebarProps {
|
|
|
10
10
|
export interface StickySidebarState {
|
|
11
11
|
offsetTop?: string;
|
|
12
12
|
}
|
|
13
|
-
export declare class StickyResponsiveSidebar extends React.Component<StickySidebarProps
|
|
13
|
+
export declare class StickyResponsiveSidebar extends React.Component<React.PropsWithChildren<StickySidebarProps>, StickySidebarState> {
|
|
14
14
|
static contextType: React.Context<RedocNormalizedOptions>;
|
|
15
15
|
context: React.ContextType<typeof OptionsContext>;
|
|
16
16
|
state: StickySidebarState;
|
|
@@ -18,6 +18,6 @@ export declare class StickyResponsiveSidebar extends React.Component<StickySideb
|
|
|
18
18
|
componentDidMount(): void;
|
|
19
19
|
componentWillUnmount(): void;
|
|
20
20
|
getScrollYOffset(options: RedocNormalizedOptions): string;
|
|
21
|
-
render(): JSX.Element;
|
|
21
|
+
render(): React.JSX.Element;
|
|
22
22
|
private toggleNavMenu;
|
|
23
23
|
}
|
|
@@ -16,22 +16,22 @@ export declare class OpenAPIParser {
|
|
|
16
16
|
/**
|
|
17
17
|
* get spec part by JsonPointer ($ref)
|
|
18
18
|
*/
|
|
19
|
-
byRef: <T
|
|
19
|
+
byRef: <T = any>(ref: string) => T | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* checks if the object is OpenAPI reference (contains $ref property)
|
|
22
22
|
*/
|
|
23
|
-
isRef<T
|
|
23
|
+
isRef<T>(obj: OpenAPIRef | T): obj is OpenAPIRef;
|
|
24
24
|
/**
|
|
25
25
|
* Resolve given reference object or return as is if it is not a reference
|
|
26
26
|
* @param obj object to dereference
|
|
27
27
|
* @param forceCircular whether to dereference even if it is circular ref
|
|
28
28
|
* @param mergeAsAllOf
|
|
29
29
|
*/
|
|
30
|
-
deref<T
|
|
30
|
+
deref<T>(obj: OpenAPIRef | T, baseRefsStack?: string[], mergeAsAllOf?: boolean): {
|
|
31
31
|
resolved: T;
|
|
32
32
|
refsStack: string[];
|
|
33
33
|
};
|
|
34
|
-
mergeRefs<T
|
|
34
|
+
mergeRefs<T>(ref: OpenAPIRef, resolved: T, mergeAsAllOf: boolean): T;
|
|
35
35
|
/**
|
|
36
36
|
* Merge allOf constraints.
|
|
37
37
|
* @param schema schema with allOF
|