Changelog
Select a version below to view the full changelog.
Note: The changelog for versions older than 3.0 can be found here: Changelog Archive
Version 3.21 (Latest)
| Version | Date |
|---|---|
| v3.21.0 | 2026-07-12 |
- New: per-connection routine discovery —
RoutineOptions.ReadMetadataFromConnectionslistsConnectionStringsnames to read functions/procedures metadata from (one routine source per name, shared filters); endpoints execute on the connection they were discovered from (an explicit@connectionannotation still wins), so databases hosting different routines (OLTP + OLAP/DW) no longer need routines duplicated on the default database; implicitly enables multiple connections, composite types resolve per database, watch mode polls each discovery connection, and cross-source path collisions warn at startup - New: routed endpoint verification —
RoutineOptions.VerifyRoutedEndpoints(None/Warn/Fail) checks at startup that routines behind@connection-routed endpoints actually exist on the target connection (one batchedto_regprocedureround-trip per target) — a content check complementingConnectionSettings.TestConnectionStringsconnectivity testing - New: environment variable fallback values —
{!NAME:fallback}completes the placeholder grammar ({NAME}optional,{!NAME}required) and works in every configuration value, static file content, and annotation values with the same rules; the default connection string ships with PostgreSQL-convention fallbacks ({!PGHOST:localhost},{!PGPORT:5432},{!PGUSER:postgres},{!PGPASSWORD:postgres}) and onlyPGDATABASErequired - New:
.envfile loaded by default —Config.EnvFiledefaults to"./.env"; real environment variables always win over the file (dotenv convention — a behavior change for explicitEnvFileusers), missing default file logs information, missing custom path warns; minimal setup is now the default config plus a one-line.env - New:
npgsqlrest --install-skill [global]— installs the Claude Code skill from the release branch matching the running version (project or user scope), replacing the manual download instructions - New: two-tone ANSI-block CLI logo with UTF-8 output on legacy Windows consoles
- Fix:
@connection <main-name>now resolves (was a request-time 500); theconnection=nameannotation form is validated; multi-host main connection no longer builds a duplicate pool; connection name matching is case-insensitive;--annotationsoutput gained six missing entries
Version 3.20.1 was never released — its changes are included in v3.21.0.
Version 3.20
| Version | Date |
|---|---|
| v3.20.0 | 2026-07-09 |
- New: Dart client code generator —
NpgsqlRest.DartClientplugin generates Dart fetch modules for Flutter projects (package:http only, all Flutter targets): request/response model classes withfromJson/toJson,ApiResult<T>/ApiErrorstatus wrappers, multipart uploads with progress callback, server-sent events (SseSubscription+ event source factories), raw responses for proxy endpoints, per-callparseUrl/parseRequesthooks, login/logout special-casing, andMockClienttestability via ahttpClientoverride — full parity with the TypeScript client - New: TanStack Query (React Query) hooks generation for the TypeScript client —
useQueryhooks for GET/QUERY endpoints anduseMutationhooks for the rest, with exported query-key factories,QueryKeyPrefixnamespacing, anImportFromwrapper-module option, and atsclient_hooks=offopt-out annotation; TanStack v5 object syntax, compiles undertsc --strict - New: function-calling schemas and llms.txt from the MCP tool set (
McpOptions.ToolSchemas) — OpenAI and Anthropictoolsarray documents plus an llms.txt capability document, projected verbatim from the MCP tool catalog and generated/served even when the /mcp endpoint is disabled - New: HTTP QUERY method support across the stack —
HTTP QUERYannotation, parameters default to the JSON body,useQueryhook mapping, MCPreadOnlyHint, and an OpenAPI skip-with-warning (noqueryoperation key until OpenAPI 3.2) - New:
OpenApiOptions.SpecVersion— emitopenapi: 3.0.3(default) oropenapi: 3.1.1 - New: required environment variables in the default connection string (
{!PGHOST},{!PGDATABASE},{!PGUSER},{!PGPASSWORD}) — a missing variable fails at startup naming exactly what to set; the{!NAME}syntax now works in anyConnectionStringsentry
Version 3.19
| Version | Date |
|---|---|
| v3.19.0 | 2026-07-03 |
- New: SQL test runner (
npgsqlrest --test) — write endpoint tests as plain.sqlfiles: boolean-SELECTandDO-block assertions, in-process endpoint invocation via embedded HTTP blocks (# @claimprincipals, response captured into a temp table), per-file isolated non-pooled connections running in parallel,Setup/Teardownsteps with named-step registry and per-step connections, dedicated test databases with{rnd}tokens,\i/\irscript includes with paste semantics, per-file-- @setup/-- @teardown/-- @connection/-- @tagannotations, path filtering (Filter) and tag filtering (Tag/ExcludeTag), watch mode (--watch) with in-process endpoint rebuilds, endpoint coverage reporting (on by default for full runs) with a CI threshold gate, JUnit XML output, and guaranteed teardown on Ctrl+C/SIGTERM and hard exits - New: watch mode (
--watch) — two modes: with--testit re-runs tests on changes (endpoint files rebuild in-process); without--testit supervises the server and restarts it on SQL file source and configuration changes, regenerating code (TypeScript client, HTTP files, OpenAPI) on every cycle - New: named parameters in SQL files —
where email = :emailinstead of$1; the placeholder is the parameter name (camelCase-converted for the API), repeated names map to one parameter (also across statements), claim mappings hook up by placeholder name, and the new@param name type is typeform retypes without renaming - New:
SqlFileSource.SkipPattern(default"*.test.sql") — exclude files from endpoint discovery by glob - New:
Log:MinimalLevelsentries accept"Off"("None","Silent") to fully mute an individual logger
Version 3.18
- New:
ProxyOptions.MaxForwardedQueryParamLength(default2048) — a server-filled value too long for the proxy query string is skipped with a warning instead of producing an unusable request line (HTTP 414/431); forward large values via a body-carrying method and@body_parameter_name - New:
OmitAutomaticParameterson the TypeScript client, HTTP file, and OpenAPI generators (defaultfalse) — omit optional server-filled parameters (HTTP Custom Type fields, resolved-parameter expressions, upload metadata, IP/claim params) from generated request shapes - Fix:
@body_parameter_namenow matches an HTTP Custom Type field by its converted, actual, or expanded signature name, case-insensitively — applied consistently by request handling and all code generators (also fixes the HTTP file and OpenAPI generators leaving the field in the query string) - Fix: TypeScript client generation for
@body_parameter_nameendpoints — no leaked?in the body property name, the body parameter is excluded from the query string, and nofetchbody is emitted forGET - Fix: all automatic (server-filled) proxy parameters — user claims, IP, HTTP Custom Type fields, and resolved-parameter expressions — now forward to proxy endpoints uniformly, with placement following the endpoint's
RequestParamType(query string or merged into the JSON body) rather than the HTTP verb - New: HTTP Custom Type response caching via the
@cachedirective — opt-in, GET-only outbound response caching with TTL, success-only storage, and stampede protection; configured globally underHttpClientOptions(CacheEnabled,MaxCacheEntries,CachePruneIntervalSeconds) - Fix: an HTTP Custom Type parameter on a database-function endpoint fired one outbound call per composite field (a 6-field type → 6 identical calls); now one call per distinct type, shared from a single response
- Fix:
@timeout,@retry_delay, and@cachedirectives placed after the headers (as the docs showed) were silently ignored — both before-request-line and after-headers placements are now equivalent
Version 3.17
| Version | Date |
|---|---|
| v3.17.0 | 2026-06-10 |
- New plugin
NpgsqlRest.Mcp— expose opted-in PostgreSQL routines as MCP tools (tools/list/tools/callover Streamable HTTP) via the@mcpannotation; a bare@mcpwith no HTTP tag is an MCP-only tool with no public route - MCP OAuth 2.1 resource-server authorization: Protected Resource Metadata (RFC 9728), audience binding (RFC 8707), per-tool
@authorizeenforcement ontools/call - Neutral plugin extension points on
RoutineEndpoint(HandleCommentLine,Items,UnhandledCommentLines) and newCommentsMode.OnlyAnnotated(now the client default) - New:
{name}annotation substitution can resolve allowlisted environment variables (NpgsqlRest:AvailableEnvVars); matching is now case-insensitive, unknown placeholders log a build-time warning - New: optional
{NAME}and required{!NAME}environment-variable placeholders in config values — missing optional variables no longer crash typed reads - Breaking: safer configuration defaults —
Cors:AllowCredentialsis nowfalse, passkeyUserVerificationRequirement/ResidentKeyRequirementdefault to"required",TestConnectionStringsdefaults totrue - Breaking (C# API only):
RoutineEndpoint.OpenApiHide/OpenApiTagsremoved — the OpenAPI plugin parses the@openapiannotation itself; annotation users are unaffected - 🔴 Security fix: SSE per-event
USING HINTscopes were not enforced — hint-scoped events were delivered to every subscriber; upgrade strongly recommended for hint-based SSE scoping - Fix: bare
@cached(no parameter list) keyed only on the routine name, serving the first cached response to all inputs - Fix: HybridCache silently bypassed the cache on null cached parameters (
Cache key contains invalid content) - Fix: malformed JSON request body now returns
400 Bad Request(was404) - Fix: JSON command parameters accept
json,jsonb, ortexttarget types
Version 3.16
New:
AvailableEnvVarsunderStaticFiles:ParseContentOptionstemplates environment-variable values into served static content (same{NAME}tags as claims) — build a SPA bundle once, inject per-environment values from pod env vars at bootNew: rate-limiter rejection
StatusCode/StatusMessageare now overridable per policy (the global values stay as defaults); ships a ready-to-use disabledlogin_throttlepolicyFix: cache stampede protection now actually fires for cached routine responses (
IRoutineCache.GetOrCreateAsync); a burst of identical cold-cache requests collapses to a single database executionFix: JSON-to-parameter parsers for
timestamp,timestamptz,time, andtimetzare now host-TZ-independent (silent host-offset shift removed)Fix:
TryParseDatefalls back to aDateTimeparse whenDateOnlyrejects offset/Z-bearing inputsBreaking: JSON timestamps are now interpreted as UTC by default (naive ISO strings assumed UTC,
Z/ offset-bearing strings converted to UTC)New
NpgsqlRest:JsonTimestampsAreUtcconfig key — opt-out escape hatch to restore the pre-3.16.0 host-local interpretation
Version 3.15
- Auth: named cookie schemes now actually authenticate requests (cookie-aware policy-scheme dispatch)
- New
Auth:CookieSameSiteandAuth:CookieSecureconfig keys for cross-origin SPA / mobile clients (root + per-scheme) - OpenAPI filtering:
IncludeSchemas,ExcludeSchemas,NameSimilarTo,NameNotSimilarTo,RequiresAuthorizationOnly - New
@openapiannotation —@openapi hideand@openapi tag <name>for per-routine OpenAPI control - Fix:
Auth:Schemeskeys validated byType, not by name — custom schemes named like the docs examples no longer fail startup (3.15.1) - Fix:
--configand--validateCLI commands honorValidateConfigKeysmode (3.15.1) - Fix:
RateLimiterOptions:PoliciesandCacheOptions:Profilesvalidate by shape — custom policy / profile names no longer fail startup underValidateConfigKeys: "Error"(3.15.2) - Improvement:
ValidationOptions:Rulesrule bodies validated for typos (3.15.2)
Version 3.14
| Version | Date |
|---|---|
| v3.14.0 | 2026-05-09 |
- Standalone client no longer wires the
NpgsqlRest.CrudSourceplugin (library use unchanged) - New SSE annotations
@sse_publishand@sse_subscribe— split publisher and subscriber roles - Warning when a
RAISElooks like a missed@sse_publish - Reliable SSE connection handshake
- Startup error when claim-mapped parameters use a non-text type
- Warning when a request value is overridden by claim auto-bind
- Lower-allocation JSON conversion for arrays and composites
- Hardening:
ArrayPoolrentals released intry/finally, column-decryption failures logged at Trace
Version 3.13
| Version | Date |
|---|---|
| v3.13.0 | 2026-04-24 |
- Auth Schemes — named additional authentication schemes (Cookies / BearerToken / Jwt)
- Login functions can select a scheme via the
schemecolumn
Version 3.12
| Version | Date |
|---|---|
| v3.12.0 | 2026-03-23 |
- New endpoint source plugin:
NpgsqlRest.SqlFileSource— generate REST API endpoints directly from.sqlfiles - Multi-command SQL files with batched execution and named result sets
- New
@param/@parameterannotation for renaming and retyping parameters across all endpoint types - Glob pattern
**recursive matching support - Interface refactoring:
IEndpointSource/IRoutineSourcesplit - TsClient: multi-command SQL file endpoint support
- Composite type cache public API
Version 3.11
proxy_outannotation (post-execution proxy)- TsClient:
proxyandproxy_outpassthrough endpoint support authorizeannotation now matches user ID and user name claims
Version 3.10
| Version | Date |
|---|---|
| v3.10.0 | 2026-02-25 |
- Resolved parameter expressions for server-side secret handling
- HTTP Client Type retry logic (
@retry_delay) - Data Protection encrypt/decrypt annotations
Version 3.9
| Version | Date |
|---|---|
| v3.9.0 | 2026-02-23 |
- Commented configuration output (
--config) - Configuration search and filter (
--config [filter]) - CLI improvements and test suite
Version 3.8
| Version | Date |
|---|---|
| v3.8.0 | 2025-02-11 |
- Configuration key validation
- Optional path parameters
- Machine-readable CLI commands for tool integration
- Universal
fallback_handlerfor all upload handlers
Version 3.7
| Version | Date |
|---|---|
| v3.7.0 | 2025-02-07 |
- Pluggable table format renderers (HTML, Excel)
- TsClient per-endpoint URL export control
- Excel upload handler
fallback_handler
Version 3.6
- Security headers middleware
- Forwarded headers middleware
- Health check endpoints
- PostgreSQL statistics endpoints
Version 3.5
| Version | Date |
|---|---|
| v3.5.0 | 2025-01-28 |
- PasskeyAuth (WebAuthn/FIDO2)
- Response compression fix for static files
- Separate core and client logging
Version 3.4
- Composite type support (arrays, nested JSON)
- Deep nested composite type resolution
- Multidimensional array support
- Performance optimizations (type category lookup, StringBuilder pooling, CancellationToken propagation)
Version 3.3
- Parameter validation
- Linux ARM64 build and Docker image
- Proxy response caching
- Optional
@prefix for comment annotations
Version 3.2
- Reverse proxy feature
- JWT authentication support
- HybridCache support
- Docker image with Bun runtime
Version 3.1
- HTTP Types (external API calls from PostgreSQL functions)
- Path parameters support
- SIMD-accelerated string processing
- Routine caching improvements
- Multi-host connection support
Version 3.0
- .NET 10 target framework
- Rate limiter
- OpenAPI 3.0 support
- Error handling improvements (RFC 7807 Problem Details)
- TsClient improvements
- SSE (Server-Sent Events) naming refactor