Skip to content

Commit

Permalink
Merge pull request #29 from coinbase/patrick/unify-tx-identifier
Browse files Browse the repository at this point in the history
TransactionIdentifierResponse + change default status to 500
  • Loading branch information
patrick-ogrady authored Jul 25, 2020
2 parents a3a6607 + b02ae0f commit 0d12fa7
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 64 deletions.
54 changes: 21 additions & 33 deletions api.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"openapi":"3.0.2",
"info": {
"version":"1.4.0",
"version":"1.4.1",
"title":"Rosetta",
"description":"Build Once. Integrate Your Blockchain Everywhere.",
"license": {
Expand Down Expand Up @@ -39,7 +39,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -81,7 +81,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -123,7 +123,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -165,7 +165,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -207,7 +207,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -249,7 +249,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -291,7 +291,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -333,7 +333,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -375,7 +375,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -417,7 +417,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -459,7 +459,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -501,7 +501,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -543,7 +543,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -585,7 +585,7 @@
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -622,12 +622,12 @@
"content": {
"application/json": {
"schema": {
"$ref":"#/components/schemas/ConstructionHashResponse"
"$ref":"#/components/schemas/TransactionIdentifierResponse"
}
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -664,12 +664,12 @@
"content": {
"application/json": {
"schema": {
"$ref":"#/components/schemas/ConstructionSubmitResponse"
"$ref":"#/components/schemas/TransactionIdentifierResponse"
}
}
}
},
"default": {
"500": {
"description":"unexpected error",
"content": {
"application/json": {
Expand Down Expand Up @@ -1678,18 +1678,6 @@
}
}
},
"ConstructionHashResponse": {
"description":"ConstructionHashResponse is the output of the `/construction/hash` endpoint.",
"type":"object",
"required": [
"transaction_hash"
],
"properties": {
"transaction_hash": {
"type":"string"
}
}
},
"ConstructionSubmitRequest": {
"description":"The transaction submission request includes a signed transaction.",
"type":"object",
Expand All @@ -1706,8 +1694,8 @@
}
}
},
"ConstructionSubmitResponse": {
"description":"A TransactionSubmitResponse contains the transaction_identifier of a submitted transaction that was accepted into the mempool.",
"TransactionIdentifierResponse": {
"description":"TransactionIdentifierResponse contains the transaction_identifier of a transaction that was submitted to either `/construction/hash` or `/construction/submit`.",
"type":"object",
"required": [
"transaction_identifier"
Expand Down
54 changes: 23 additions & 31 deletions api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

openapi: 3.0.2
info:
version: 1.4.0
version: 1.4.1
title: Rosetta
description: |
Build Once. Integrate Your Blockchain Everywhere.
Expand Down Expand Up @@ -44,7 +44,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/NetworkListResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -72,7 +72,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/NetworkStatusResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -104,7 +104,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/NetworkOptionsResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -143,7 +143,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/BlockResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -189,7 +189,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/BlockTransactionResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand All @@ -215,7 +215,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/MempoolResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -250,7 +250,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/MempoolTransactionResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -293,7 +293,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/AccountBalanceResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -323,7 +323,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ConstructionDeriveResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -356,7 +356,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ConstructionPreprocessResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -392,7 +392,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ConstructionMetadataResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -429,7 +429,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ConstructionPayloadsResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -460,7 +460,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ConstructionCombineResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -491,7 +491,7 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ConstructionParseResponse'
default:
'500':
description: unexpected error
content:
application/json:
Expand All @@ -518,8 +518,8 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ConstructionHashResponse'
default:
$ref: '#/components/schemas/TransactionIdentifierResponse'
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -552,8 +552,8 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/ConstructionSubmitResponse'
default:
$ref: '#/components/schemas/TransactionIdentifierResponse'
'500':
description: unexpected error
content:
application/json:
Expand Down Expand Up @@ -1054,15 +1054,6 @@ components:
$ref: '#/components/schemas/NetworkIdentifier'
signed_transaction:
type: string
ConstructionHashResponse:
description: |
ConstructionHashResponse is the output of the `/construction/hash` endpoint.
type: object
required:
- transaction_hash
properties:
transaction_hash:
type: string
ConstructionSubmitRequest:
description: |
The transaction submission request includes a signed transaction.
Expand All @@ -1075,10 +1066,11 @@ components:
$ref: '#/components/schemas/NetworkIdentifier'
signed_transaction:
type: string
ConstructionSubmitResponse:
TransactionIdentifierResponse:
description: |
A TransactionSubmitResponse contains the transaction_identifier of a
submitted transaction that was accepted into the mempool.
TransactionIdentifierResponse contains the transaction_identifier of a
transaction that was submitted to either `/construction/hash` or
`/construction/submit`.
type: object
required:
- transaction_identifier
Expand Down

0 comments on commit 0d12fa7

Please sign in to comment.