examples/openapi-spec-writer/README.md
A Next.js application that generates OpenAPI specifications from API documentation URLs and optionally creates pull requests to create a Mastra integration from the generated spec.
git clone <repository-url>
cd openapi-spec-generator
pnpm install
cp .env.sample .env.local
# Required for API crawling
FIRECRAWL_API_KEY=your_firecrawl_api_key
GITHUB_API_KEY=your_github_token
# Required for AI processing (at least one)
ANTHROPIC_API_KEY=your_anthropic_key
OPENAI_API_KEY=your_openai_key
# Optional: Database URL if using one
DB_URL=your_database_url
pnpm dev
Open http://localhost:3000 to view the application.
When creating a PR through the application, it triggers a GitHub Action in the Mastra repository that:
To enable this functionality:
GITHUB_API_KEY in your environment variablesContributions are welcome! Please feel free to submit a Pull Request.