This is a library (and a CLI tool) that generates OpenAPI 3.1 documentation for Go services.
It generates the OpenAPI spec from Go structs and their Go comments, annotated with ggicci/httpin tags.
docgen (CLI) extracts the documentation from the Go code at a compile time; and in the runtime, docmerge merges it with the OpenAPI spec generated by httpinmeditate.
The runtime part of this library is meant to be integrated with the router library of your choice, or it can be used with the raw http server.
See the raw HTTP server usage example at /examples/petstore.