2015-10-08 23:21:51 +03:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
import {JsonPointer} from '../../utils/JsonPointer';
|
2015-10-09 23:19:35 +03:00
|
|
|
import {RedocComponent, BaseComponent} from '../base';
|
2015-10-10 16:01:41 +03:00
|
|
|
import {ParamsList} from '../ParamsList/params-list';
|
2015-10-21 12:20:14 +03:00
|
|
|
import {ResponsesList} from '../ResponsesList/responses-list';
|
2015-10-21 17:24:04 +03:00
|
|
|
import {SchemaSample} from '../SchemaSample/schema-sample';
|
2015-10-08 23:21:51 +03:00
|
|
|
|
2015-10-09 23:19:35 +03:00
|
|
|
@RedocComponent({
|
2015-10-08 23:21:51 +03:00
|
|
|
selector: 'method',
|
2015-10-10 15:34:46 +03:00
|
|
|
templateUrl: './lib/components/Method/method.html',
|
2015-10-10 16:01:41 +03:00
|
|
|
styleUrls: ['./lib/components/Method/method.css'],
|
2015-10-21 17:24:04 +03:00
|
|
|
directives: [ParamsList, ResponsesList, SchemaSample]
|
2015-10-08 23:21:51 +03:00
|
|
|
})
|
2015-10-09 23:19:35 +03:00
|
|
|
export class Method extends BaseComponent {
|
2015-10-08 23:21:51 +03:00
|
|
|
constructor(schemaMgr) {
|
2015-10-09 23:19:35 +03:00
|
|
|
super(schemaMgr);
|
2015-10-08 23:21:51 +03:00
|
|
|
}
|
|
|
|
|
2015-10-09 23:19:35 +03:00
|
|
|
prepareModel() {
|
2015-10-08 23:21:51 +03:00
|
|
|
this.data = {};
|
2015-10-09 08:31:09 +03:00
|
|
|
this.data.method = JsonPointer.baseName(this.pointer);
|
|
|
|
this.data.path = JsonPointer.baseName(this.pointer, 2);
|
2015-10-09 23:19:35 +03:00
|
|
|
this.data.methodInfo = this.componentSchema;
|
2015-10-08 23:21:51 +03:00
|
|
|
}
|
|
|
|
}
|