2015-10-07 12:47:57 +03:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import {Component, View} from 'angular2/angular2';
|
|
|
|
import {SchemaManager} from '../../utils/SchemaManager';
|
2015-10-08 23:27:02 +03:00
|
|
|
import {ApiInfo} from '../ApiInfo/api-info';
|
2015-10-08 23:21:51 +03:00
|
|
|
import {PathsList} from '../PathsList/paths-list';
|
2015-10-07 12:47:57 +03:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'redoc',
|
|
|
|
bindings: [SchemaManager]
|
|
|
|
})
|
|
|
|
@View({
|
|
|
|
templateUrl: './lib/components/Redoc/redoc.html',
|
2015-10-08 23:27:02 +03:00
|
|
|
directives: [ApiInfo, PathsList]
|
2015-10-07 12:47:57 +03:00
|
|
|
})
|
|
|
|
export class Redoc {
|
|
|
|
constructor(schemaMgr) {
|
|
|
|
this.data = null;
|
|
|
|
this.schema = schemaMgr.schema;
|
|
|
|
this.extractData();
|
|
|
|
}
|
|
|
|
|
|
|
|
extractData() {
|
|
|
|
this.data = this.schema
|
|
|
|
//TODO: check and apply hooks to modify data
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Redoc.parameters = [[SchemaManager]]
|