-
Notifications
You must be signed in to change notification settings - Fork 58
LCORE-433: ability to generate OpenAPI documentation #383
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
Merged
tisnik
merged 2 commits into
lightspeed-core:main
from
tisnik:lcore-433-ability-to-generate-openapi-documentation
Aug 12, 2025
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align output filename with README link (docs/openapi.md vs docs/output.md).
README links to docs/openapi.md, but the Makefile generates docs/output.md. This will produce a broken link.
Apply this diff to generate the expected file:
📝 Committable suggestion
🤖 Prompt for AI Agents
🛠️ Refactor suggestion
Make target resilient and run within the uv environment.
[Suggest combined change below; verify the CLI name/flags in the next comment.]
Apply this diff:
🤖 Prompt for AI Agents
💡 Verification agent
🧩 Analysis chain
Verify CLI name and flags match the dependency (openapi-to-md).
The dependency added is openapi-to-md, but the command uses openapi-to-markdown. The CLI entry point and flag names may differ (e.g., openapi-to-md vs openapi-to-markdown; --input/--output vs --input_file/--output_file). Please confirm the correct binary and flags.
Run this script to identify usage and reconcile names, and to flag a missing generated file:
And verify the correct CLI/flags on the web:
🏁 Script executed:
Length of output: 1441
🌐 Web query:
💡 Result:
The PyPI package you’re looking for is not “openapi-to-md”; that name refers to an npm package whose CLI is openapi-to-md with Node-style flags.[1] For Python, there are similarly named packages, but their CLIs differ:
open-api-schemas-to-markdown (PyPI) provides the CLI oa-to-md, not openapi-to-md or openapi-to-markdown.[4]
Usage: oa-to-md INPUT_FILE OUTPUT_FILE [locale]. Flags are positional only; there are no -i/-o flags. Example: oa-to-md open_api.yml documentation.md.[4]
openapi-markdown (PyPI) provides the CLI openapi2markdown.[7]
Usage: openapi2markdown [OPTIONS] INPUT_FILE [OUTPUT_FILE]. Optional flags include:
Output file is optional; if omitted, it defaults to INPUT_FILE with a .md extension.[7]
Therefore:
Citations:
Use the correct OpenAPI-to-Markdown CLI and flags
The Makefile currently invokes
openapi-to-markdown --input_file docs/openapi.json --output_file docs/output.md, but:pyproject.tomldepends onopenapi-to-md, which is an npm package (not a Python tool) and provides a different CLI.openapi-to-markdownis installed, so the Makefile target will fail.You have two Python-native options—pick one and align both dependency and Makefile:
• openapi-markdown (PyPI)
– Dependency: replace
"openapi-to-md>=0.1.0b2"with e.g."openapi-markdown>=1.0.0"– CLI:
openapi2markdown– Usage (positional):
openapi2markdown docs/openapi.json docs/output.md• open-api-schemas-to-markdown (PyPI)
– Dependency: replace
"openapi-to-md>=0.1.0b2"with e.g."open-api-schemas-to-markdown>=0.2.0"– CLI:
oa-to-md– Usage (positional):
oa-to-md docs/openapi.json docs/output.mdLocations to update:
openapi-to-mdfor your chosen Python package🤖 Prompt for AI Agents