From d5f529df6f7e694c9dda883d94fda9e2d4ebcab9 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sat, 19 Dec 2015 15:45:47 +0200 Subject: [PATCH] Remove unused json-schema-view --- .../JsonSchemaView/json-schema-view.js | 30 ------------------- lib/components/ParamsList/params-list.js | 3 +- lib/components/index.js | 3 -- 3 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 lib/components/JsonSchemaView/json-schema-view.js diff --git a/lib/components/JsonSchemaView/json-schema-view.js b/lib/components/JsonSchemaView/json-schema-view.js deleted file mode 100644 index 722124ac..00000000 --- a/lib/components/JsonSchemaView/json-schema-view.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -import {RedocComponent, BaseComponent} from '../base'; - -/* temporarily this component uses json-schema-view-js lib */ -import 'json-formatter-js/src/index'; -import 'json-formatter-js/dist/style.css!'; -import JSONSchemaView from 'json-schema-view-js/src/index'; -import 'json-schema-view-js/dist/style.css!'; - -import {ElementRef} from 'angular2/core'; - -@RedocComponent({ - selector: 'schema', - template: '' -}) -export default class JsonSchemaView extends BaseComponent { - constructor(schemaMgr, elementRef) { - super(schemaMgr); - this.element = elementRef.nativeElement; - } - - init() { - this.dereference(); - const formatter = new JSONSchemaView(this.componentSchema, 1); - this.element.appendChild(formatter.render()); - } -} - -JsonSchemaView.parameters = JsonSchemaView.parameters.concat([[ElementRef]]); diff --git a/lib/components/ParamsList/params-list.js b/lib/components/ParamsList/params-list.js index 0850e2e7..2e296513 100644 --- a/lib/components/ParamsList/params-list.js +++ b/lib/components/ParamsList/params-list.js @@ -1,14 +1,13 @@ 'use strict'; import {RedocComponent, BaseComponent} from '../base'; -import JsonSchemaView from '../JsonSchemaView/json-schema-view'; import JsonSchema from '../JsonSchema/json-schema'; @RedocComponent({ selector: 'params-list', templateUrl: './lib/components/ParamsList/params-list.html', styleUrls: ['./lib/components/ParamsList/params-list.css'], - directives: [JsonSchemaView, JsonSchema] + directives: [JsonSchema] }) export default class ParamsList extends BaseComponent { constructor(schemaMgr) { diff --git a/lib/components/index.js b/lib/components/index.js index b8b9134f..a00bec90 100644 --- a/lib/components/index.js +++ b/lib/components/index.js @@ -1,7 +1,6 @@ 'use strict'; import ApiInfo from './ApiInfo/api-info'; -import JsonSchemaView from './JsonSchemaView/json-schema-view'; import Method from './Method/method.js'; import MethodsList from './MethodsList/methods-list'; import ParamsList from './ParamsList/params-list'; @@ -14,7 +13,6 @@ import JsonSchema from './JsonSchema/json-schema'; const REDOC_COMPONENTS = [ ApiInfo, - JsonSchemaView, JsonSchema, Method, MethodsList, @@ -28,7 +26,6 @@ const REDOC_COMPONENTS = [ export { ApiInfo, - JsonSchemaView, JsonSchema, Method, MethodsList,