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

23 lines
650 B
JavaScript
Raw Normal View History

'use strict';
2016-05-06 12:46:41 +03:00
import { SchemaManager, RedocComponent, BaseComponent } from '../base';
import { OptionsService } from '../../services/index';
@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-05-06 12:46:41 +03:00
@Reflect.metadata('parameters', [[SchemaManager], [OptionsService]])
2016-05-06 00:48:41 +03:00
export class ApiInfo extends BaseComponent {
2016-05-06 12:46:41 +03:00
constructor(schemaMgr, optionsService) {
super(schemaMgr);
2016-05-06 12:46:41 +03:00
this.optionsService = optionsService;
}
prepareModel() {
this.data = this.componentSchema.info;
2016-05-06 12:46:41 +03:00
this.specUrl = this.optionsService.options.specUrl;
}
}