EndpointElf #
What is EndpointElf? #
EndpointElf is a CLI tool that extracts HTTP routes from your Go codebase and generates an accurate OpenAPI document, keeping your docs in sync with your implementation.
EndpointElf does not require additional configuration to extract routes. We believe that source code is the source of truth for what software does and docs are an artifact of source code, so when the code changes the docs should follow.
EndpointElf uses AST parsing to inspect source code. AI engines (self-hosted or cloud based) can be utilized as well.
Why Use EndpointElf? #
EndpointElf automates the manual updates to OpenAPI docs when routes are changed or added. EndpointElf removes error-prone and time-consuming documentation updates so your docs match the code. Other solutions require you update docs in order to update the code, but that isn’t how software is maintained or the simpliest way.
If your code uses gorilla/mux
, standard library net/http
,
ServeMux
, or gin
(coming soon) write
your software as you would - using whatever patterns and designs you prefer. EndpointElf will extract all routes
defined and build an OpenAPI document describing the system.
Features #
- Auto Route Detection: Capture all HTTP routes in your Go code.
- Conditional Responses: All possible responses statuses, types, headers, etc of an endpoint documented.
- CI/CD Ready: Seamlessly integrate into your pipeline.
- Time-Saving: Focus on development, not docs.
- OpenAPI 3.0 Compliant: Generate precise and correct OpenAPI documents.
How It Works #
- Run: Point EndpointElf at your Go code.
- Analyze: It detects all HTTP routes.
- Generate: Get an OpenAPI doc that reflects your implementation.
endpointelf -output api.yaml update ./code/