AI-Powered OpenAPI Spec Generator
AI-Powered OpenAPI Spec Generator
Hi hn! I wanted to share a simple JS script I built that uses Anthropic's Claude AI to auto-generate OpenAPI specs from code. Keeping OpenAPI specs in sync is tedious and error-prone. I was wasting too much time manually updating YAMLs. To fix this, I created a script that leverages Claude to parse source code and produce OpenAPI specs, no annotations needed. It's a gist you can copy/paste into your project: https://gist.github.com/hotkartoffel/2d2ca5a5a4ace98ca7fe87f... Feed it your code and Claude handles inferring the OpenAPI objects. I've tested it on JavaScript and Python APIs, but it's framework-agnostic. If Claude understands the code, it can generate the spec. You need an Anthropic API key for Claude. But if you want to try the script, I'm happy to provide a small hosted demo - just ping me! Adding this to CI/CD means fresh OpenAPI specs on each code change, no manual updates required. Definitely a bit flimsy atm, but wanted to gather feedback.
Share cardActual performance
Launch Intel predictions
Analyze your own launch →Correct prediction on native model
Similar products
An AI powered complaint generator
Postman/Gherkin tests generator from swagger spec
A2A Xkcd Agent as per the Spec
An OpenAPI spec editor powered by AI
theta-spec - a humble harness agnostic configuration spec
AI-Powered Meme Generator
AI-powered Chinese name generator
AI Shoe Generator
AI Yearbook Generator
AI Infographic Generator