ApiEndpointMetadata
final class ApiEndpointMetadata (View source)
Holds validated authorization and OpenAPI details shared by endpoint registration and generation.
Methods
Validates and captures immutable endpoint metadata.
Creates metadata with no tags, scopes or schemas and a JSON 200 success response.
Returns the non-empty documentation tags in declaration order.
Returns every scope required to authorize the endpoint.
Returns OpenAPI parameter definitions without schema normalization.
Returns the optional OpenAPI request body schema.
Returns the optional schema wrapped by successful API responses.
Returns the HTTP status codes documented as successful responses.
Returns the media type used to document successful response content.
Details
__construct
__construct(array $tags = [], array $scopes = [], array $parameters = [], array|null $requestBodySchema = null, array|null $responseSchema = null, array $successStatusCodes = [HttpStatus::OK->value], string $responseContentType = 'application/json')
Validates and captures immutable endpoint metadata.
default
static ApiEndpointMetadata
default()
Creates metadata with no tags, scopes or schemas and a JSON 200 success response.
tags
array
tags()
Returns the non-empty documentation tags in declaration order.
scopes
array
scopes()
Returns every scope required to authorize the endpoint.
parameters
array
parameters()
Returns OpenAPI parameter definitions without schema normalization.
requestBodySchema
array|null
requestBodySchema()
Returns the optional OpenAPI request body schema.
responseSchema
array|null
responseSchema()
Returns the optional schema wrapped by successful API responses.
successStatusCodes
array
successStatusCodes()
Returns the HTTP status codes documented as successful responses.
responseContentType
string
responseContentType()
Returns the media type used to document successful response content.