waaseyaa / api
RESTful JSON:API resource layer for Waaseyaa
Requires
- php: >=8.5
- symfony/html-sanitizer: ^8.0
- waaseyaa/access: ^0.1.0-alpha.296
- waaseyaa/audit: ^0.1.0-alpha.296
- waaseyaa/cache: ^0.1.0-alpha.296
- waaseyaa/database-legacy: ^0.1.0-alpha.296
- waaseyaa/entity: ^0.1.0-alpha.296
- waaseyaa/entity-storage: ^0.1.0-alpha.296
- waaseyaa/field: ^0.1.0-alpha.296
- waaseyaa/foundation: ^0.1.0-alpha.296
- waaseyaa/mail: ^0.1.0-alpha.296
- waaseyaa/media: ^0.1.0-alpha.296
- waaseyaa/notification: ^0.1.0-alpha.296
- waaseyaa/queue: ^0.1.0-alpha.296
- waaseyaa/relationship: ^0.1.0-alpha.296
- waaseyaa/routing: ^0.1.0-alpha.296
- waaseyaa/scheduler: ^0.1.0-alpha.296
- waaseyaa/workflows: ^0.1.0-alpha.296
Requires (Dev)
- opis/json-schema: ^2.6
- phpunit/phpunit: ^13.0
- waaseyaa/ai-tools: ^0.1.0-alpha.296
- waaseyaa/audit: ^0.1.0-alpha.296
- waaseyaa/auth: ^0.1.0-alpha.296
- waaseyaa/config: ^0.1.0-alpha.296
- waaseyaa/database-legacy: ^0.1.0-alpha.296
- waaseyaa/mcp: ^0.1.0-alpha.296
- waaseyaa/media: ^0.1.0-alpha.296
- waaseyaa/node: ^0.1.0-alpha.296
- waaseyaa/oidc: ^0.1.0-alpha.296
- waaseyaa/search: ^0.1.0-alpha.296
- waaseyaa/telescope: ^0.1.0-alpha.296
- waaseyaa/testing: ^0.1.0-alpha.296
- waaseyaa/user: ^0.1.0-alpha.296
Suggests
- waaseyaa/auth: Provides atomic rate limiting for the optional public content search endpoint
- waaseyaa/oidc: Provides optional OIDC client administration routes
- waaseyaa/search: Provides principal-safe search for the optional public content search endpoint
Conflicts
- waaseyaa/auth: <0.1.0-alpha.287 || >=0.2.0
- waaseyaa/search: <0.1.0-alpha.287 || >=0.2.0
This package is auto-updated.
Last update: 2026-08-19 17:49:05 UTC
README
Layer 4 — API
JSON:API endpoint layer for Waaseyaa applications.
Provides JsonApiController with CRUD patterns, ResourceSerializer for entity-to-JSON:API serialization (with optional field-level access filtering), SchemaPresenter for JSON Schema output, and DiscoveryApiHandler for resource discovery. Access is enforced via route options processed by AccessChecker.
Key classes: JsonApiController, ResourceSerializer, SchemaPresenter, DiscoveryApiHandler.
Optional public content search
Applications that install waaseyaa/search and waaseyaa/auth may opt in to
the principal-safe public endpoint with api.content_search.enabled: true.
It registers GET|HEAD /api/content/search only when Composer can autoload
both runtime contracts. Package absence withdraws the route. Services resolve
lazily inside the request; a missing or failing binding returns a sanitized,
correlated 503 instead of silently disabling the endpoint or resolving a
database writer while routes are built.
The optional seam is represented by API-owned read-model and rate-limiter ports. Version-bounded adapters validate the real optional package contracts and translate their public DTOs field-by-field; API source does not import optional Auth/Search runtime types or enumerate result-object properties.
The response is a closed JSON:API projection of access-checked search hits. Raw index rows are never serialized. Every request uses the immutable authorization principal prepared by the HTTP middleware and consumes both a deployment-global atomic rate-limit bucket and a fixed anonymous or hashed authenticated-principal bucket. Client forwarding headers do not participate in identity. Anonymous GET/HEAD requests are session-stateless; an existing session cookie still resumes the authenticated session.
meta.isComplete reports whether Search exhausted its bounded raw candidate
window. When it is false, totals, pages, and facets are lower bounds, and
filters or non-relevance sorts apply only inside that window. An empty visible
result may still be incomplete when every inspected candidate is denied or
filtered; the response never exposes those candidates' identifiers or values.
Optional bounds live under api.content_search.rate_limit:
'api' => [ 'content_search' => [ 'enabled' => true, 'rate_limit' => [ 'identity_max' => 30, 'global_max' => 300, 'window_seconds' => 60, ], ], ],
Accepted query keys are q, page, page_size, topic, content_type,
source, min_quality, sort, order, and facets. Unknown or malformed
input is refused before rate limiting or provider execution.