Skip to content

fix: optional genesis timestamp#332

Open
joe-p wants to merge 1 commit intomainfrom
fix/optional_genesis_timestamp
Open

fix: optional genesis timestamp#332
joe-p wants to merge 1 commit intomainfrom
fix/optional_genesis_timestamp

Conversation

@joe-p
Copy link
Collaborator

@joe-p joe-p commented Jan 31, 2026

No description provided.

@joe-p joe-p requested a review from lempira as a code owner January 31, 2026 21:09
Copilot AI review requested due to automatic review settings January 31, 2026 21:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Algod Genesis schema to treat timestamp as an optional field across the generated Rust model and the OpenAPI v3 spec, and ensures the conversion pipeline consistently applies this rule when regenerating specs.

Changes:

  • Make Genesis.timestamp optional in the Rust client model (and omit it from serialization when unset).
  • Remove timestamp from the Genesis schema’s required list in algod.oas3.json.
  • Add a conversion rule in convert-openapi.ts to keep Genesis.timestamp non-required during OAS2→OAS3 conversion.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/algod_client/src/models/genesis.rs Changes timestamp from u64 to Option<u64> and updates constructor initialization accordingly.
api/specs/algod.oas3.json Removes timestamp from Genesis.required while retaining it as a schema property.
api/scripts/convert-openapi.ts Adds a requiredFieldTransforms rule to force Genesis.timestamp to be optional in generated OAS3 output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants