Show HN: 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://ift.tt/1xr2C5O... 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. https://ift.tt/w8kdNi3 August 10, 2023 at 10:25PM