Skip to content

feat(openapi): document utilization; add utilizedPercentage to postag…#5466

Open
martinconic wants to merge 1 commit into
masterfrom
docs/postage-utilization-percentage
Open

feat(openapi): document utilization; add utilizedPercentage to postag…#5466
martinconic wants to merge 1 commit into
masterfrom
docs/postage-utilization-percentage

Conversation

@martinconic
Copy link
Copy Markdown
Contributor

@martinconic martinconic commented May 19, 2026

Checklist

  • I have read the coding guide.
  • My change requires a documentation update, and I have done it.
  • I have added tests to cover my changes.
  • I have filled out the description and linked the related issues.

Description

Closes #5226

Adds a description to the existing PostageBatch.utilization property in
the OpenAPI spec, clarifying that it is a raw bucket-count value (not a
usage percentage) and giving the formula for fractional usage.

Adds a new utilizedPercentage field to the /stamps and
/stamps/{batchID} responses, exposing utilization / 2^(depth -
bucketDepth) as a float in [0, 1] so API consumers don't have to derive
it themselves and can't accidentally treat the raw utilization as a
percentage.

Open API Spec Version Changes (if applicable)

Motivation and Context (Optional)

Related Issue (Optional)

Screenshots (if appropriate):

AI Disclosure

  • This PR contains code that has been generated by an LLM.
  • I have reviewed the AI generated code thoroughly.
  • I possess the technical expertise to responsibly review the code generated in this PR.

@martinconic martinconic self-assigned this May 19, 2026
@martinconic martinconic added this to the 2026 milestone May 19, 2026
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.

Document utilization property of postage batches; consider adding utilizedPercentage

2 participants