Skip to content

Commit 2d478f7

Browse files
committed
remove system and schedule tx from openapi spec, integrate into existing endpoints
1 parent 7076bf2 commit 2d478f7

File tree

10 files changed

+102
-1334
lines changed

10 files changed

+102
-1334
lines changed

openapi/access.yaml

Lines changed: 15 additions & 135 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,17 @@ paths:
123123
/transactions/{id}:
124124
get:
125125
summary: Get a Transaction by ID.
126-
description: Get a transaction data by the provided transaction ID.
126+
description: Get a transaction data by the provided transaction ID. If the transaction is a scheduled transaction, it can alternatively be retrieved by the scheduled transaction ID field returned by the system contract.
127127
tags:
128128
- Transactions
129129
parameters:
130-
- description: The ID of the transaction to get.
130+
- description: The ID of the transaction, or id field of the scheduled transaction returned by the system contract.
131131
name: id
132132
in: path
133133
schema:
134-
$ref: '#/components/schemas/Identifier'
134+
oneOf:
135+
- $ref: '#/components/schemas/Identifier'
136+
- $ref: '#/components/schemas/ScheduledTransactionId'
135137
required: true
136138
- $ref: '#/components/parameters/blockIdParam'
137139
- $ref: '#/components/parameters/collectionIdParam'
@@ -152,16 +154,18 @@ paths:
152154
$ref: '#/components/responses/500InternalServerError'
153155
/transaction_results/{transaction_id}:
154156
get:
155-
summary: Get a Transaction Result by ID.
156-
description: Get transaction result by the transaction result ID.
157+
summary: Get a Transaction Result by transaction ID or scheduled transaction ID.
158+
description: Get transaction result by the transaction's ID. If the transaction is a scheduled transaction, it can alternatively be retrieved by the scheduled transaction ID field returned by the system contract.
157159
tags:
158160
- Transactions
159161
parameters:
160-
- description: The transaction ID of the transaction result.
162+
- description: The transaction ID of the transaction result, or id field of the scheduled transaction returned by the system contract.
161163
name: transaction_id
162164
in: path
163165
schema:
164-
$ref: '#/components/schemas/Identifier'
166+
oneOf:
167+
- $ref: '#/components/schemas/Identifier'
168+
- $ref: '#/components/schemas/ScheduledTransactionId'
165169
required: true
166170
- $ref: '#/components/parameters/blockIdParam'
167171
- $ref: '#/components/parameters/collectionIdParam'
@@ -258,134 +262,6 @@ paths:
258262
$ref: '#/components/responses/400BadRequest'
259263
'500':
260264
$ref: '#/components/responses/500InternalServerError'
261-
/system_transactions/{id}:
262-
get:
263-
summary: Get a System Transaction by ID.
264-
description: Get a system transaction body by the provided transaction ID.
265-
tags:
266-
- Transactions
267-
parameters:
268-
- description: The ID of the system transaction to get.
269-
name: id
270-
in: path
271-
schema:
272-
$ref: '#/components/schemas/Identifier'
273-
required: true
274-
- $ref: '#/components/parameters/blockIdParam'
275-
- $ref: '#/components/parameters/expandParam'
276-
- $ref: '#/components/parameters/selectParam'
277-
- $ref: '#/components/parameters/agreeingExecutorsCount'
278-
- $ref: '#/components/parameters/requiredExecutorIds'
279-
- $ref: '#/components/parameters/includeExecutorMetadata'
280-
responses:
281-
'200':
282-
description: OK
283-
content:
284-
application/json:
285-
schema:
286-
$ref: '#/components/schemas/Transaction'
287-
'400':
288-
$ref: '#/components/responses/400BadRequest'
289-
'404':
290-
$ref: '#/components/responses/404NotFound'
291-
'500':
292-
$ref: '#/components/responses/500InternalServerError'
293-
/system_transaction_results/{transaction_id}:
294-
get:
295-
summary: Get a System Transaction Result by ID.
296-
description: Get system transaction result by the transaction result ID.
297-
tags:
298-
- Transactions
299-
parameters:
300-
- description: The system transaction ID of the transaction result.
301-
name: transaction_id
302-
in: path
303-
schema:
304-
$ref: '#/components/schemas/Identifier'
305-
required: true
306-
- $ref: '#/components/parameters/blockIdParam'
307-
- $ref: '#/components/parameters/expandParam'
308-
- $ref: '#/components/parameters/selectParam'
309-
- $ref: '#/components/parameters/agreeingExecutorsCount'
310-
- $ref: '#/components/parameters/requiredExecutorIds'
311-
- $ref: '#/components/parameters/includeExecutorMetadata'
312-
responses:
313-
'200':
314-
description: OK
315-
content:
316-
application/json:
317-
schema:
318-
$ref: '#/components/schemas/TransactionResult'
319-
'400':
320-
$ref: '#/components/responses/400BadRequest'
321-
'404':
322-
$ref: '#/components/responses/404NotFound'
323-
'500':
324-
$ref: '#/components/responses/500InternalServerError'
325-
/scheduled_transactions/{id}:
326-
get:
327-
summary: Get a Scheduled Transaction by ID.
328-
description: Get a scheduled transaction body by the provided scheduled transaction id field.
329-
tags:
330-
- Transactions
331-
parameters:
332-
- description: The scheduled transaction's `id` field returned by the system contract.
333-
name: id
334-
in: path
335-
schema:
336-
type: string
337-
format: uint64
338-
required: true
339-
- $ref: '#/components/parameters/expandParam'
340-
- $ref: '#/components/parameters/selectParam'
341-
- $ref: '#/components/parameters/agreeingExecutorsCount'
342-
- $ref: '#/components/parameters/requiredExecutorIds'
343-
- $ref: '#/components/parameters/includeExecutorMetadata'
344-
responses:
345-
'200':
346-
description: OK
347-
content:
348-
application/json:
349-
schema:
350-
$ref: '#/components/schemas/Transaction'
351-
'400':
352-
$ref: '#/components/responses/400BadRequest'
353-
'404':
354-
$ref: '#/components/responses/404NotFound'
355-
'500':
356-
$ref: '#/components/responses/500InternalServerError'
357-
/scheduled_transaction_results/{id}:
358-
get:
359-
summary: Get a Scheduled Transaction Result by ID.
360-
description: Get scheduled transaction result by the scheduled transaction ID.
361-
tags:
362-
- Transactions
363-
parameters:
364-
- description: The scheduled transaction's `id` field returned by the system contract.
365-
name: id
366-
in: path
367-
schema:
368-
type: string
369-
format: uint64
370-
required: true
371-
- $ref: '#/components/parameters/expandParam'
372-
- $ref: '#/components/parameters/selectParam'
373-
- $ref: '#/components/parameters/agreeingExecutorsCount'
374-
- $ref: '#/components/parameters/requiredExecutorIds'
375-
- $ref: '#/components/parameters/includeExecutorMetadata'
376-
responses:
377-
'200':
378-
description: OK
379-
content:
380-
application/json:
381-
schema:
382-
$ref: '#/components/schemas/TransactionResult'
383-
'400':
384-
$ref: '#/components/responses/400BadRequest'
385-
'404':
386-
$ref: '#/components/responses/404NotFound'
387-
'500':
388-
$ref: '#/components/responses/500InternalServerError'
389265
/collections/{id}:
390266
get:
391267
summary: Gets a Collection by ID
@@ -1358,6 +1234,10 @@ components:
13581234
type: string
13591235
format: hexadecimal
13601236
pattern: '[a-fA-F0-9]{64}'
1237+
ScheduledTransactionId:
1238+
description: The ID of a scheduled transaction.
1239+
type: string
1240+
format: uint64
13611241
Signature:
13621242
description: A variable length signature.
13631243
type: string
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.73
1+
3.0.75

