Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add additionalProperties: false to objects #435

Merged
merged 8 commits into from
Jul 12, 2023
2 changes: 2 additions & 0 deletions src/engine/openrpc/methods/payload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
required:
- executionPayload
- blockValue
additionalProperties: false
lightclient marked this conversation as resolved.
Show resolved Hide resolved
properties:
executionPayload:
title: Execution payload
Expand Down Expand Up @@ -124,6 +125,7 @@
- executionPayload
- blockValue
- blobsBundle
additionalProperties: false
properties:
executionPayload:
title: Execution payload
Expand Down
5 changes: 5 additions & 0 deletions src/engine/openrpc/schemas/forkchoice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ForkchoiceStateV1:
- headBlockHash
- safeBlockHash
- finalizedBlockHash
additionalProperties: false
properties:
headBlockHash:
title: Head block hash
Expand All @@ -20,6 +21,7 @@ ForkchoiceUpdatedResponseV1:
type: object
required:
- payloadStatus
additionalProperties: false
properties:
payloadStatus:
title: Payload status
Expand All @@ -34,6 +36,7 @@ PayloadAttributesV1:
- timestamp
- prevRandao
- suggestedFeeRecipient
additionalProperties: false
properties:
timestamp:
title: Timestamp
Expand All @@ -52,6 +55,7 @@ PayloadAttributesV2:
- prevRandao
- suggestedFeeRecipient
- withdrawals
additionalProperties: false
properties:
timestamp:
$ref: '#/components/schemas/PayloadAttributesV1/properties/timestamp'
Expand All @@ -73,6 +77,7 @@ PayloadAttributesV3:
- suggestedFeeRecipient
- withdrawals
- parentBeaconBlockRoot
additionalProperties: false
properties:
timestamp:
$ref: '#/components/schemas/PayloadAttributesV2/properties/timestamp'
Expand Down
9 changes: 9 additions & 0 deletions src/engine/openrpc/schemas/payload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PayloadStatusV1:
type: object
required:
- status
additionalProperties: false
properties:
status:
title: Payload validation status
Expand All @@ -21,6 +22,7 @@ PayloadStatusV1:
type: string
RestrictedPayloadStatusV1:
$ref: '#/components/schemas/PayloadStatusV1'
additionalProperties: false
properties:
status:
$ref: '#/components/schemas/PayloadStatusV1/properties/status'
Expand All @@ -36,6 +38,7 @@ RestrictedPayloadStatusV1:
PayloadStatusNoInvalidBlockHash:
$ref: '#/components/schemas/PayloadStatusV1'
title: Payload status object deprecating INVALID_BLOCK_HASH status
additionalProperties: false
properties:
status:
$ref: '#/components/schemas/PayloadStatusV1/properties/status'
Expand Down Expand Up @@ -66,6 +69,7 @@ ExecutionPayloadV1:
- baseFeePerGas
- blockHash
- transactions
additionalProperties: false
properties:
parentHash:
title: Parent block hash
Expand Down Expand Up @@ -119,6 +123,7 @@ WithdrawalV1:
- validatorIndex
- address
- amount
additionalProperties: false
properties:
index:
title: Withdrawal index
Expand Down Expand Up @@ -151,6 +156,7 @@ ExecutionPayloadV2:
- blockHash
- transactions
- withdrawals
additionalProperties: false
properties:
parentHash:
$ref: '#/components/schemas/ExecutionPayloadV1/properties/parentHash'
Expand Down Expand Up @@ -206,6 +212,7 @@ ExecutionPayloadV3:
- withdrawals
- dataGasUsed
- excessDataGas
additionalProperties: false
properties:
parentHash:
$ref: '#/components/schemas/ExecutionPayloadV2/properties/parentHash'
Expand Down Expand Up @@ -248,6 +255,7 @@ ExecutionPayloadBodyV1:
type: object
required:
- transactions
additionalProperties: false
properties:
transactions:
$ref: '#/components/schemas/ExecutionPayloadV1/properties/transactions'
Expand All @@ -265,6 +273,7 @@ BlobsBundleV1:
- commitments
- proofs
- blobs
additionalProperties: false
properties:
commitments:
title: Commitments
Expand Down
1 change: 1 addition & 0 deletions src/engine/openrpc/schemas/transition_configuration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TransitionConfigurationV1:
- terminalTotalDifficulty
- terminalBlockHash
- terminalBlockNumber
additionalProperties: false
properties:
terminalTotalDifficulty:
title: Terminal total difficulty
Expand Down
1 change: 1 addition & 0 deletions src/eth/execute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
schema:
title: Access list result
type: object
additionalProperties: false
properties:
accessList:
title: "accessList"
Expand Down
1 change: 1 addition & 0 deletions src/eth/fee_market.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- oldestBlock
- baseFeePerGas
- gasUsedRatio
additionalProperties: false
properties:
oldestBlock:
title: oldestBlock
Expand Down
8 changes: 7 additions & 1 deletion src/schemas/block.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Block:
title: Block object
type: object
required:
- hash
- parentHash
- sha3Uncles
- miner
Expand All @@ -19,7 +20,11 @@ Block:
- size
- transactions
- uncles
additionalProperties: false
properties:
hash:
title: Hash
$ref: '#/components/schemas/hash32'
parentHash:
title: Parent block hash
$ref: '#/components/schemas/hash32'
Expand Down Expand Up @@ -86,7 +91,7 @@ Block:
- title: Full transactions
type: array
items:
$ref: '#/components/schemas/TransactionSigned'
$ref: '#/components/schemas/TransactionInfo'
withdrawals:
title: Withdrawals
type: array
Expand Down Expand Up @@ -130,6 +135,7 @@ BadBlock:
- block
- hash
- rlp
additionalProperties: false
properties:
block:
title: Block
Expand Down
1 change: 1 addition & 0 deletions src/schemas/client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ SyncingStatus:
oneOf:
- title: Syncing progress
type: object
additionalProperties: false
properties:
startingBlock:
title: Starting block
Expand Down
1 change: 1 addition & 0 deletions src/schemas/filter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ FilterResults:
Filter:
title: filter
type: object
additionalProperties: false
properties:
fromBlock:
title: from block
Expand Down
5 changes: 5 additions & 0 deletions src/schemas/receipt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Log:
type: object
required:
- transactionHash
additionalProperties: false
properties:
removed:
title: removed
Expand Down Expand Up @@ -47,7 +48,11 @@ ReceiptInfo:
- transactionHash
- transactionIndex
- effectiveGasPrice
additionalProperties: false
properties:
type:
title: type
$ref: '#/components/schemas/byte'
transactionHash:
title: transaction hash
$ref: '#/components/schemas/hash32'
Expand Down
2 changes: 2 additions & 0 deletions src/schemas/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ AccountProof:
- nonce
- storageHash
- storageProof
additionalProperties: false
properties:
address:
title: address
Expand Down Expand Up @@ -42,6 +43,7 @@ StorageProof:
- key
- value
- proof
additionalProperties: false
properties:
key:
title: key
Expand Down
3 changes: 3 additions & 0 deletions src/schemas/transaction.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
AccessListEntry:
title: Access list entry
type: object
additionalProperties: false
properties:
address:
$ref: '#/components/schemas/address'
Expand Down Expand Up @@ -224,6 +225,7 @@ TransactionInfo:
- from
- hash
- transactionIndex
unevaluatedProperties: false
lightclient marked this conversation as resolved.
Show resolved Hide resolved
properties:
blockHash:
title: block hash
Expand All @@ -244,6 +246,7 @@ TransactionInfo:
GenericTransaction:
type: object
title: Transaction object generic to all types
additionalProperties: false
properties:
type:
title: type
Expand Down
1 change: 1 addition & 0 deletions src/schemas/withdrawal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Withdrawal:
- validatorIndex
- address
- amount
additionalProperties: false
properties:
index:
title: index of withdrawal
Expand Down