Skip to main content

1. Verify Default Configuration

By default, Geni inspects:
  • Routes: Routes matching the api prefix (e.g., /api/*).
  • Migrations: Files inside database_path('migrations').
  • Docs Portal: Served at /docs/api (gated to local environment).
  • JSON Specification: Served at /docs/api.json.
You can modify these settings anytime in config/geni.php.

2. Browse the Documentation Portal

Start your local Laravel server:
Visit the documentation portal in your browser:
You will see an interactive documentation portal rendered with syntax highlighting, search, and a Try It console.
Geni Documentation Portal

3. Export OpenAPI Specification

To export a static OpenAPI 3.1.0 JSON file to your project root or public directory:
Output:

4. Run CI Drift Detection

Add a drift check step to your CI pipeline to ensure OpenAPI documentation never goes out of sync with your code:
If any routes, parameters, or schemas have changed since openapi.json was committed, the command exits with code 1 and prints a human-readable diff.
Congratulations! You now have automated, static-analysis API documentation set up in your Laravel application.