Skip to content

Commit 666b8a6

Browse files
authored
chore: fix openapi schema validation errors, clean up type definitions (#1170)
* fix: openapi lint validator * fix: balances schema * fix: add title to all entities * fix: some additionalProperties and duplicate names * fix: remove additional properties for rosetta * fix: rosetta tests * style: remove empty description
1 parent d79abf0 commit 666b8a6

File tree

234 files changed

+5571
-8728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+5571
-8728
lines changed

docs/.validaterc

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

docs/api/address/get-address-assets.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns address assets",
43
"title": "AddressAssetsListResponse",
54
"type": "object",
5+
"additionalProperties": false,
66
"required": ["results", "limit", "offset", "total"],
77
"properties": {
88
"limit": {

docs/api/address/get-address-balances.schema.json

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns address balances",
43
"title": "AddressBalanceResponse",
4+
"additionalProperties": false,
55
"type": "object",
66
"required": ["stx", "fungible_tokens", "non_fungible_tokens"],
77
"properties": {
@@ -10,18 +10,22 @@
1010
},
1111
"fungible_tokens": {
1212
"type": "object",
13-
"patternProperties": {
14-
"*": {
15-
"$ref": "../../entities/balance/ft-balance.schema.json"
16-
}
13+
"additionalProperties": {
14+
"anyOf": [
15+
{
16+
"$ref": "../../entities/balance/ft-balance.schema.json"
17+
}
18+
]
1719
}
1820
},
1921
"non_fungible_tokens": {
2022
"type": "object",
21-
"patternProperties": {
22-
"*": {
23-
"$ref": "../../entities/balance/nft-balance.schema.json"
24-
}
23+
"additionalProperties": {
24+
"anyOf": [
25+
{
26+
"$ref": "../../entities/balance/nft-balance.schema.json"
27+
}
28+
]
2529
}
2630
},
2731
"token_offering_locked": {

docs/api/address/get-address-nft-events.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-04/schema#",
32
"type": "object",
43
"title": "AddressNftListResponse",
4+
"additionalProperties": false,
55
"required": [
66
"limit",
77
"offset",

docs/api/address/get-address-stx-balance.schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns address balances",
43
"title": "AddressStxBalanceResponse",
54
"type": "object",
@@ -8,6 +7,8 @@
87
"$ref": "../../entities/balance/stx-balance.schema.json"
98
},
109
{
10+
"type": "object",
11+
"additionalProperties": false,
1112
"properties": {
1213
"token_offering_locked": {
1314
"$ref": "../../entities/address/token-offering-locked.schema.json"

docs/api/address/get-address-stx-inbound.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns a list of inbound STX transfers with a memo",
43
"title": "AddressStxInboundListResponse",
4+
"additionalProperties": false,
55
"type": "object",
66
"required": ["results", "limit", "offset", "total"],
77
"properties": {

docs/api/address/get-address-transactions-with-transfers.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns account transactions",
43
"title": "AddressTransactionsWithTransfersListResponse",
54
"type": "object",

docs/api/address/get-address-transactions.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns account transactions",
43
"title": "AddressTransactionsListResponse",
54
"type": "object",

docs/api/blocks/get-blocks.schema.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema#",
32
"description": "GET request that returns blocks",
43
"additionalProperties": false,
54
"title": "BlockListResponse",

docs/api/bns/errors/bns-error.schema.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"$schema": "http://json-schema.org/draft-07/schema",
3-
"$id": "bns-error",
42
"title": "BnsError",
53
"description": "Error",
64
"type": "object",
5+
"additionalProperties": false,
76
"properties": {
87
"error": { "type": "string" }
98
}

0 commit comments

Comments
 (0)