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 version header for ssz responses #170

Merged
merged 4 commits into from
Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apis/beacon/blocks/block.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ get:
responses:
"200":
description: "Successful response"
headers:
Eth-Consensus-Version:
$ref: '../../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version'
content:
application/json:
schema:
Expand All @@ -29,6 +32,7 @@ get:
- $ref: "../../../beacon-node-oapi.yaml#/components/schemas/Altair.SignedBeaconBlock"
application/octet-stream:
schema:

description: "SSZ serialized block bytes. Use Accept header to choose this response type"
"400":
description: "The block ID supplied could not be parsed"
Expand Down
3 changes: 3 additions & 0 deletions apis/debug/state.v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ get:
responses:
"200":
description: Success
headers:
Eth-Consensus-Version:
$ref: '../../beacon-node-oapi.yaml#/components/headers/Eth-Consensus-Version'
content:
application/json:
schema:
Expand Down
8 changes: 8 additions & 0 deletions beacon-node-oapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,11 @@ components:
$ref: './types/http.yaml#/InternalError'
CurrentlySyncing:
$ref: './types/http.yaml#/CurrentlySyncing'

headers:
Eth-Consensus-Version:
description: Required in response so client can deserialize returned json or ssz data more effectively.
schema:
type: string
enum: [phase0, altair]
example: "phase0"