Skip to main content

Overview

Geni automatically documents request body schemas by statically analyzing validation rules in your code. You never need to duplicate validation rules in docblock comments.

Supported Validation Sources

Geni inspects three distinct validation sources: When a controller action parameter type-hints a class extending Illuminate\Foundation\Http\FormRequest:
Geni resolves the StoreArticleRequest class and parses the array returned by its rules() method:

2. Inline $request->validate()

When validation is performed directly inside the controller method:

3. Validator::make()

When using the Validator facade or helper:

Validation Rule Mapping Table

Multipart Form Data Detection

When Geni detects a file, image, or mimes rule on any field in a request, it automatically sets the request body media type to multipart/form-data instead of application/json.