mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-29 12:03:44 +03:00
chore: prettier all
This commit is contained in:
parent
93e844c3d0
commit
528b8fbebc
|
@ -28,7 +28,14 @@ export class FieldDetails extends React.PureComponent<FieldProps> {
|
||||||
<div>
|
<div>
|
||||||
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
<TypePrefix>{schema.typePrefix}</TypePrefix>
|
||||||
<TypeName>{schema.displayType}</TypeName>
|
<TypeName>{schema.displayType}</TypeName>
|
||||||
{schema.displayFormat && <TypeFormat> <{schema.displayFormat}> </TypeFormat>}
|
{schema.displayFormat && (
|
||||||
|
<TypeFormat>
|
||||||
|
{' '}
|
||||||
|
<
|
||||||
|
{schema.displayFormat}
|
||||||
|
>{' '}
|
||||||
|
</TypeFormat>
|
||||||
|
)}
|
||||||
{schema.title && <TypeTitle> ({schema.title}) </TypeTitle>}
|
{schema.title && <TypeTitle> ({schema.title}) </TypeTitle>}
|
||||||
<ConstraintsView constraints={schema.constraints} />
|
<ConstraintsView constraints={schema.constraints} />
|
||||||
{schema.nullable && <NullableLabel> Nullable </NullableLabel>}
|
{schema.nullable && <NullableLabel> Nullable </NullableLabel>}
|
||||||
|
|
|
@ -34,7 +34,9 @@ export class MediaTypeSamples extends React.Component<PayloadSamplesProps> {
|
||||||
return (
|
return (
|
||||||
<SmallTabs>
|
<SmallTabs>
|
||||||
<TabList>
|
<TabList>
|
||||||
{examplesNames.map(name => <Tab key={name}> {examples[name].summary || name} </Tab>)}
|
{examplesNames.map(name => (
|
||||||
|
<Tab key={name}> {examples[name].summary || name} </Tab>
|
||||||
|
))}
|
||||||
</TabList>
|
</TabList>
|
||||||
{examplesNames.map(name => (
|
{examplesNames.map(name => (
|
||||||
<TabPanel key={name}>{sampleView(examples[name].value)}</TabPanel>
|
<TabPanel key={name}>{sampleView(examples[name].value)}</TabPanel>
|
||||||
|
|
|
@ -24,7 +24,7 @@ export const SearchInput = styled.input.attrs({
|
||||||
outline: none;
|
outline: none;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const SearchIcon = styled((props: {className?: string}) => (
|
export const SearchIcon = styled((props: { className?: string }) => (
|
||||||
<svg
|
<svg
|
||||||
className={props.className}
|
className={props.className}
|
||||||
version="1.1"
|
version="1.1"
|
||||||
|
|
|
@ -72,7 +72,9 @@ export class SecurityRequirement extends React.PureComponent<SecurityRequirement
|
||||||
<SecurityRequirementAndWrap key={scheme.id}>
|
<SecurityRequirementAndWrap key={scheme.id}>
|
||||||
<Link to={scheme.sectionId}>{scheme.id}</Link>
|
<Link to={scheme.sectionId}>{scheme.id}</Link>
|
||||||
{scheme.scopes.length > 0 && ' ('}
|
{scheme.scopes.length > 0 && ' ('}
|
||||||
{scheme.scopes.map(scope => <ScopeName key={scope}>{scope}</ScopeName>)}
|
{scheme.scopes.map(scope => (
|
||||||
|
<ScopeName key={scope}>{scope}</ScopeName>
|
||||||
|
))}
|
||||||
{scheme.scopes.length > 0 && ') '}
|
{scheme.scopes.length > 0 && ') '}
|
||||||
</SecurityRequirementAndWrap>
|
</SecurityRequirementAndWrap>
|
||||||
);
|
);
|
||||||
|
@ -117,7 +119,9 @@ export class SecurityRequirements extends React.PureComponent<SecurityRequiremen
|
||||||
<AuthHeader>Authorizations: </AuthHeader>
|
<AuthHeader>Authorizations: </AuthHeader>
|
||||||
</AuthHeaderColumn>
|
</AuthHeaderColumn>
|
||||||
<SecuritiesColumn>
|
<SecuritiesColumn>
|
||||||
{securities.map((security, idx) => <SecurityRequirement key={idx} security={security} />)}
|
{securities.map((security, idx) => (
|
||||||
|
<SecurityRequirement key={idx} security={security} />
|
||||||
|
))}
|
||||||
</SecuritiesColumn>
|
</SecuritiesColumn>
|
||||||
</Wrap>
|
</Wrap>
|
||||||
);
|
);
|
||||||
|
|
|
@ -52,12 +52,14 @@ export class MenuStore {
|
||||||
/**
|
/**
|
||||||
* active item absolute index (when flattened). -1 means nothing is selected
|
* active item absolute index (when flattened). -1 means nothing is selected
|
||||||
*/
|
*/
|
||||||
@observable activeItemIdx: number = -1;
|
@observable
|
||||||
|
activeItemIdx: number = -1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* whether sidebar with menu is opened or not
|
* whether sidebar with menu is opened or not
|
||||||
*/
|
*/
|
||||||
@observable sideBarOpened: boolean = false;
|
@observable
|
||||||
|
sideBarOpened: boolean = false;
|
||||||
|
|
||||||
items: IMenuItem[];
|
items: IMenuItem[];
|
||||||
flatItems: IMenuItem[];
|
flatItems: IMenuItem[];
|
||||||
|
|
|
@ -10,7 +10,8 @@ import { SchemaModel } from './Schema';
|
||||||
* Field or Parameter model ready to be used by components
|
* Field or Parameter model ready to be used by components
|
||||||
*/
|
*/
|
||||||
export class FieldModel {
|
export class FieldModel {
|
||||||
@observable expanded: boolean = false;
|
@observable
|
||||||
|
expanded: boolean = false;
|
||||||
|
|
||||||
schema: SchemaModel;
|
schema: SchemaModel;
|
||||||
name: string;
|
name: string;
|
||||||
|
|
|
@ -21,8 +21,10 @@ export class GroupModel implements IMenuItem {
|
||||||
parent?: GroupModel;
|
parent?: GroupModel;
|
||||||
externalDocs?: OpenAPIExternalDocumentation;
|
externalDocs?: OpenAPIExternalDocumentation;
|
||||||
|
|
||||||
@observable active: boolean = false;
|
@observable
|
||||||
@observable expanded: boolean = false;
|
active: boolean = false;
|
||||||
|
@observable
|
||||||
|
expanded: boolean = false;
|
||||||
|
|
||||||
depth: number;
|
depth: number;
|
||||||
level: number;
|
level: number;
|
||||||
|
|
|
@ -14,7 +14,8 @@ import { RedocNormalizedOptions } from '../RedocNormalizedOptions';
|
||||||
export class MediaContentModel {
|
export class MediaContentModel {
|
||||||
mediaTypes: MediaTypeModel[];
|
mediaTypes: MediaTypeModel[];
|
||||||
|
|
||||||
@observable activeMimeIdx = 0;
|
@observable
|
||||||
|
activeMimeIdx = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param isRequestType needed to know if skipe RO/RW fields in objects
|
* @param isRequestType needed to know if skipe RO/RW fields in objects
|
||||||
|
|
|
@ -40,9 +40,12 @@ export class OperationModel implements IMenuItem {
|
||||||
|
|
||||||
depth: number;
|
depth: number;
|
||||||
|
|
||||||
@observable ready?: boolean = true;
|
@observable
|
||||||
@observable active: boolean = false;
|
ready?: boolean = true;
|
||||||
@observable expanded: boolean = false;
|
@observable
|
||||||
|
active: boolean = false;
|
||||||
|
@observable
|
||||||
|
expanded: boolean = false;
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
pointer: string;
|
pointer: string;
|
||||||
|
|
|
@ -9,7 +9,8 @@ import { FieldModel } from './Field';
|
||||||
import { MediaContentModel } from './MediaContent';
|
import { MediaContentModel } from './MediaContent';
|
||||||
|
|
||||||
export class ResponseModel {
|
export class ResponseModel {
|
||||||
@observable expanded: boolean;
|
@observable
|
||||||
|
expanded: boolean;
|
||||||
|
|
||||||
content?: MediaContentModel;
|
content?: MediaContentModel;
|
||||||
code: string;
|
code: string;
|
||||||
|
|
|
@ -48,7 +48,8 @@ export class SchemaModel {
|
||||||
oneOf?: SchemaModel[];
|
oneOf?: SchemaModel[];
|
||||||
oneOfType: string;
|
oneOfType: string;
|
||||||
discriminatorProp: string;
|
discriminatorProp: string;
|
||||||
@observable activeOneOf: number = 0;
|
@observable
|
||||||
|
activeOneOf: number = 0;
|
||||||
|
|
||||||
rawSchema: OpenAPISchema;
|
rawSchema: OpenAPISchema;
|
||||||
schema: MergedOpenAPISchema;
|
schema: MergedOpenAPISchema;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user