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

fix: slot_length as number #389

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ Unreleased changes are in the `master` branch.

## [Unreleased]

### Changed

Updated the schema to allow `slot_length` to accept floating-point values

## [0.1.70] - 2024-11-26

### Added
Expand Down
6 changes: 3 additions & 3 deletions blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6278,13 +6278,13 @@ components:
example: 129600
description: Number of slots in an KES period
slot_length:
type: integer
example: 1
type: number
example: 0.2
Copy link
Contributor

@slowbackspace slowbackspace Nov 28, 2024

Choose a reason for hiding this comment

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

I would keep 1 as an example since that's what is actually running in the wild. Havinf incorrect value could confuse people while scrolling through docs

description: Duration of one slot in seconds
max_kes_evolutions:
type: integer
example: 62
description: The maximum number of time a KES key can be evolved before a pool operator must create a new operational certificate
description: The maximum number of times a KES key can be evolved before a pool operator must create a new operational certificate
security_param:
type: integer
example: 2160
Expand Down
6 changes: 3 additions & 3 deletions docs/blockfrost-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6570,14 +6570,14 @@ components:
example: 129600
description: Number of slots in an KES period
slot_length:
type: integer
example: 1
type: number
example: 0.2
description: Duration of one slot in seconds
max_kes_evolutions:
type: integer
example: 62
description: >-
The maximum number of time a KES key can be evolved before a pool
The maximum number of times a KES key can be evolved before a pool
operator must create a new operational certificate
security_param:
type: integer
Expand Down
2 changes: 1 addition & 1 deletion json-schema.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6570,14 +6570,14 @@ components:
example: 129600
description: Number of slots in an KES period
slot_length:
type: integer
example: 1
type: number
example: 0.2
description: Duration of one slot in seconds
max_kes_evolutions:
type: integer
example: 62
description: >-
The maximum number of time a KES key can be evolved before a pool
The maximum number of times a KES key can be evolved before a pool
operator must create a new operational certificate
security_param:
type: integer
Expand Down
4 changes: 2 additions & 2 deletions src/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6688,11 +6688,11 @@ export interface components {
slots_per_kes_period: number;
/**
* @description Duration of one slot in seconds
* @example 1
* @example 0.2
*/
slot_length: number;
/**
* @description The maximum number of time a KES key can be evolved before a pool operator must create a new operational certificate
* @description The maximum number of times a KES key can be evolved before a pool operator must create a new operational certificate
* @example 62
*/
max_kes_evolutions: number;
Expand Down
6 changes: 3 additions & 3 deletions src/schemas/genesis_content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ properties:
example: 129600
description: Number of slots in an KES period
slot_length:
type: integer
example: 1
type: number
example: 0.2
description: Duration of one slot in seconds
max_kes_evolutions:
type: integer
example: 62
description: The maximum number of time a KES key can be evolved before a pool operator must create a new operational certificate
description: The maximum number of times a KES key can be evolved before a pool operator must create a new operational certificate
security_param:
type: integer
example: 2160
Expand Down
6 changes: 3 additions & 3 deletions test/tests/__snapshots__/get-schema-for-endpoint.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -10585,7 +10585,7 @@ under which it is valid
"type": "integer",
},
"max_kes_evolutions": {
"description": "The maximum number of time a KES key can be evolved before a pool operator must create a new operational certificate",
"description": "The maximum number of times a KES key can be evolved before a pool operator must create a new operational certificate",
"example": 62,
"type": "integer",
},
Expand All @@ -10606,8 +10606,8 @@ under which it is valid
},
"slot_length": {
"description": "Duration of one slot in seconds",
"example": 1,
"type": "integer",
"example": 0.2,
"type": "number",
},
"slots_per_kes_period": {
"description": "Number of slots in an KES period",
Expand Down