chore(openapi): regenerate api.yaml after docstring + dep drift#9651
Closed
mscolnick wants to merge 1 commit into
Closed
chore(openapi): regenerate api.yaml after docstring + dep drift#9651mscolnick wants to merge 1 commit into
mscolnick wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR brings the repository’s checked-in OpenAPI artifacts back in sync with the OpenAPI generator output after upstream/docstring formatting drift, restoring the “OpenAPI up to date” CLI test signal.
Changes:
- Regenerates
packages/openapi/api.yamlto reflect updated docstring rendering (description-only changes). - Updates the generated TypeScript OpenAPI types (
packages/openapi/src/api.ts) to match the regenerated schema.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/openapi/api.yaml | Regenerated OpenAPI schema; updates description fields/docstring formatting while preserving schema structure. |
| packages/openapi/src/api.ts | Regenerated TS types/comments to match the updated OpenAPI schema descriptions. |
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant Doc as Docstring in Python Source
participant Gen as OpenAPI Generator (CLI cmd: marimo development openapi)
participant YAML as packages/openapi/api.yaml
participant TSGen as TypeScript Codegen (pnpm run codegen)
participant API as packages/openapi/src/api.ts
participant Test as test_openapi_up_to_date (CI)
Note over Doc,API: PR regenerates api.yaml and api.ts after docstring formatting changes
Doc->>Gen: Reads Python docstrings with formatting changes (RST→Markdown backticks, dedented)
Gen->>Gen: Parses pydantic models & docstrings
Gen->>YAML: Writes OpenAPI 3.1 spec with updated descriptions only
YAML->>TSGen: Input: regenerated api.yaml
TSGen->>API: Generates updated TypeScript types with formatted descriptions
Note over Test: CI checks docstring sync
alt CI test passes
Test->>YAML: Compares generated YAML to committed version
YAML-->>Test: Matches (docstrings now in sync)
Test->>API: Compares generated TS to committed version
API-->>Test: Matches
else CI test fails (pre-PR state)
Doc->>YAML: Drifted docstrings (old formatting)
Doc->>API: Drifted docstrings (old formatting)
Test->>YAML: Comparison fails
Test->>API: Comparison fails
end
`packages/openapi/api.yaml` was last regenerated several commits ago and drifted out of sync due to two changes that touched docstring output: 1. `pydantic-ai-slim` v1.96.0 changed docstrings on types referenced by marimo's schema (e.g. `pydantic_ai.ui.vercel_ai.request_types.UIMessage`). 2. #9645 ("enforce single backticks in Python docstrings") rewrote docstrings across the codebase but didn't regenerate `api.yaml`. Together these broke `test_openapi_up_to_date` on main. Regenerated via `marimo development openapi > packages/openapi/api.yaml` plus `pnpm -w run codegen`. The diff is description-only — no schema additions, removals, or renames.
815381c to
5e254b1
Compare
Contributor
Author
|
Closing — investigation was wrong. PR #9645 already regenerated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/openapi/api.yamldrifted out of sync with the generator, breakingtests/_cli/test_cli_development.py::test_openapi_up_to_dateon every PR since yesterday afternoon.Two changes that touched docstring rendering both landed without regenerating the schema file:
pydantic-ai-slimv1.96.0 changed docstrings on types referenced by marimo's schema (e.g.pydantic_ai.ui.vercel_ai.request_types.UIMessage). The CLI test installs deps freely viauv pip install --group=test-optional --group=dev marimo*.whl, so it picked up the new version as soon as it was released.api.yaml.This PR regenerates via:
marimo development openapi > packages/openapi/api.yaml pnpm -w run codegenThe diff is description-only — no schema additions, removals, or renames. Just docstring formatting (RST → Markdown backticks, multi-line dedenting, etc).
Followups (separate)
test_openapi_up_to_dateis fragile because the CLI test resolves deps freely — any minor docstring change in a transitive dep silently breaks it until someone regenerates. Worth either pinning deps for that test or strippingdescriptionfields from the comparison.Test plan
uv run --group test-optional pytest tests/_cli/test_cli_development.py::test_openapi_up_to_date -vpasses locally