> ## Documentation Index
> Fetch the complete documentation index at: https://geni.masiting.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration Reference

> Complete reference for all options available in config/geni.php.

## Overview

Publish the default configuration file using Artisan:

```bash theme={null}
php artisan vendor:publish --tag=geni-config
```

The configuration is saved to `config/geni.php`.

## Options

### Document Information (`info`)

```php theme={null}
'title' => null, // defaults to config('app.name')
'version' => '1.0.0',
'description' => 'REST API documentation generated by Geni.',
'terms_of_service' => 'https://example.com/terms',

'contact' => [
    'name' => 'API Support',
    'email' => 'support@example.com',
    'url' => 'https://example.com/support',
],

'license' => [
    'name' => 'MIT',
    'url' => 'https://opensource.org/licenses/MIT',
],
```

### Route Discovery (`api_path` & `routes`)

```php theme={null}
// Routes matching this URI prefix are discovered for documentation:
'api_path' => 'api',

// Optional custom domain where API routes are served:
'api_domain' => null,

// Optional custom closure returning an array of Route objects:
'routes' => null,
```

### Database Migrations (`migration_paths`)

```php theme={null}
// Directories containing migration files for SchemaReader offline replay:
'migration_paths' => [
    database_path('migrations'),
],
```

### Schema Overrides (`schema_overrides`)

```php theme={null}
// Manual escape hatch mapping 'table.column' => 'type' when migrations use raw SQL:
'schema_overrides' => [
    'users.balance' => 'number',
    'orders.metadata' => 'object',
],
```

### Security Schemes (`security_scheme` & `middleware_security`)

```php theme={null}
// Middleware patterns that mark endpoints as protected:
'middleware_security' => [
    'auth',
    'auth:*',
],

// Default OpenAPI security scheme for matched endpoints:
'security_scheme' => [
    'type' => 'http',
    'scheme' => 'bearer',
    'bearerFormat' => 'JWT',
    'description' => 'Bearer token authentication',
],

// Per-middleware custom security schemes:
'middleware_security_schemes' => [
    'auth:sanctum' => [
        'name' => 'sanctumAuth',
        'scheme' => ['type' => 'http', 'scheme' => 'bearer', 'bearerFormat' => 'JWT'],
    ],
    'auth:api-key' => [
        'name' => 'apiKeyAuth',
        'scheme' => ['type' => 'apiKey', 'in' => 'header', 'name' => 'X-API-Key'],
    ],
],
```

### Documentation Routing & Environment Gates

```php theme={null}
// URLs where documentation UI and raw JSON specifications are served:
'docs_ui_path' => 'docs/api',
'docs_json_path' => 'docs/api.json',

// Docs routes return 404 outside the 'local' environment unless false:
'restrict_to_local' => true,

// Middleware applied to the docs UI routes:
'middleware' => [
    // 'web',
],
```

### Documentation Authentication (`docs_auth`)

```php theme={null}
'docs_auth' => [
    // 'form' or 'basic'
    'mode' => env('GENI_DOCS_AUTH_MODE', 'basic'),
    'username' => env('GENI_DOCS_USERNAME'),
    'password' => env('GENI_DOCS_PASSWORD'),
],
```

### Multi-Version APIs (`apis`)

```php theme={null}
'apis' => [
    'v1' => [
        'title' => 'API v1',
        'version' => '1.0.0',
        'api_path' => 'api/v1',
    ],
    'v2' => [
        'title' => 'API v2',
        'version' => '2.0.0',
        'api_path' => 'api/v2',
    ],
],
```

### Model Context Protocol (`mcp`)

```php theme={null}
'mcp' => [
    'enabled' => true,
    'route_path' => 'docs/api/mcp',
    'tool_naming' => 'snake', // 'snake' or 'operation_id'
    'include_tags' => [],
    'exclude_tags' => [],
    'exclude_methods' => ['HEAD', 'OPTIONS'],
    'execution' => [
        'base_url' => env('GENI_MCP_BASE_URL'),
        'timeout' => 15,
        'verify_ssl' => true,
        'auth' => [
            'default_bearer_token' => env('GENI_MCP_BEARER_TOKEN'),
            'default_api_key' => env('GENI_MCP_API_KEY'),
            'api_key_header' => 'X-API-Key',
        ],
    ],
],
```
