Skip to content

Commit 490d47c

Browse files
authored
Revert "feat: change openapi spec for transactions to consider resource manager" (#2497)
Revert "feat: change openapi spec for transactions to consider resource manager (#2486)" This reverts commit 22f7dd1.
1 parent 1791556 commit 490d47c

File tree

2 files changed

+23
-85
lines changed

2 files changed

+23
-85
lines changed

api/openapi.yaml

Lines changed: 23 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ paths:
6161
/transactions:
6262
get:
6363
tags:
64-
- resource-api
64+
- api
6565
summary: "Get transactions"
6666
description: "get transactions"
6767
operationId: getTransactions
@@ -74,63 +74,43 @@ paths:
7474
responses:
7575
200:
7676
description: successful operation
77+
headers:
78+
X-Total-Count:
79+
schema:
80+
type: integer
81+
description: Total records count
7782
content:
7883
application/json:
7984
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"
10088
500:
10189
description: "problem with getting transactions"
10290
post:
10391
tags:
104-
- resource-api
92+
- api
10593
summary: "Create new transaction"
10694
description: "Create new transaction"
10795
operationId: createTransaction
10896
requestBody:
10997
content:
11098
application/json:
11199
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"
116101
responses:
117-
201:
102+
200:
118103
description: successful operation
119104
content:
120105
application/json:
121106
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"
126108
400:
127109
description: "trying to create a transaction with an already existing ID"
128-
500:
129-
description: "problem creating a transaction"
130110
/transactions/{transactionId}:
131111
get:
132112
tags:
133-
- resource-api
113+
- api
134114
parameters:
135115
- $ref: "./parameters.yaml#/components/parameters/transactionId"
136116
summary: "get transaction"
@@ -142,17 +122,12 @@ paths:
142122
content:
143123
application/json:
144124
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"
151126
500:
152-
description: "problem getting an transaction"
127+
description: "problem with getting a transaction"
153128
put:
154129
tags:
155-
- resource-api
130+
- api
156131
parameters:
157132
- $ref: "./parameters.yaml#/components/parameters/transactionId"
158133
summary: "update transaction"
@@ -162,41 +137,23 @@ paths:
162137
content:
163138
application/json:
164139
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"
169141
responses:
170-
200:
142+
204:
171143
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"
183144
500:
184-
description: "problem updating a transaction"
145+
description: "problem with updating transaction"
185146
delete:
186147
tags:
187-
- resource-api
148+
- api
188149
parameters:
189150
- $ref: "./parameters.yaml#/components/parameters/transactionId"
190151
summary: "delete a transaction"
191152
description: "delete a transaction"
192153
operationId: deleteTransaction
193154
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
200157
/transactions/{transactionId}/version/{version}:
201158
get:
202159
tags:

api/transactions.yaml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
openapi: 3.0.0
22
components:
33
schemas:
4-
5-
TransactionResource:
6-
type: object
7-
description: "Represents a transaction structured into the Resources format."
8-
properties:
9-
type:
10-
type: string
11-
description: "Represents the type of this resource. It should always be set as 'Transaction'."
12-
enum:
13-
- Transaction
14-
spec:
15-
$ref: "#/components/schemas/Transaction"
16-
174
Transaction:
185
type: object
196
properties:
@@ -29,12 +16,6 @@ components:
2916
description: version number of the test
3017
steps:
3118
type: array
32-
description: list of steps of the transaction containing just each test id
33-
items:
34-
type: string
35-
fullSteps:
36-
type: array
37-
description: list of steps of the transaction containing the whole test object
3819
items:
3920
$ref: "./tests.yaml#/components/schemas/Test"
4021
createdAt:

0 commit comments

Comments
 (0)