1 | import { ObjectElement, BooleanElement } from '@swagger-api/apidom-core';
|
---|
2 | class Operation extends ObjectElement {
|
---|
3 | constructor(content, meta, attributes) {
|
---|
4 | super(content, meta, attributes);
|
---|
5 | this.element = 'operation';
|
---|
6 | }
|
---|
7 | get tags() {
|
---|
8 | return this.get('tags');
|
---|
9 | }
|
---|
10 | set tags(tags) {
|
---|
11 | this.set('tags', tags);
|
---|
12 | }
|
---|
13 | get summary() {
|
---|
14 | return this.get('summary');
|
---|
15 | }
|
---|
16 | set summary(description) {
|
---|
17 | this.set('summary', description);
|
---|
18 | }
|
---|
19 | get description() {
|
---|
20 | return this.get('description');
|
---|
21 | }
|
---|
22 | set description(description) {
|
---|
23 | this.set('description', description);
|
---|
24 | }
|
---|
25 | set externalDocs(externalDocs) {
|
---|
26 | this.set('externalDocs', externalDocs);
|
---|
27 | }
|
---|
28 | get externalDocs() {
|
---|
29 | return this.get('externalDocs');
|
---|
30 | }
|
---|
31 | get operationId() {
|
---|
32 | return this.get('operationId');
|
---|
33 | }
|
---|
34 | set operationId(operationId) {
|
---|
35 | this.set('operationId', operationId);
|
---|
36 | }
|
---|
37 | get parameters() {
|
---|
38 | return this.get('parameters');
|
---|
39 | }
|
---|
40 | set parameters(parameters) {
|
---|
41 | this.set('parameters', parameters);
|
---|
42 | }
|
---|
43 | get requestBody() {
|
---|
44 | return this.get('requestBody');
|
---|
45 | }
|
---|
46 | set requestBody(requestBody) {
|
---|
47 | this.set('requestBody', requestBody);
|
---|
48 | }
|
---|
49 | get responses() {
|
---|
50 | return this.get('responses');
|
---|
51 | }
|
---|
52 | set responses(responses) {
|
---|
53 | this.set('responses', responses);
|
---|
54 | }
|
---|
55 | get callbacks() {
|
---|
56 | return this.get('callbacks');
|
---|
57 | }
|
---|
58 | set callbacks(callbacks) {
|
---|
59 | this.set('callbacks', callbacks);
|
---|
60 | }
|
---|
61 | get deprecated() {
|
---|
62 | if (this.hasKey('deprecated')) {
|
---|
63 | return this.get('deprecated');
|
---|
64 | }
|
---|
65 | return new BooleanElement(false);
|
---|
66 | }
|
---|
67 | set deprecated(deprecated) {
|
---|
68 | this.set('deprecated', deprecated);
|
---|
69 | }
|
---|
70 | get security() {
|
---|
71 | return this.get('security');
|
---|
72 | }
|
---|
73 | set security(security) {
|
---|
74 | this.set('security', security);
|
---|
75 | }
|
---|
76 | get servers() {
|
---|
77 | return this.get('severs');
|
---|
78 | }
|
---|
79 | set servers(servers) {
|
---|
80 | this.set('servers', servers);
|
---|
81 | }
|
---|
82 | }
|
---|
83 | export default Operation; |
---|