Skip to content

refgen: the table of states is the API's, each row its value's comment in spin's proto - #56

Merged
aledbf merged 1 commit into
mainfrom
states-from-api
Oct 25, 2026
Merged

aledbf merged 1 commit into
mainfrom
states-from-api

Conversation

@aledbf

@aledbf aledbf commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

The table of states in concepts/workspaces.md is written by refgen from the API's WorkspaceState. Each row is that value's comment in spin's common.proto, which the OpenAPI document carries as x-enum-descriptions (spin #656 turned that on, #658 rewrote the comments for this page's reader; both are in v20261025.01).

  • Replaces checkStates, which only held the table's names to the API's.
  • Only the table is generated: the prose around it is the page's, and a comment above the table says to edit the proto.
  • A document without the descriptions, or a page without the table under ## States, fails refgen rather than keeping the old table.
  • The paragraph after the table no longer repeats what the FAILED row says.

task reference:check passes against v20261025.01; go test ./... in tools/ passes.

🤖 Generated with Claude Code

…t in spin's proto

checkStates held the hand-written table to WorkspaceState's names; now that spin's OpenAPI
document carries each value's comment (x-enum-descriptions), the table is written from it, and
what a state means is said once, where it is defined.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 6c7007c into main Oct 25, 2026
2 checks passed
@aledbf
aledbf deleted the states-from-api branch October 25, 2026 03:27
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.

1 participant