ApiEndpoint
final class ApiEndpoint (View source)
Describes one immutable API route, its controller target and its authorization metadata.
Methods
Validates and captures the route contract, defaulting omitted metadata to an empty policy.
Returns the uppercase HTTP method registered for request matching.
Returns the configured API-relative path beginning with a slash.
Returns the controller and action dispatched for a matching request.
Returns the unique endpoint name used for route registration and lookup.
Returns the non-empty short description exposed in API documentation.
Returns the detailed description exposed in API documentation.
Returns the authentication boundary enforced by API authorization middleware.
Returns the complete documentation and permission metadata for this endpoint.
Returns documentation tags from the endpoint metadata.
Returns every scope required after the endpoint access boundary is satisfied.
Returns OpenAPI parameter definitions without transforming their schemas.
Returns the optional OpenAPI request body schema.
Returns the optional OpenAPI success response schema.
Returns the status codes documented as successful responses.
Reports whether middleware may dispatch this endpoint without authentication.
Details
__construct
__construct(string $method, string $path, ControllerAction $controllerAction, string $name, string $summary, string $description, ApiAccess $access = ApiAccess::Protected, ApiEndpointMetadata|null $metadata = null)
Validates and captures the route contract, defaulting omitted metadata to an empty policy.
method
string
method()
Returns the uppercase HTTP method registered for request matching.
path
string
path()
Returns the configured API-relative path beginning with a slash.
controllerAction
ControllerAction
controllerAction()
Returns the controller and action dispatched for a matching request.
name
string
name()
Returns the unique endpoint name used for route registration and lookup.
summary
string
summary()
Returns the non-empty short description exposed in API documentation.
description
string
description()
Returns the detailed description exposed in API documentation.
access
ApiAccess
access()
Returns the authentication boundary enforced by API authorization middleware.
metadata
ApiEndpointMetadata
metadata()
Returns the complete documentation and permission metadata for this endpoint.
tags
array
tags()
Returns documentation tags from the endpoint metadata.
scopes
array
scopes()
Returns every scope required after the endpoint access boundary is satisfied.
parameters
array
parameters()
Returns OpenAPI parameter definitions without transforming their schemas.
requestBodySchema
array|null
requestBodySchema()
Returns the optional OpenAPI request body schema.
responseSchema
array|null
responseSchema()
Returns the optional OpenAPI success response schema.
successStatusCodes
array
successStatusCodes()
Returns the status codes documented as successful responses.
isPublic
bool
isPublic()
Reports whether middleware may dispatch this endpoint without authentication.