Skip to content

Attribute reference

Where each attribute goes and what it does.

AttributeWhere it goesWhat it does
#[ApiOperation]MethodSummary, description, optional operationId, and optional externalDocsUrl link
#[ApiTag]Class or MethodGroup endpoints in the sidebar. Supports summary, parent, kind for hierarchical grouping, and externalDocsUrl
#[ApiBody]MethodOverride the auto-detected request class or add a description
#[ApiResponse]MethodDocument a response status code (repeatable)
#[ApiResponseHeader]MethodDocument a response header on a specific status code (repeatable)
#[ApiParam]MethodDocument a path parameter, including route model bound params (repeatable). Supports deprecated, style (simple, label, matrix), and explode
#[ApiQuery]MethodDocument a query string parameter (repeatable). Supports deprecated, location for in: querystring, style (form, spaceDelimited, pipeDelimited, deepObject), and explode
#[ApiStream]MethodDocument a streaming endpoint (SSE, JSONL). Emits itemSchema instead of schema
#[ApiHeader]MethodDocument a request header (repeatable). Supports style (simple) and explode
#[ApiSecurity]Class or MethodDeclare a required security scheme with optional scopes (repeatable)
#[ApiNoSecurity]MethodMark an endpoint as requiring no authentication
#[ApiDeprecated]MethodMark an endpoint as deprecated with a reason and replacement
#[ApiIgnore]Class or MethodExclude from documentation entirely
#[ApiExample]MethodNamed request or response example (repeatable). Supports externalValue, dataValue, and serializedValue for non-JSON targets
#[ApiComposedOf]MethodoneOf / anyOf / allOf for polymorphic responses (repeatable)
#[ApiShape]Resource, FormRequest, or DTO classMarks a class as using the static schema() method
#[ApiProperty]PropertyDocuments a single property on a resource or DTO
#[ApiItems]PropertyDocuments the item type inside an array property

Learn more by topic