openapi/go-client-generated/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ Class | Method | HTTP request | Description
3434
*NodeVersionInfoApi* | [**NodeVersionInfoGet**](docs/NodeVersionInfoApi.md#nodeversioninfoget) | **Get** /node_version_info | Get Node Version Information
3535
*ScriptsApi* | [**ScriptsPost**](docs/ScriptsApi.md#scriptspost) | **Post** /scripts | Execute a Cadence Script
3636
*SubscribeEventsApi* | [**SubscribeEventsGet**](docs/SubscribeEventsApi.md#subscribeeventsget) | **Get** /subscribe_events | Subscribe events
37-
*TransactionsApi* | [**ScheduledTransactionResultsIdGet**](docs/TransactionsApi.md#scheduledtransactionresultsidget) | **Get** /scheduled_transaction_results/{id} | Get a Scheduled Transaction Result by ID.
38-
*TransactionsApi* | [**ScheduledTransactionsIdGet**](docs/TransactionsApi.md#scheduledtransactionsidget) | **Get** /scheduled_transactions/{id} | Get a Scheduled Transaction by ID.
39-
*TransactionsApi* | [**SystemTransactionResultsTransactionIdGet**](docs/TransactionsApi.md#systemtransactionresultstransactionidget) | **Get** /system_transaction_results/{transaction_id} | Get a System Transaction Result by ID.
40-
*TransactionsApi* | [**SystemTransactionsIdGet**](docs/TransactionsApi.md#systemtransactionsidget) | **Get** /system_transactions/{id} | Get a System Transaction by ID.
41-
*TransactionsApi* | [**TransactionResultsTransactionIdGet**](docs/TransactionsApi.md#transactionresultstransactionidget) | **Get** /transaction_results/{transaction_id} | Get a Transaction Result by ID.
37+
*TransactionsApi* | [**TransactionResultsTransactionIdGet**](docs/TransactionsApi.md#transactionresultstransactionidget) | **Get** /transaction_results/{transaction_id} | Get a Transaction Result by transaction ID or scheduled transaction ID.
4238
*TransactionsApi* | [**TransactionsIdGet**](docs/TransactionsApi.md#transactionsidget) | **Get** /transactions/{id} | Get a Transaction by ID.
4339
*TransactionsApi* | [**TransactionsPost**](docs/TransactionsApi.md#transactionspost) | **Post** /transactions | Submit a Transaction
4440

@@ -66,6 +62,7 @@ Class | Method | HTTP request | Description
6662
- [ExecutionResult](docs/ExecutionResult.md)
6763
- [ExecutorMetadata](docs/ExecutorMetadata.md)
6864
- [HashingAlgorithm](docs/HashingAlgorithm.md)
65+
- [Id](docs/Id.md)
6966
- [InlineResponse200](docs/InlineResponse200.md)
7067
- [Links](docs/Links.md)
7168
- [Metadata](docs/Metadata.md)
@@ -79,6 +76,7 @@ Class | Method | HTTP request | Description
7976
- [Transaction](docs/Transaction.md)
8077
- [TransactionExecution](docs/TransactionExecution.md)
8178
- [TransactionExpandable](docs/TransactionExpandable.md)
79+
- [TransactionId](docs/TransactionId.md)
8280
- [TransactionResult](docs/TransactionResult.md)
8381
- [TransactionSignature](docs/TransactionSignature.md)
8482
- [TransactionStatus](docs/TransactionStatus.md)

0 commit comments

Comments
 (0)