Release 1.42.0 — Caph: OpenAPI spec excellence
Summary
Cuts the 1.42.0 — Caph release. Lands the OpenAPI Spec Excellence work (PR #103) plus version-bump and docs updates.
The headline change is closing the trust gap between Glueful's generated openapi.json and runtime behavior — the spec is now rich enough that off-the-shelf
SDK generators (openapi-typescript, openapi-generator-cli, etc.) produce high-quality clients without manual editing. One documented breaking change to
the permission-exception envelope.
What's shipping
- Config-driven security schemes — new
SecuritySchemeRegistryreadsdocumentation.security_schemes+documentation.middleware_map; replaces 15
hardcodedBearerAuthliterals - Unified
ErrorResponseschema —{success, message, error: {code, error_code, timestamp, request_id}}with anerror_codeenum; all CRUD 4xx
responses$refit - Deterministic operation IDs —
OperationIdGeneratorproduces camelCase SDK method names; closes a hidden gap where comment-driven generation emitted
operations without anyoperationId - Pagination + field-selection components —
PaginationMeta/PaginationLinks/ per-resource envelope schemas matchPaginatedResourceResponse;
addRouteWithFieldsAttribute()helper surfaces?fields=/?expand=from#[Fields]attributes - Auto-derived request examples —
ExampleDeriverinfers realistic JSON payloads from Validator rules and schema properties;@exampleannotation
overrides - OpenAPI 3.1 webhooks block —
WebhookDocsBuilderemits the top-levelwebhooksobject fromdocumentation.webhooksconfig; documents the actual
X-Glueful-Signature/X-Glueful-TimestampheadersWebhookDeliveryServicesends generate:clientCLI wrapper — thin command that shells out toopenapi-typescriptoropenapi-generator-cliwith safe defaults; Glueful does not
own codegen logic
Breaking changes
PermissionUnauthorizedExceptionenvelope unified to{success, message, error: {code, error_code, timestamp, request_id}}(was{success, message, code, error_code}at the top level). Consumers reading top-levelcode/error_codemust readerror.code/error.error_codeinstead. All other render paths
already used the nested shape.
See CHANGELOG.md [1.42.0] for the full migration guide.
Verification
composer test— 796 tests / 1684 assertions / 0 failurescomposer phpcs— cleancomposer analyse— no new PHPStan errors on any modified file (pre-existing baseline preserved)- Cross-file consistency:
Version.php/CHANGELOG.md/ROADMAP.md/ docs site / api-skeleton all agree on1.42.0 — Caph — 2026-05-20
Risk
Moderate. One documented breaking change with clear migration path. Other changes are additive (new OpenAPI components, new config keys, new CLI
command). No new env vars.