Skip to content

Serve OpenAPI specs as JSON and link them from llms.txt. - #1531

Open
scottjstrand1 wants to merge 1 commit into
mainfrom
serve-openapi-json
Open

Serve OpenAPI specs as JSON and link them from llms.txt.#1531
scottjstrand1 wants to merge 1 commit into
mainfrom
serve-openapi-json

Conversation

@scottjstrand1

Copy link
Copy Markdown
Contributor

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

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>
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 10, 2026 6:14pm

Request Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json is modified, which triggers the HIGH risk classification rule. The change adds a new generate-openapi-json script and modifies the generate-llms script pipeline.
  • A new TypeScript build script (scripts/generateOpenApiJson.ts) is introduced that parses YAML OpenAPI specs and writes JSON files to the public/ directory, adding a new step to the build process.
  • The generate-llms pipeline ordering is changed to run the new OpenAPI JSON generation before the existing markdown and llms.txt generation steps.
  • The .gitignore is 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.json change is script-only (no new dependencies added), which reduces the practical risk despite triggering the HIGH classification rule.
  • Review scripts/generateOpenApiJson.ts for correctness — ensure the YAML-to-JSON conversion handles edge cases and that the yaml package 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.txt resolve correctly after a full build.
Open in Web View Automation 

Sent by Cursor Automation: Docs PR classifier

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