Home/Usage guides

API Documentation Guides

Four implementations, one documentation workflow. Choose a language and go from install to rules, scenarios and troubleshooting.

PHP · Go · Rust · UI

PHPv1.0.6

PHP Guide

Write PHP 8 attributes in Laravel, ThinkPHP, Hyperf, Webman, Yii2 or Yii3 and get a browsable, debuggable, exportable API portal.

  • Install and framework setup
  • Annotations, params and responses
  • definitions / ref / children reuse
  • Auth, exports, scenarios and troubleshooting
Read the guide
Gov1.0.7

Go Guide

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
Read the guide
Rustv2.0.0

Rust Guide

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.

  • Dependencies, macros and compile-time rules
  • axum / actix-web setup
  • Auth, Mock, apps and versions
  • Exports, codegen, scenarios and troubleshooting
Read the guide
UIVue 3.5

apidoc-ui Guide

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.

  • Build and deploy
  • config.js runtime config
  • Multi-host / appKey / auth
  • Debug events, Mock extensions and troubleshooting
Read the guide

From declaration to delivery, in five steps.

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.

ConceptPHPGoRust
DeclarationPHP 8 attributesTyped Doc structsAttribute macros
Docs built atRuntime controller scanRoute registrationCompile time, static registry
Framework adapters68axum / actix-web
Debug / MockYes / rule expressionsYes / generated by typeYes / 15 fake rules
AuthGlobal and app passwordsCookie session + app tokenHMAC-SHA256 token
ExportsJSON / TS / Swagger / shareJSON / TSMarkdown / 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.