redoc/lib/components/ApiInfo/api-info.js

23 lines
629 B
JavaScript
Raw Normal View History

'use strict';
2016-03-31 00:20:31 +03:00
import {SchemaManager, RedocComponent, BaseComponent} from '../base';
import OptionsManager from '../../options';
@RedocComponent({
selector: 'api-info',
2015-10-08 23:27:02 +03:00
styleUrls: ['./lib/components/ApiInfo/api-info.css'],
templateUrl: './lib/components/ApiInfo/api-info.html'
})
2016-03-31 00:20:31 +03:00
@Reflect.metadata('parameters', [[SchemaManager], [OptionsManager]])
2015-10-27 20:44:08 +03:00
export default class ApiInfo extends BaseComponent {
2016-03-31 00:20:31 +03:00
constructor(schemaMgr, optionsMgr) {
super(schemaMgr);
2016-03-31 00:20:31 +03:00
this.optionsMgr = optionsMgr;
}
prepareModel() {
this.data = this.componentSchema.info;
2016-03-31 00:20:31 +03:00
this.specUrl = this.optionsMgr.options.specUrl;
}
}