Changelog - 2026-09-23
Rebuilding every example against the current framework exposed these defects. Each one is fixed at its root.
Error responses use valid OpenAPI keys
Bug FixjsonResponse(), htmlResponse() and the static-asset routes declared the error body under '4xx | 5xx', which OpenAPI does not accept, so openapi-typescript and openapi-fetch typed every error as never. The body is now declared under 4XX and 5XX.
- Generated clients:
erroris now typed. Regenerate the client. - Code that reads
responses['4xx | 5xx']from ajsonResponse()result: read4XXor5XX.
One helper and one component for error responses
EnhancementerrorResponses() returns both error keys. Spread it in a route of your own instead of copying the error line:
import { errorResponses } from '@venizia/ignis';
responses: {
[HTTP.ResultCodes.RS_2.Ok]: {
description: 'PNG frame',
content: { 'image/png': { schema: { type: 'string', format: 'binary' } } },
},
...errorResponses(),
},// Before
['4xx | 5xx']: jsonContent({ description: 'Error Response', schema: ErrorSchema }),
// After
...errorResponses(),ErrorSchema is now the named component ErrorResponse, and both keys reference #/components/schemas/ErrorResponse.
- Generated clients: the error type becomes
components['schemas']['ErrorResponse'], with the same fields. Regenerate the client. - Hand-written error responses: replace the error line with the spread, then drop the
ErrorSchemaandjsonContentimports if nothing else uses them. - A schema of your own named
ErrorResponsenow shares the framework's component name. Rename yours. - A schema that extends
ErrorSchemais documented asallOftheErrorResponsereference plus its own fields.
path.isStrict controls trailing-slash matching
Bug Fix Breaking Changepath.isStrict was never read, so path: { isStrict: false } still answered /api/ with 404. It now decides trailing-slash matching. The default stays true.
- An app with
path.isStrict: false:/api/users/now reaches/api/usersinstead of answering 404. - Declare routes without a trailing slash under
isStrict: false. A route declared as/users/answers neither/usersnor/users/. strictPathis removed. ReplacestrictPath: Xwithpath: { base, isStrict: X }. An app whose config still carriesstrictPathrefuses to start and names the replacement.- Controller-level
isStricthas no effect once the controller is mounted: the application's value decides.
WARNING
Under non-strict routing, a .. segment is normalized away before routing, so .../objects/.. reaches the parent route. For the static-asset controller that parent is the bucket route. Keep isStrict: true when clients build URLs from untrusted names.
Search controllers inject their repository
EnhancementSearchControllerFactory.defineSearchController now injects the repository named in repository.name, the same as defineCrudController. A bare subclass works:
@controller({ path: '/articles' })
export class ArticleSearchController extends BaseArticleSearchController {}Before, the subclass got undefined and failed at the first request. An explicit @inject constructor still wins. An empty repository.name now throws when the controller is defined.
Controller factories share one repository injection
EnhancementdefineCrudController and defineSearchController now call one exported helper, registerFactoryRepositoryInjection. Use it in a controller factory of your own instead of writing the injection metadata by hand:
import { registerFactoryRepositoryInjection } from '@venizia/ignis';
registerFactoryRepositoryInjection({
target: GeneratedController,
factoryName: 'defineReportController',
controllerName: 'ReportController',
repositoryName: ReportRepository.name,
});- It records
repositories.<repositoryName>at constructor parameter 0, as a required injection. A subclass with its own@injectat parameter 0 still wins. targettakes the generated class itself (TClass<unknown>). TypeScript refuses a bare function or an abstract class.- An empty
repositoryNamethrows a message that names the factory. - The two built-in factories inject exactly as before.
CRUD routes ignore audit fields in the request body
Security Behavior ChangeA client could forge the audit trail through a generated CRUD route. POST stored whatever createdBy the body named, PATCH could rewrite the creator of an existing row, and a PATCH /{id} body with an id renamed the row.
The default bodies now leave out the keys the entity says the server fills (ask with getServerStampedKeys()). On a relational entity (BaseEntity, defineEntity) that is createdBy, modifiedBy, createdAt and modifiedAt, each one whose column has a default or $onUpdate. A search entity and any other entity leave out none. Update bodies also leave out id.
A client that still sends one of these keys gets no error. Validation strips the key:
// PATCH /configurations/42, signed in as user 7
{ "description": "edited", "createdBy": 999, "id": 43 }
// Stored: description 'edited', createdBy unchanged, modifiedBy 7, id still 42- Regenerate generated clients. The server now stamps these keys. Edit forms that send the whole record back record the real editor and time.
- A search collection keeps its fields. A required
createdAtstays in thePOSTbody. - An audit column you declared without a default stays in the body.
- A
z.strictObjectentity schema answers422to a client that sends a left-out key. - A refined entity schema is used as it is when it holds none of the left-out keys. A refined schema that holds one, and any transformed schema, make defining the controller fail with a message naming
routes.<route>.request.body. Pass your own body there. A transformed update schema always fails. - A custom
request.bodyis not covered. Built fromcreateInsertSchemaorcreateUpdateSchema, it still carries these keys -.omit()them yourself. - Server code is not affected.
repository.create()andrepository.updateById()still accept every column.deletedAtis unchanged. - A
PATCHbody left with nothing to write answers 400 with codecore.request.nothing_to_update, instead of a 500. That covers{}, awherealone onPATCH /, and a body holding only left-out keys, including with a customrequest.body. - Bump
@venizia/ignis-kerneland@venizia/ignis-connectorstogether. A new kernel with an older connectors leaves the audit keys writable. resolveCreateConfigcalled directly now types its defaultrequest.bodyasTAnyObjectSchema, not your create schema.
Nested JSON-path updates create missing objects
Bug FixOn PostgreSQL, updating 'metadata.a.b.c' on a row whose metadata is {} reported count: 1 and left {}. It now writes { a: { b: { c: ... } } } and keeps existing keys. SQLite already did this.
- A scalar parent or a
NULLcolumn leaves the column unchanged. A scalar root still raises on PostgreSQL. - An array index in the middle of a path appends when it names the next free slot, on both engines. Past that slot, PostgreSQL still appends and SQLite leaves the value unchanged.
A rejected Socket.IO client receives unauthenticated
Bug FixWhen authenticateFn returned false or threw, the disconnect arrived before the notice, so the client never saw the event. SocketIOServerHelper now emits the notice on the client's own socket, then disconnects it. onUnauthenticated(message) fires before onDisconnected('io server disconnect'). No API change.
postgres-js loads under Bun next to postgres
Bug FixAn app that imported PostgresJsDriver from @venizia/ignis/postgres/postgres-js and then postgres itself crashed at load with TypeError: require() async module ".../postgres/src/index.js" is unsupported. The subpath now has an import condition, so it loads. require() consumers and the types are unchanged.
Apps that import jose load reliably
Bug FixAn app that imported jose itself could crash at load under Bun with require() async module ".../jose/dist/webapi/index.js" is unsupported. With @venizia/ignis imported first, every load crashed; with jose first, one in five. The token services now load jose with import(), once per process. With JWT or service authentication configured, the authentication component loads it at boot.
- No API change. Compiled binaries still carry
jose. - A missing or broken
josefails the boot, with an error namingjose, when JWT or service authentication is configured. Before, every token check answered 401.josestays a required peer; a Basic-only app does not load it. - A failed load is retried. A token service you construct yourself loads
joseat its first token operation, and tries again after a failure. - A subclass of
AuthenticateComponentthat overridesbinding()mustreturn super.binding(). Otherwise a missingjosebecomes an unhandled rejection instead of a failed boot.
The change-password document lists every required field
Bug FixThe OpenAPI document for POST /auth/change-password listed only oldCredential and newCredential as required, while validation also requires scheme and userId. Generated clients let callers omit them and those calls failed with 422. The document now lists all four.
- Requests are unchanged.
- Regenerate an OpenAPI client:
schemeanduserIdbecome required in its types. - Your own
payload.changePassword.request.schemais unaffected.
stop() closes the datasources
Bug Fixapplication.stop() stopped the server and left every datasource open, so tests leaked and a Node process could hang. stop() now closes every datasource the boot configured, after the server stops.
await application.stop(); // post-stop hooks -> server -> close() on every configured datasourceclose()is new on every datasource. It runs once; a later call returns the same promise. A search datasource keeps the rootclose(), which does nothing.- A failed or stuck
close()is logged and does not stop the others.stop()waits at mostdataSourceCloseTimeoutMs(default10_000) for each one, then logsClose timed outand moves on.0waits without limit. - The datasources close even when the server fails to, and
stop()still reports that server error. A secondstop()is harmless. WorkerApplication.stop()closes its datasources too, so a Vite hot-reloaddisposereleases the PGlite OPFS lock.- Remove your own close from a post-stop hook when it ends a configured datasource's client: the hook runs first, and a second end fails (logged). A datasource you configure by hand in
postConfigure()is still yours to close.