Declare docs as typed structs next to route registration. A built-in web UI provides browsing and live debugging for net/http, Gin, Echo, Chi, Fiber, beego, Kratos and go-zero.
Install, Config and Router
Route / Doc / Param / Response
8 framework adapters
Auth, caching, exports, scenarios and troubleshooting
Declare docs with proc macros on handlers, register them statically at compile time and aggregate at zero runtime cost. Works with axum and actix-web, with auth, Mock, exports, sharing and codegen built in.
A Vue 3 + TypeScript documentation front-end with apps/versions, live debugging, sharing, Swagger export, cache management and i18n. The build output is fully static.
Whichever language you use, docs follow the same path into production.
1Declare
2Browse
3Debug
4Export
5Deploy
Core concepts at a glance
How the same job is implemented in each language.
Concept
PHP
Go
Rust
Declaration
PHP 8 attributes
Typed Doc structs
Attribute macros
Docs built at
Runtime controller scan
Route registration
Compile time, static registry
Framework adapters
6
8
axum / actix-web
Debug / Mock
Yes / rule expressions
Yes / generated by type
Yes / 15 fake rules
Auth
Global and app passwords
Cookie session + app token
HMAC-SHA256 token
Exports
JSON / TS / Swagger / share
JSON / TS
Markdown / TS / Swagger / share
Frequently asked questions
Common questions about Apidoc.
What is Apidoc?
Apidoc is a shared API documentation system for PHP, Go and Rust. Declare docs next to your code and get browsable, debuggable and exportable API docs with one static documentation UI.
Which frameworks are supported?
PHP: Laravel, ThinkPHP, Hyperf, Webman, Yii2 and Yii3. Go: net/http, Gin, Echo, Chi, Fiber, beego, Kratos and go-zero. Rust: axum and actix-web.
Does it need a database or extra backend?
Apidoc does not require an extra database. Docs are generated alongside your application, and the apidoc-ui build output is fully static and can be deployed as-is.
How do I get started?
Pick the PHP, Go, Rust or apidoc-ui guide and start from the install and minimal example. Each guide covers framework setup, annotation rules, common scenarios and troubleshooting.