61
61
/transactions :
62
62
get :
63
63
tags :
64
- - resource- api
64
+ - api
65
65
summary : " Get transactions"
66
66
description : " get transactions"
67
67
operationId : getTransactions
@@ -74,63 +74,43 @@ paths:
74
74
responses :
75
75
200 :
76
76
description : successful operation
77
+ headers :
78
+ X-Total-Count :
79
+ schema :
80
+ type : integer
81
+ description : Total records count
77
82
content :
78
83
application/json :
79
84
schema :
80
- type : object
81
- properties :
82
- count :
83
- type : integer
84
- items :
85
- type : array
86
- items :
87
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
88
- text/yaml :
89
- schema :
90
- type : object
91
- properties :
92
- count :
93
- type : integer
94
- items :
95
- type : array
96
- items :
97
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
98
- 400 :
99
- description : " invalid query for transactions, some data was sent in incorrect format."
85
+ type : array
86
+ items :
87
+ $ref : " ./transactions.yaml#/components/schemas/Transaction"
100
88
500 :
101
89
description : " problem with getting transactions"
102
90
post :
103
91
tags :
104
- - resource- api
92
+ - api
105
93
summary : " Create new transaction"
106
94
description : " Create new transaction"
107
95
operationId : createTransaction
108
96
requestBody :
109
97
content :
110
98
application/json :
111
99
schema :
112
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
113
- text/yaml :
114
- schema :
115
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
100
+ $ref : " ./transactions.yaml#/components/schemas/Transaction"
116
101
responses :
117
- 201 :
102
+ 200 :
118
103
description : successful operation
119
104
content :
120
105
application/json :
121
106
schema :
122
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
123
- text/yaml :
124
- schema :
125
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
107
+ $ref : " ./transactions.yaml#/components/schemas/Transaction"
126
108
400 :
127
109
description : " trying to create a transaction with an already existing ID"
128
- 500 :
129
- description : " problem creating a transaction"
130
110
/transactions/{transactionId} :
131
111
get :
132
112
tags :
133
- - resource- api
113
+ - api
134
114
parameters :
135
115
- $ref : " ./parameters.yaml#/components/parameters/transactionId"
136
116
summary : " get transaction"
@@ -142,17 +122,12 @@ paths:
142
122
content :
143
123
application/json :
144
124
schema :
145
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
146
- text/yaml :
147
- schema :
148
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
149
- 404 :
150
- description : " transaction not found"
125
+ $ref : " ./transactions.yaml#/components/schemas/Transaction"
151
126
500 :
152
- description : " problem getting an transaction"
127
+ description : " problem with getting a transaction"
153
128
put :
154
129
tags :
155
- - resource- api
130
+ - api
156
131
parameters :
157
132
- $ref : " ./parameters.yaml#/components/parameters/transactionId"
158
133
summary : " update transaction"
@@ -162,41 +137,23 @@ paths:
162
137
content :
163
138
application/json :
164
139
schema :
165
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
166
- text/yaml :
167
- schema :
168
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
140
+ $ref : " ./transactions.yaml#/components/schemas/Transaction"
169
141
responses :
170
- 200 :
142
+ 204 :
171
143
description : successful operation
172
- content :
173
- application/json :
174
- schema :
175
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
176
- text/yaml :
177
- schema :
178
- $ref : " ./transactions.yaml#/components/schemas/TransactionResource"
179
- 400 :
180
- description : " invalid transaction, some data was sent in incorrect format."
181
- 404 :
182
- description : " transaction not found"
183
144
500 :
184
- description : " problem updating a transaction"
145
+ description : " problem with updating transaction"
185
146
delete :
186
147
tags :
187
- - resource- api
148
+ - api
188
149
parameters :
189
150
- $ref : " ./parameters.yaml#/components/parameters/transactionId"
190
151
summary : " delete a transaction"
191
152
description : " delete a transaction"
192
153
operationId : deleteTransaction
193
154
responses :
194
- 204 :
195
- description : successful operation
196
- 404 :
197
- description : " transaction not found"
198
- 500 :
199
- description : " problem deleting a transaction"
155
+ " 204 " :
156
+ description : OK
200
157
/transactions/{transactionId}/version/{version} :
201
158
get :
202
159
tags :
0 commit comments