Skip to content

Commit e4ee46b

Browse files
committed
feat: remove src/dereferenceSchema.ts
1 parent 19e2346 commit e4ee46b

File tree

3 files changed

+1
-278
lines changed

3 files changed

+1
-278
lines changed

src/JsonSchemaViewer.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ export class JsonSchemaViewer extends Component<IJsonSchemaViewer, IJsonSchemaVi
3333
emptyText = 'No schema defined',
3434
name,
3535
schema,
36-
dereferencedSchema,
3736
schemas,
3837
limitPropertyCount,
3938
hideRoot,
@@ -67,7 +66,6 @@ export class JsonSchemaViewer extends Component<IJsonSchemaViewer, IJsonSchemaVi
6766
<SchemaView
6867
emptyText={emptyText}
6968
defaultExpandedDepth={defaultExpandedDepth}
70-
dereferencedSchema={dereferencedSchema}
7169
expanded={expanded}
7270
hideInheritedFrom={hideInheritedFrom}
7371
hideRoot={hideRoot}

src/SchemaView.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ import { jsx } from '@emotion/core';
44
import { Dictionary, ISchema } from '@stoplight/types';
55
import { Box, Button, IBox } from '@stoplight/ui-kit';
66
import dropRight = require('lodash/dropRight');
7-
import isEmpty = require('lodash/isEmpty');
87
import { FunctionComponent, MouseEventHandler, ReactNodeArray, useCallback, useState } from 'react';
98
import { MutedText } from './common/MutedText';
10-
import { dereferenceSchema } from './dereferenceSchema';
119
import { renderSchema } from './renderers/renderSchema';
1210
import { useTheme } from './theme';
1311
import { buildAllOfSchema } from './util/buildAllOfSchema';
1412

1513
export interface ISchemaViewProps {
1614
name?: string;
17-
dereferencedSchema?: ISchema;
1815
defaultExpandedDepth?: number;
1916
schemas: object;
2017
schema: ISchema;
@@ -30,7 +27,6 @@ export interface ISchemaView extends ISchemaViewProps, IBox {}
3027
export const SchemaView: FunctionComponent<ISchemaView> = props => {
3128
const {
3229
defaultExpandedDepth = 1,
33-
dereferencedSchema,
3430
emptyText,
3531
expanded = false,
3632
hideInheritedFrom = false,
@@ -59,10 +55,7 @@ export const SchemaView: FunctionComponent<ISchemaView> = props => {
5955
[showExtra]
6056
);
6157

62-
let actualSchema: ISchema =
63-
!dereferencedSchema || isEmpty(dereferencedSchema)
64-
? dereferenceSchema(schema, { definitions: schemas }, hideInheritedFrom)
65-
: dereferencedSchema;
58+
let actualSchema = schema;
6659

6760
if (
6861
!actualSchema ||

src/dereferenceSchema.ts

Lines changed: 0 additions & 268 deletions
This file was deleted.

0 commit comments

Comments
 (0)