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