@@ -3,12 +3,11 @@ import 'jest-enzyme';
33import { mount , ReactWrapper } from 'enzyme' ;
44import * as fastGlob from 'fast-glob' ;
55import * as fs from 'fs' ;
6- import { JSONSchema4 } from 'json-schema' ;
76import * as path from 'path' ;
87import * as React from 'react' ;
98
109import { JsonSchemaViewer } from '../components' ;
11- import { ViewMode } from '../types' ;
10+ import { JSONSchema , ViewMode } from '../types' ;
1211import { dumpDom } from './utils/dumpDom' ;
1312
1413describe ( 'HTML Output' , ( ) => {
@@ -24,7 +23,7 @@ describe('HTML Output', () => {
2423 } ) ;
2524
2625 describe . each ( [ 'anyOf' , 'oneOf' ] ) ( 'given %s combiner placed next to allOf' , combiner => {
27- let schema : JSONSchema4 ;
26+ let schema : JSONSchema ;
2827
2928 beforeEach ( ( ) => {
3029 schema = {
@@ -84,7 +83,7 @@ describe('HTML Output', () => {
8483 } ) ;
8584
8685 it ( 'given array with oneOf containing items, should merge it correctly' , ( ) => {
87- const schema : JSONSchema4 = {
86+ const schema : JSONSchema = {
8887 oneOf : [
8988 {
9089 items : {
@@ -104,7 +103,7 @@ describe('HTML Output', () => {
104103 } ) ;
105104
106105 it . each < ViewMode > ( [ 'standalone' , 'read' , 'write' ] ) ( 'given %s mode, should populate proper nodes' , mode => {
107- const schema : JSONSchema4 = {
106+ const schema : JSONSchema = {
108107 type : [ 'string' , 'object' ] ,
109108 properties : {
110109 id : {
@@ -124,7 +123,7 @@ describe('HTML Output', () => {
124123 } ) ;
125124
126125 it ( 'given multiple object and string type, should process properties' , ( ) => {
127- const schema : JSONSchema4 = {
126+ const schema : JSONSchema = {
128127 type : [ 'string' , 'object' ] ,
129128 properties : {
130129 ids : {
@@ -140,7 +139,7 @@ describe('HTML Output', () => {
140139 } ) ;
141140
142141 it ( 'given complex type that includes array and complex array subtype, should not ignore subtype' , ( ) => {
143- const schema : JSONSchema4 = {
142+ const schema : JSONSchema = {
144143 type : 'object' ,
145144 properties : {
146145 items : {
@@ -158,7 +157,7 @@ describe('HTML Output', () => {
158157 } ) ;
159158
160159 it ( 'given visible $ref node, should try to inject the title immediately' , ( ) => {
161- const schema : JSONSchema4 = {
160+ const schema : JSONSchema = {
162161 type : 'object' ,
163162 properties : {
164163 foo : {
@@ -202,7 +201,7 @@ describe('Expanded depth', () => {
202201 } ) ;
203202
204203 describe ( 'merged array with object' , ( ) => {
205- let schema : JSONSchema4 ;
204+ let schema : JSONSchema ;
206205
207206 beforeEach ( ( ) => {
208207 schema = {
@@ -364,7 +363,7 @@ describe('Expanded depth', () => {
364363 } ) ;
365364
366365 describe ( 'merged array with object #2' , ( ) => {
367- let schema : JSONSchema4 ;
366+ let schema : JSONSchema ;
368367
369368 beforeEach ( ( ) => {
370369 schema = {
@@ -574,7 +573,7 @@ describe('Expanded depth', () => {
574573 } ) ;
575574
576575 describe ( 'nested object' , ( ) => {
577- let schema : JSONSchema4 ;
576+ let schema : JSONSchema ;
578577
579578 beforeEach ( ( ) => {
580579 schema = {
@@ -666,7 +665,7 @@ describe('Expanded depth', () => {
666665
667666describe ( '$ref resolving' , ( ) => {
668667 it ( 'should render caret for schema with top-level $ref pointing at complex type' , ( ) => {
669- const schema : JSONSchema4 = {
668+ const schema : JSONSchema = {
670669 $ref : '#/definitions/foo' ,
671670 definitions : {
672671 foo : {
@@ -697,7 +696,7 @@ describe('$ref resolving', () => {
697696 } ) ;
698697
699698 it ( 'should render caret for top-level array with $ref items' , ( ) => {
700- const schema : JSONSchema4 = {
699+ const schema : JSONSchema = {
701700 type : 'array' ,
702701 items : {
703702 $ref : '#/foo' ,
0 commit comments