Serve OpenAPI specs as JSON and link them from llms.txt. - #1531
Open
scottjstrand1 wants to merge 1 commit into
Open
Serve OpenAPI specs as JSON and link them from llms.txt.#1531scottjstrand1 wants to merge 1 commit into
scottjstrand1 wants to merge 1 commit into
Conversation
Build now generates /openapi.json and /mapi-openapi.json from the source specs, and llms.txt points agents to those machine-readable endpoints. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Risk HIGH: Adds a build script to serve OpenAPI specs as JSON and links them from llms.txt, modifying package.json in the process.
Reasons
package.jsonis modified, which triggers the HIGH risk classification rule. The change adds a newgenerate-openapi-jsonscript and modifies thegenerate-llmsscript pipeline.- A new TypeScript build script (
scripts/generateOpenApiJson.ts) is introduced that parses YAML OpenAPI specs and writes JSON files to thepublic/directory, adding a new step to the build process. - The
generate-llmspipeline ordering is changed to run the new OpenAPI JSON generation before the existing markdown and llms.txt generation steps. - The
.gitignoreis updated to exclude two new generated files (openapi.json,mapi-openapi.json), indicating new build artifacts will be publicly served. - The author (
scottjstrand1) does not appear in the repository's collaborators or contributors list.
Notes
- The
package.jsonchange is script-only (no new dependencies added), which reduces the practical risk despite triggering the HIGH classification rule. - Review
scripts/generateOpenApiJson.tsfor correctness — ensure the YAML-to-JSON conversion handles edge cases and that theyamlpackage used for parsing is already a project dependency. - Confirm the new publicly served JSON files (
/openapi.json,/mapi-openapi.json) do not expose any sensitive or internal-only information from the OpenAPI specs. - Verify the new links added to
llms.txtresolve correctly after a full build.
Sent by Cursor Automation: Docs PR classifier
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.


Build now generates /openapi.json and /mapi-openapi.json from the source specs, and llms.txt points agents to those machine-readable endpoints.