diff --git a/src/common-elements/CopyButtonWrapper.tsx b/src/common-elements/CopyButtonWrapper.tsx index f3cd904d..c1b5e468 100644 --- a/src/common-elements/CopyButtonWrapper.tsx +++ b/src/common-elements/CopyButtonWrapper.tsx @@ -5,11 +5,7 @@ import { ClipboardService } from '../services/ClipboardService'; export interface CopyButtonWrapperProps { data: any; - children: ( - props: { - renderCopyButton: (() => React.ReactNode); - }, - ) => React.ReactNode; + children: (props: { renderCopyButton: () => React.ReactNode }) => React.ReactNode; } export class CopyButtonWrapper extends React.PureComponent< diff --git a/src/components/ApiInfo/ApiInfo.tsx b/src/components/ApiInfo/ApiInfo.tsx index fe595811..99626633 100644 --- a/src/components/ApiInfo/ApiInfo.tsx +++ b/src/components/ApiInfo/ApiInfo.tsx @@ -44,22 +44,20 @@ export class ApiInfo extends React.Component { null; const website = - (info.contact && - info.contact.url && ( - - URL: {info.contact.url} - - )) || + (info.contact && info.contact.url && ( + + URL: {info.contact.url} + + )) || null; const email = - (info.contact && - info.contact.email && ( - - {info.contact.name || 'E-mail'}:{' '} - {info.contact.email} - - )) || + (info.contact && info.contact.email && ( + + {info.contact.name || 'E-mail'}:{' '} + {info.contact.email} + + )) || null; const terms = @@ -70,11 +68,7 @@ export class ApiInfo extends React.Component { )) || null; - const version = - (info.version && ( - ({info.version}) - )) || - null; + const version = (info.version && ({info.version})) || null; return (
diff --git a/src/components/Fields/Field.tsx b/src/components/Fields/Field.tsx index dae79e96..ef969b2d 100644 --- a/src/components/Fields/Field.tsx +++ b/src/components/Fields/Field.tsx @@ -65,21 +65,20 @@ export class Field extends React.Component { - {field.expanded && - withSubSchema && ( - - - - - - - - )} + {field.expanded && withSubSchema && ( + + + + + + + + )} ); } diff --git a/src/components/Fields/FieldDetail.tsx b/src/components/Fields/FieldDetail.tsx index e9ea1099..0697aeea 100644 --- a/src/components/Fields/FieldDetail.tsx +++ b/src/components/Fields/FieldDetail.tsx @@ -17,10 +17,7 @@ export class FieldDetail extends React.PureComponent { return (
- {this.props.label} {' '} - - {value} - + {this.props.label} {value}
); } diff --git a/src/components/PayloadSamples/exernalExampleHook.ts b/src/components/PayloadSamples/exernalExampleHook.ts index e3e33f08..f9d00c68 100644 --- a/src/components/PayloadSamples/exernalExampleHook.ts +++ b/src/components/PayloadSamples/exernalExampleHook.ts @@ -13,22 +13,19 @@ export function useExternalExample(example: ExampleModel, mimeType: string) { prevRef.current = example; - useEffect( - () => { - const load = async () => { - setIsLoading(true); - try { - value.current = await example.getExternalValue(mimeType); - } catch (e) { - value.current = e; - } - setIsLoading(false); - }; + useEffect(() => { + const load = async () => { + setIsLoading(true); + try { + value.current = await example.getExternalValue(mimeType); + } catch (e) { + value.current = e; + } + setIsLoading(false); + }; - load(); - }, - [example, mimeType], - ); + load(); + }, [example, mimeType]); return value.current; } diff --git a/src/components/Responses/Response.tsx b/src/components/Responses/Response.tsx index 7c46a659..58e0ae32 100644 --- a/src/components/Responses/Response.tsx +++ b/src/components/Responses/Response.tsx @@ -28,12 +28,11 @@ export class ResponseView extends React.Component<{ response: ResponseModel }> { code={code} opened={expanded} /> - {expanded && - !empty && ( - - - - )} + {expanded && !empty && ( + + + + )} ); } diff --git a/src/services/models/Operation.ts b/src/services/models/Operation.ts index 3e31a367..88640dc5 100644 --- a/src/services/models/Operation.ts +++ b/src/services/models/Operation.ts @@ -77,8 +77,8 @@ export class OperationModel implements IMenuItem { operationSpec.operationId !== undefined ? 'operation/' + operationSpec.operationId : parent !== undefined - ? parent.id + this.pointer - : this.pointer; + ? parent.id + this.pointer + : this.pointer; this.name = getOperationSummary(operationSpec); this.description = operationSpec.description;