mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 11:26:37 +03:00
25 lines
666 B
JavaScript
25 lines
666 B
JavaScript
'use strict';
|
|
|
|
import {JsonPointer} from '../../utils/JsonPointer';
|
|
import {RedocComponent, BaseComponent} from '../base';
|
|
import {ParamsList} from '../ParamsList/params-list';
|
|
|
|
@RedocComponent({
|
|
selector: 'method',
|
|
templateUrl: './lib/components/Method/method.html',
|
|
styleUrls: ['./lib/components/Method/method.css'],
|
|
directives: [ParamsList]
|
|
})
|
|
export class Method extends BaseComponent {
|
|
constructor(schemaMgr) {
|
|
super(schemaMgr);
|
|
}
|
|
|
|
prepareModel() {
|
|
this.data = {};
|
|
this.data.method = JsonPointer.baseName(this.pointer);
|
|
this.data.path = JsonPointer.baseName(this.pointer, 2);
|
|
this.data.methodInfo = this.componentSchema;
|
|
}
|
|
}
|