Skip to content

Commit 8fcafbb

Browse files
authored
add additionalProperties: false to objects (#435)
* add additionalProperties: false to objects * Revert "add additionalProperties: false to objects" This reverts commit 4630b51. * add additionalProperties: false to all objects * Block: use TransactionInfo instead of TransactionSigned * TransactionInfo: embedded oneOf schemas - use unevaluatedProperties, remove additionalProperties from child schemas * Block: add required hash property * ReceiptInfo: add optional type property * remove additionalProperties: false from engine APIs
1 parent 6d17705 commit 8fcafbb

File tree

9 files changed

+22
-1
lines changed

9 files changed

+22
-1
lines changed

src/eth/execute.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
schema:
4545
title: Access list result
4646
type: object
47+
additionalProperties: false
4748
properties:
4849
accessList:
4950
title: "accessList"

src/eth/fee_market.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
- oldestBlock
5050
- baseFeePerGas
5151
- gasUsedRatio
52+
additionalProperties: false
5253
properties:
5354
oldestBlock:
5455
title: oldestBlock

src/schemas/block.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Block:
22
title: Block object
33
type: object
44
required:
5+
- hash
56
- parentHash
67
- sha3Uncles
78
- miner
@@ -19,7 +20,11 @@ Block:
1920
- size
2021
- transactions
2122
- uncles
23+
additionalProperties: false
2224
properties:
25+
hash:
26+
title: Hash
27+
$ref: '#/components/schemas/hash32'
2328
parentHash:
2429
title: Parent block hash
2530
$ref: '#/components/schemas/hash32'
@@ -86,7 +91,7 @@ Block:
8691
- title: Full transactions
8792
type: array
8893
items:
89-
$ref: '#/components/schemas/TransactionSigned'
94+
$ref: '#/components/schemas/TransactionInfo'
9095
withdrawals:
9196
title: Withdrawals
9297
type: array
@@ -130,6 +135,7 @@ BadBlock:
130135
- block
131136
- hash
132137
- rlp
138+
additionalProperties: false
133139
properties:
134140
block:
135141
title: Block

src/schemas/client.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ SyncingStatus:
33
oneOf:
44
- title: Syncing progress
55
type: object
6+
additionalProperties: false
67
properties:
78
startingBlock:
89
title: Starting block

src/schemas/filter.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ FilterResults:
1616
Filter:
1717
title: filter
1818
type: object
19+
additionalProperties: false
1920
properties:
2021
fromBlock:
2122
title: from block

src/schemas/receipt.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Log:
33
type: object
44
required:
55
- transactionHash
6+
additionalProperties: false
67
properties:
78
removed:
89
title: removed
@@ -47,7 +48,11 @@ ReceiptInfo:
4748
- transactionHash
4849
- transactionIndex
4950
- effectiveGasPrice
51+
additionalProperties: false
5052
properties:
53+
type:
54+
title: type
55+
$ref: '#/components/schemas/byte'
5156
transactionHash:
5257
title: transaction hash
5358
$ref: '#/components/schemas/hash32'

src/schemas/state.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ AccountProof:
99
- nonce
1010
- storageHash
1111
- storageProof
12+
additionalProperties: false
1213
properties:
1314
address:
1415
title: address
@@ -42,6 +43,7 @@ StorageProof:
4243
- key
4344
- value
4445
- proof
46+
additionalProperties: false
4547
properties:
4648
key:
4749
title: key

src/schemas/transaction.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
AccessListEntry:
22
title: Access list entry
33
type: object
4+
additionalProperties: false
45
properties:
56
address:
67
$ref: '#/components/schemas/address'
@@ -224,6 +225,7 @@ TransactionInfo:
224225
- from
225226
- hash
226227
- transactionIndex
228+
unevaluatedProperties: false
227229
properties:
228230
blockHash:
229231
title: block hash
@@ -244,6 +246,7 @@ TransactionInfo:
244246
GenericTransaction:
245247
type: object
246248
title: Transaction object generic to all types
249+
additionalProperties: false
247250
properties:
248251
type:
249252
title: type

src/schemas/withdrawal.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Withdrawal:
66
- validatorIndex
77
- address
88
- amount
9+
additionalProperties: false
910
properties:
1011
index:
1112
title: index of withdrawal

0 commit comments

Comments
 (0)