AI

AI-Powered OpenAPI Spec Generator

Hacker News

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 card

Actual performance

5points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: claude, code, apis · Missing: mac, agents, macos
75%75% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: created · Missing: supports, reddit linkedin, podcasting
60%60% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
38%38% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io · Missing: https docs, excited, just released
30%30% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: host · Missing: plus, platform, intuitive
28%28% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
19%19% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Sincerely Karen
Sincerely Karen8%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An AI powered complaint generator

Product Hunt+156Email
Po
Postman/Gherkin tests generator from swagger spec46%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Postman/Gherkin tests generator from swagger spec

Hacker News2
A2
A2A Xkcd Agent as per the Spec31%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A2A Xkcd Agent as per the Spec

Hacker News2
An
An OpenAPI spec editor powered by AI43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

An OpenAPI spec editor powered by AI

Hacker News4
th
theta-spec - a humble harness agnostic configuration spec42%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

theta-spec - a humble harness agnostic configuration spec

Hacker News1
AI
AI-Powered Meme Generator27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI-Powered Meme Generator

Hacker News3
AI
AI-powered Chinese name generator34%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI-powered Chinese name generator

Hacker News3
AI
AI Shoe Generator25%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI Shoe Generator

Hacker News1
AI
AI Yearbook Generator17%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI Yearbook Generator

Hacker News1
AI
AI Infographic Generator25%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI Infographic Generator

Hacker News7