mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-27 19:13:44 +03:00
27 lines
687 B
JavaScript
27 lines
687 B
JavaScript
'use strict';
|
|
|
|
import {RedocComponent, BaseComponent} from '../base';
|
|
import {methods as swaggerMethods} from '../../utils/swagger-defs';
|
|
import {Method} from '../Method/method';
|
|
|
|
@RedocComponent({
|
|
selector: 'methods-list',
|
|
templateUrl: './lib/components/MethodsList/methods-list.html',
|
|
styleUrls: ['./lib/components/MethodsList/methods-list.css'],
|
|
directives: [Method]
|
|
})
|
|
export class MethodsList extends BaseComponent {
|
|
|
|
constructor(schemaMgr) {
|
|
super(schemaMgr);
|
|
}
|
|
|
|
prepareModel() {
|
|
this.data = {};
|
|
let pathInfo = this.componentSchema;
|
|
|
|
this.data.methods = Object.keys(pathInfo).filter((k) => swaggerMethods.has(k));
|
|
// TODO: check $ref field
|
|
}
|
|
}
|