Skip to content

Conversation

@adrianlyjak
Copy link
Contributor

Add a script to generate Markdown reference docs for the workflows server API from its OpenAPI schema.


Linear Issue: LI-3952

Open in Cursor Open in Web

cursoragent and others added 2 commits October 24, 2025 12:14
Introduce scripts/generate_server_reference_docs.py to transform the server OpenAPI schema into Markdown under docs/src/content/docs/workflows-api-reference. This enables publishing a browsable API reference in the Astro docs without adding new runtime deps. Also add Hatch scripts (server:reference, server:reference-all) to generate the OpenAPI and docs in one step.
@cursor
Copy link

cursor bot commented Oct 24, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coveralls
Copy link

coveralls commented Oct 24, 2025

Pull Request Test Coverage Report for Build 19036555772

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 194 unchanged lines in 13 files lost coverage.
  • Overall coverage decreased (-0.08%) to 89.472%

Files with Coverage Reduction New Missed Lines %
src/workflows/context/serializers.py 1 90.74%
src/workflows/decorators.py 1 97.96%
src/workflows/events.py 1 99.02%
src/workflows/server/abstract_workflow_store.py 1 97.78%
src/workflows/server/sqlite/sqlite_workflow_store.py 2 97.44%
src/workflows/server/sqlite/migrate.py 5 84.62%
src/workflows/handler.py 6 88.46%
src/workflows/workflow.py 8 95.06%
src/workflows/client/client.py 17 77.21%
src/workflows/context/state_store.py 17 85.25%
Totals Coverage Status
Change from base Build 18753664779: -0.08%
Covered Lines: 2626
Relevant Lines: 2935

💛 - Coveralls

- Make render_schema accept object and coerce to JSON-serializable types
- Adjust resolve_ref return type to object
- Remove unused op_id to satisfy lint
…ference

Pre-commit was fixing end-of-file and formatting on the generated index.md. The generator now guarantees a trailing newline and the docs were regenerated.
@adrianlyjak
Copy link
Contributor Author

@cursoragent update the schema references to be a more readable format, not just an inline json schema.

@cursor
Copy link

cursor bot commented Nov 3, 2025

Updated. I changed the generator to render schema refs in a readable format instead of raw JSON:

  • Object schemas: property tables (Field, Type, Required, Description, Default)
  • Arrays/primitives: concise type summaries with format, defaults, and enums
  • oneOf/anyOf/allOf: short, bulleted summaries
  • $refs: shown by name and linked to the Components section
  • Components appendix: uses the same readable format

If anything else would help (e.g., deeper nesting or example blocks), I can adjust.


Open in Cursor Open in Web

Learn more about Cursor Agents

Replace inline JSON dumps with human-friendly schema rendering: property tables for objects, concise type summaries for arrays/primitives, enum/default details, and oneOf/anyOf/allOf listings. Also link top-level $refs to component anchors and improve Components appendix formatting.
@cursor
Copy link

cursor bot commented Nov 3, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

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.

4 participants