Skip to content

Commit

Permalink
Revert "feat: change openapi spec for transactions to consider resour…
Browse files Browse the repository at this point in the history
…ce manager" (#2497)

Revert "feat: change openapi spec for transactions to consider resource manager (#2486)"

This reverts commit 22f7dd1.
  • Loading branch information
xoscar authored May 5, 2023
1 parent 1791556 commit 490d47c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 85 deletions.
89 changes: 23 additions & 66 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ paths:
/transactions:
get:
tags:
- resource-api
- api
summary: "Get transactions"
description: "get transactions"
operationId: getTransactions
Expand All @@ -74,63 +74,43 @@ paths:
responses:
200:
description: successful operation
headers:
X-Total-Count:
schema:
type: integer
description: Total records count
content:
application/json:
schema:
type: object
properties:
count:
type: integer
items:
type: array
items:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
text/yaml:
schema:
type: object
properties:
count:
type: integer
items:
type: array
items:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
400:
description: "invalid query for transactions, some data was sent in incorrect format."
type: array
items:
$ref: "./transactions.yaml#/components/schemas/Transaction"
500:
description: "problem with getting transactions"
post:
tags:
- resource-api
- api
summary: "Create new transaction"
description: "Create new transaction"
operationId: createTransaction
requestBody:
content:
application/json:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
text/yaml:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
$ref: "./transactions.yaml#/components/schemas/Transaction"
responses:
201:
200:
description: successful operation
content:
application/json:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
text/yaml:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
$ref: "./transactions.yaml#/components/schemas/Transaction"
400:
description: "trying to create a transaction with an already existing ID"
500:
description: "problem creating a transaction"
/transactions/{transactionId}:
get:
tags:
- resource-api
- api
parameters:
- $ref: "./parameters.yaml#/components/parameters/transactionId"
summary: "get transaction"
Expand All @@ -142,17 +122,12 @@ paths:
content:
application/json:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
text/yaml:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
404:
description: "transaction not found"
$ref: "./transactions.yaml#/components/schemas/Transaction"
500:
description: "problem getting an transaction"
description: "problem with getting a transaction"
put:
tags:
- resource-api
- api
parameters:
- $ref: "./parameters.yaml#/components/parameters/transactionId"
summary: "update transaction"
Expand All @@ -162,41 +137,23 @@ paths:
content:
application/json:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
text/yaml:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
$ref: "./transactions.yaml#/components/schemas/Transaction"
responses:
200:
204:
description: successful operation
content:
application/json:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
text/yaml:
schema:
$ref: "./transactions.yaml#/components/schemas/TransactionResource"
400:
description: "invalid transaction, some data was sent in incorrect format."
404:
description: "transaction not found"
500:
description: "problem updating a transaction"
description: "problem with updating transaction"
delete:
tags:
- resource-api
- api
parameters:
- $ref: "./parameters.yaml#/components/parameters/transactionId"
summary: "delete a transaction"
description: "delete a transaction"
operationId: deleteTransaction
responses:
204:
description: successful operation
404:
description: "transaction not found"
500:
description: "problem deleting a transaction"
"204":
description: OK
/transactions/{transactionId}/version/{version}:
get:
tags:
Expand Down
19 changes: 0 additions & 19 deletions api/transactions.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,6 @@
openapi: 3.0.0
components:
schemas:

TransactionResource:
type: object
description: "Represents a transaction structured into the Resources format."
properties:
type:
type: string
description: "Represents the type of this resource. It should always be set as 'Transaction'."
enum:
- Transaction
spec:
$ref: "#/components/schemas/Transaction"

Transaction:
type: object
properties:
Expand All @@ -29,12 +16,6 @@ components:
description: version number of the test
steps:
type: array
description: list of steps of the transaction containing just each test id
items:
type: string
fullSteps:
type: array
description: list of steps of the transaction containing the whole test object
items:
$ref: "./tests.yaml#/components/schemas/Test"
createdAt:
Expand Down

0 comments on commit 490d47c

Please sign in to comment.