
Generating OpenAPI specs without writing a single line of YAML
If you've ever tried to write an OpenAPI spec by hand, you know how painful it is. Hundreds of lines of YAML, manual endpoint definitions, request/response schemas - and if your API changes, you have to update it all again. I ran into this problem while building Octrafic. The tool requires an OpenAPI spec to understand your API structure - and not everyone has one. So I built a scanner that generates it automatically from your source code. How it works The scanner uses a pipeline called OOPS that works in four stages. 1. Framework detection It starts by reading your root config files - go.mod , package.json , requirements.txt and so on. From that it figures out your language and web framework without touching the rest of your codebase. 2. Route discovery Using heuristics specific to the detected framework, it finds exactly which files contain your routing logic and endpoint definitions. It skips everything irrelevant - node_modules , test directories, etc. 3. Parallel endpoint extracti
Continue reading on Dev.to
Opens in a new tab



