Skip to content

Commit bd4dc86

Browse files
asimm241zone117x
authored andcommitted
fix: separate out rosetta request/response schema files from entity files
Several schema files referenced entity files in the docs/api/rosetta directory. They entity files have all been moved to docs/entities/rosetta and references updated.
1 parent 09e373b commit bd4dc86

36 files changed

+273
-378
lines changed

docker-compose.dev.postgres.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
POSTGRES_DB: stacks_blockchain_api
1111
POSTGRES_PORT: 5432
1212
volumes:
13-
- database-data:/var/lib/postgresql/data/ # persist data even if container shuts down
13+
- ./psql-data:/var/lib/postgresql/data/
1414

1515
volumes:
1616
database-data:

docs/api/rosetta/rosetta-account-balance-request.schema.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
"$ref": "./../../entities/rosetta/rosetta-account.schema.json"
1414
},
1515
"block_identifier": {
16-
"$ref": "./../../entities/rosetta/rosetta-block-identifier.schema.json"
16+
"$ref": "./../../entities/rosetta/rosetta-partial-block-identifier.schema.json"
1717
}
18-
},
19-
"additionalProperties": true
18+
}
2019
}

docs/api/rosetta/rosetta-account-balance.example.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/api/rosetta/rosetta-account-response.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema",
3-
"$id": "rosetta-account",
3+
"$id": "rosetta-account-response",
44
"type": "object",
55
"title": "RosettaAccountBalanceResponse",
66
"description": "An AccountBalanceResponse is returned on the /account/balance endpoint. If an account has a balance for each AccountIdentifier describing it (ex: an ERC-20 token balance on a few smart contracts), an account balance request must be made with each AccountIdentifier.",

docs/api/rosetta/rosetta-block-identifier.schema.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/api/rosetta/rosetta-block-request.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"$id": "rosetta-block-request",
44
"type": "object",
55
"title": "RosettaBlockRequest",
6-
"description": "A MempoolTransactionRequest is utilized to retrieve a transaction from the mempool.",
6+
"description": "A BlockRequest is utilized to make a block request on the /block endpoint.",
77
"required": ["network_identifier", "block_identifier"],
88
"properties": {
99
"network_identifier": {
1010
"$ref": "./../../entities/rosetta/rosetta-network-identifier.schema.json"
1111
},
1212
"block_identifier": {
13-
"$ref": "./../../entities/rosetta/rosetta-block-identifier.schema.json"
13+
"$ref": "./../../entities/rosetta/rosetta-partial-block-identifier.schema.json"
1414
}
1515
}
1616
}

docs/api/rosetta/rosetta-block-response.schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"required": [],
88
"properties": {
99
"block": {
10-
"$ref": "./rosetta-block.schema.json"
10+
"$ref": "./../../entities/rosetta/rosetta-block.schema.json"
1111
},
1212
"other_transactions": {
1313
"type": "array",
1414
"description": "Some blockchains may require additional transactions to be fetched that weren't returned in the block response (ex: block only returns transaction hashes). For blockchains with a lot of transactions in each block, this can be very useful as consumers can concurrently fetch all transactions returned.",
1515
"items": {
16-
"$ref": "./rosetta-other-transaction-identifier.schema.json"
16+
"$ref": "./../../entities/rosetta/rosetta-other-transaction-identifier.schema.json"
1717
}
1818
}
1919
}

docs/api/rosetta/rosetta-block-transaction-request.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"$ref": "./../../entities/rosetta/rosetta-block-identifier.schema.json"
1414
},
1515
"transaction_identifier": {
16-
"$ref": "./rosetta-transaction-identifier.schema.json"
16+
"$ref": "./../../entities/rosetta/rosetta-transaction-identifier.schema.json"
1717
}
1818
}
1919
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema",
3+
"$id": "rosetta-block-transaction-response",
4+
"type": "object",
5+
"title": "RosettaBlockTransactionResponse",
6+
"description": "A BlockTransactionResponse contains information about a block transaction.",
7+
"required": ["transaction"],
8+
"properties": {
9+
"transaction": {
10+
"$ref": "./../../entities/rosetta/rosetta-transaction.schema.json"
11+
}
12+
}
13+
}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema",
33
"type": "object",
4-
"title": "RosettaMempoolTransactionRequest",
5-
"description": "Get a transaction in the mempool by its Transaction Identifier. This is a separate request than fetching a block transaction (/block/transaction) because some blockchain nodes need to know that a transaction query is for something in the mempool instead of a transaction in a block. Transactions may not be fully parsable until they are in a block (ex: may not be possible to determine the fee to pay before a transaction is executed). On this endpoint, it is ok that returned transactions are only estimates of what may actually be included in a block.",
6-
"required": ["network_identifier", "transaction_identifier"],
4+
"title": "RosettaMempoolTransactionListRequest",
5+
"description": "Get all Transaction Identifiers in the mempool",
6+
"required": ["network_identifier"],
77
"properties": {
88
"network_identifier": {
9-
"$ref": "./rosetta-network-identifier.schema.json"
9+
"description": "The network_identifier specifies which network a particular object is associated with.",
10+
"$ref": "./../../entities/rosetta/rosetta-network-identifier.schema.json"
1011
},
11-
"transaction_identifier": {
12-
"$ref": "./rosetta-transaction-identifier.schema.json"
12+
"metadata": {
13+
"type": "object"
1314
}
1415
}
1516
}

0 commit comments

Comments
 (0)