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

Block type optional properties. #238

Closed
MarcelKlammer opened this issue Jul 21, 2022 · 1 comment
Closed

Block type optional properties. #238

MarcelKlammer opened this issue Jul 21, 2022 · 1 comment
Labels
bug Something isn't working client/TypeScript Issues which regard the TypeScript client documentation Improvements or additions to documentation help welcomed Good for newcomers

Comments

@MarcelKlammer
Copy link

the block types

BlockShelley
BlockAllegra
BlockMary
BlockAlonzo
BlockBabbage

in

@cardano-ogmios/schema

have the ? (optional) modifier set for their properties:

body?
headerHash?
header?

See here:

export interface BlockAlonzo {

This ? (optional) modifier should be removed, as those properties of a block are actually not optional.

@KtorZ
Copy link
Member

KtorZ commented Jul 21, 2022

Ho! Good catch. The JSON specification (which is the source from which the TypeScript type definitions are generated) is missing a required field to make those properties non-optional.

@KtorZ KtorZ added bug Something isn't working documentation Improvements or additions to documentation client/TypeScript Issues which regard the TypeScript client help welcomed Good for newcomers labels Jul 21, 2022
@KtorZ KtorZ closed this as completed in ce91dcb Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client/TypeScript Issues which regard the TypeScript client documentation Improvements or additions to documentation help welcomed Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants