mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 11:26:37 +03:00
28 lines
638 B
JavaScript
28 lines
638 B
JavaScript
|
'use strict';
|
||
|
|
||
|
import {Component, View, CORE_DIRECTIVES} from 'angular2/angular2';
|
||
|
import {SchemaManager} from '../../utils/SchemaManager';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'redoc-api-info'
|
||
|
})
|
||
|
@View({
|
||
|
templateUrl: './lib/components/RedocInfo/redoc-info.html',
|
||
|
styleUrls: ['./lib/components/RedocInfo/redoc-info.css'],
|
||
|
directives: [CORE_DIRECTIVES]
|
||
|
})
|
||
|
export class RedocInfo {
|
||
|
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
|
||
|
}
|
||
|
}
|
||
|
RedocInfo.parameters = [[SchemaManager]]
|