You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Defines the schema for REST API plugins that register Discovery, Metadata, Data CRUD, Batch, and Permission routes with the HTTP Dispatcher.
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
REST API Plugin Protocol
Defines the schema for REST API plugins that register Discovery, Metadata,
Data CRUD, Batch, and Permission routes with the HTTP Dispatcher.
This plugin type implements Phase 2 of the API Protocol implementation plan,
providing standardized REST endpoints with:
Request validation middleware using Zod schemas
Response envelope wrapping with BaseResponseSchema
Error handling using ApiErrorSchema
OpenAPI documentation auto-generation
Features:
Route registration for core API endpoints
Automatic schema-based validation
Standardized request/response envelopes
OpenAPI/Swagger documentation generation
Architecture Alignment:
Salesforce: REST API with metadata and data CRUD
Microsoft Dynamics: Web API with entity operations
Strapi: Auto-generated REST endpoints from schemas
Serving routes from a platform plugin (imperative http.server mount)
// A PLATFORM plugin mounts its routes in CODE — resolve the `http.server`// service from the plugin context and register handlers on `kernel:ready`// (the service is registered by plugin-hono-server). This is the platform's// own door-building primitive, not an app-author surface: an app declares// `defineStack({ apis })`, computes in a flow, and registers code as a stack// function or a connector. The worked// manifest example that used to sit here declared `contributes.routes`,// which was removed in @objectstack/spec 17 (commit bc56e1881): nothing ever read// it, so every route it showed parsed cleanly and served nothing.classRestApiPlugin{name='rest_api';asyncinit(ctx: PluginContext){ctx.hook('kernel:ready',async()=>{constserver=awaitctx.getService<IHttpServer>('http.server');server.get('/api/v1/discovery',(req,res)=>{ ... });server.post('/api/v1/data/:object',(req,res)=>{ ... });});}}
A declarative endpoint over a pipeline the platform already runs
(query/return records, trigger a flow) is defineStack({ apis }) instead —
no plugin code at all.
[REMOVED] RestApiPluginConfig.openApi.uiPath was removed in @objectstack/spec 18.1.0 (ADR-0049 enforce-or-remove) — nothing ever read it: no documentation viewer was ever served at its path, the /api/docs default included, and the platform serves no HTML API documentation viewer at all, only the machine-readable OpenAPI document. Delete the key. The OpenAPI document is served at GET /api/v1/openapi.json under the REST server's default api.basePath and api.version (the path follows both) while api.enableOpenApi is on; point any viewer or client generator you run yourself at that document.
uiFramework
never
optional
[REMOVED] RestApiPluginConfig.openApi.uiFramework was removed in @objectstack/spec 18.1.0 (ADR-0049 enforce-or-remove) — nothing ever read it: no swagger-ui, redoc, rapidoc or elements viewer was ever rendered from it, and the platform serves no HTML API documentation viewer at all, only the machine-readable OpenAPI document. Delete the key. The OpenAPI document is served at GET /api/v1/openapi.json under the REST server's default api.basePath and api.version (the path follows both) while api.enableOpenApi is on; point any viewer or client generator you run yourself at that document.
[REMOVED] RestApiEndpoint.timeout was renamed to timeoutMs in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose, and the neighbouring cache TTL two lines below is in SECONDS. Rename the key to timeoutMs; the value (milliseconds) is unchanged.
cacheTtl
never
optional
[REMOVED] RestApiEndpoint.cacheTtl was renamed to cacheTtlSeconds in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose, and the neighbouring request timeout two lines above is in MILLISECONDS. Rename the key to cacheTtlSeconds; the value (seconds) is unchanged.
handlerStatus
never
optional
[REMOVED] RestApiEndpoint.handlerStatus was removed in @objectstack/spec 17 (ADR-0049 enforce-or-remove) — nothing ever read it: no registrar, dispatcher or adapter consulted the key, so an endpoint declared stub or planned was served exactly like an implemented one, and the 501 NOT_IMPLEMENTED its docstring promised is raised by the declarative-endpoint executor for a target it cannot serve, never from this field. Delete the key. An endpoint that has no handler yet is simply not registered; a declared-but-unbuilt route answering 501 is not a platform capability (ruling record, 2026-09-01).
[REMOVED] RestApiPluginConfig.openApi.uiPath was removed in @objectstack/spec 18.1.0 (ADR-0049 enforce-or-remove) — nothing ever read it: no documentation viewer was ever served at its path, the /api/docs default included, and the platform serves no HTML API documentation viewer at all, only the machine-readable OpenAPI document. Delete the key. The OpenAPI document is served at GET /api/v1/openapi.json under the REST server's default api.basePath and api.version (the path follows both) while api.enableOpenApi is on; point any viewer or client generator you run yourself at that document.
uiFramework
never
optional
[REMOVED] RestApiPluginConfig.openApi.uiFramework was removed in @objectstack/spec 18.1.0 (ADR-0049 enforce-or-remove) — nothing ever read it: no swagger-ui, redoc, rapidoc or elements viewer was ever rendered from it, and the platform serves no HTML API documentation viewer at all, only the machine-readable OpenAPI document. Delete the key. The OpenAPI document is served at GET /api/v1/openapi.json under the REST server's default api.basePath and api.version (the path follows both) while api.enableOpenApi is on; point any viewer or client generator you run yourself at that document.
[REMOVED] RestApiPluginConfig.performance.defaultCacheTtl was renamed to defaultCacheTtlSeconds in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose. Rename the key to defaultCacheTtlSeconds; the value (seconds) is unchanged.
[REMOVED] RestApiEndpoint.timeout was renamed to timeoutMs in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose, and the neighbouring cache TTL two lines below is in SECONDS. Rename the key to timeoutMs; the value (milliseconds) is unchanged.
cacheTtl
never
optional
[REMOVED] RestApiEndpoint.cacheTtl was renamed to cacheTtlSeconds in @objectstack/spec 17 — the unit of a duration-shaped number lives in the key name, not only in the describe prose, and the neighbouring request timeout two lines above is in MILLISECONDS. Rename the key to cacheTtlSeconds; the value (seconds) is unchanged.
handlerStatus
never
optional
[REMOVED] RestApiEndpoint.handlerStatus was removed in @objectstack/spec 17 (ADR-0049 enforce-or-remove) — nothing ever read it: no registrar, dispatcher or adapter consulted the key, so an endpoint declared stub or planned was served exactly like an implemented one, and the 501 NOT_IMPLEMENTED its docstring promised is raised by the declarative-endpoint executor for a target it cannot serve, never from this field. Delete the key. An endpoint that has no handler yet is simply not registered; a declared-but-unbuilt route answering 501 is not a platform capability (ruling record, 2026-09-01).