← 输入框|github.com|刷新
Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NpgsqlRest/NpgsqlRest
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.0.0
Choose a base ref
...
head repository: NpgsqlRest/NpgsqlRest
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 12 commits
  • 88 files changed
  • 1 contributor

Commits on Nov 20, 2026

  1. fix: 4.0.1 - login with claim-mapped parameters, JWT claim names and …

    …logout, typed SQL file defaults, TsClient types
    
    Found by upgrading the docs examples to 4.0.0 and running each of them.
    
    - login: request values for claim-mapped parameters are kept on login endpoints. 4.0.0 dropped them for
      anonymous callers, so a login routine with a _username/_user_name parameter answered 404 when user
      parameters were enabled (regression in 4.0.0).
    - JWT: schemes are registered with MapInboundClaims = false (also for refresh tokens), so claims keep the
      names the login routine returned. "roles" and "email" were renamed by the handler: authorize <role>
      answered 403 and the claims were NULL in user parameters and the user context.
    - logout: a scheme whose handler cannot sign out (JWT bearer) is skipped instead of answering 500.
    - SQL files: the default of a typed parameter (@PARAM $2 quantity int default 1) is converted to the
      parameter type; it was bound as text and failed with 500 when the request left the parameter out.
    - TsClient: DefaultJsonType falls back to "any" as documented (was "string"); a multi-command file with
      the void annotation returns void; a pass-through proxy function is Promise<Response> also when status
      codes are included.
    - HTTP Custom Type and proxy timeout messages use the invariant culture.
    
    Tests for each fix; changelog/v4.0.1.md; version 4.0.1; NpgsqlRest.TsClient 1.38.1.
    
    Review before release: the TsClient package version tags all say 1.38.1 (only <Version> did, so the package
    would have been built as 1.38.0 and skipped as a duplicate); npm/package.json 4.0.1; changelog notes on
    tokens refreshed by earlier versions.
    vbilopav committed Nov 20, 2026
    Configuration menu
    Copy the full SHA
    f71970a View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2026

  1. feat: 4.1.0 - what did not become an endpoint and why (--inspect), --…

    …parse, RequireAtPrefix, Npgsql 11
    
    For editors and other tools:
    
    - npgsqlrest --inspect: the endpoints, everything that was looked at and is not an endpoint with a reason code
      and a message (no_comment, no_http_annotation, unprefixed_annotations, disabled, tag_mismatch,
      excluded_by_filter, sql_error, empty_file), and the files generated for each endpoint with the generated
      name and its line (TsClient and its hooks, DartClient, HttpFiles, OpenAPI). EndpointReport is the API.
    - npgsqlrest --parse=<file.sql> and --parse-comment=<file>: how a comment is read, line by line, by the
      parsers the server runs, without a database.
    - NpgsqlRest:RequireAtPrefix (default false): only a line that begins with @ is an annotation; everything
      else is text. Applies to endpoint comments, to the SQL file source's own lines and to HTTP Custom Type
      directives. A comment in the short form creates no endpoint under it, and says so.
    
    Npgsql 10.0.3 -> 11.0.0. Measured against 4.0.1 as JIT and native AOT: equal, rows responses about 3% less
    server CPU. The load test harness is kept in BenchmarkTests/LoadTest.
    
    Fixes:
    
    - A tab separates the words of an annotation ("@authorize<TAB>admin" gave the endpoint no authorization).
    - "@name: value" response headers no longer keep the @ in the header name.
    - SQL files: quoted identifiers, E'' escape strings, and "$1$2" is two parameters, not a dollar quote.
    - Logout without a valid token in an application whose only scheme is JWT no longer answers 500.
    - NpgsqlRest.Mcp produces a NuGet package (it was never published).
    
    Version 4.1.0; plugins TsClient 1.39.0, DartClient 1.2.0, OpenAPI 1.4.0, HttpFiles 1.6.0, SqlFileSource 1.3.0,
    CrudSource 1.5.1, Mcp 1.2.1. changelog/v4.1.0.md; skill files updated.
    vbilopav committed Nov 21, 2026
    Configuration menu
    Copy the full SHA
    4206370 View commit details
    Browse the repository at this point in the history
  2. fix: an Excel and a CSV file in one upload ended the server; --inspec…

    …t marks endpoints without a route
    
    Found by running the docs examples against 4.1.0 (the first is not new in 4.x).
    
    - upload: a handler is never handed the same request twice. With "upload for excel" and
      "fallback_handler = csv", a request with an Excel file and a CSV file made the CSV handler fall back to
      itself until the stack overflowed and the process ended.
    - --endpoints and --inspect: "internalOnly": true on an endpoint that has no HTTP route (an MCP-only tool).
    - changelog: both, and that --inspect runs the enabled generators.
    vbilopav committed Nov 21, 2026
    Configuration menu
    Copy the full SHA
    0135545 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2026

  1. fix: 4.1.1 - OpenAPI, generated clients and MCP describe what endpoin…

    …ts answer with (#36)
    
    The generators decided the response from the routine alone and ignored the
    endpoint's annotations, so their descriptions differed from the responses.
    
    - core: RoutineEndpoint.GetResponseKind, one decision for all generators;
      the cache invalidation endpoint gets the cached endpoint's custom parameters
    - OpenAPI: single, void (204), text/plain values, bytea, raw, table_format,
      json as any value, composite arrays, nested, record, SQL files with several
      statements, cache invalidation, proxy, login
    - TsClient, DartClient: raw returns text, table_format and bytea return the
      response, cache invalidation returns { invalidated }, Dart void annotation
    - MCP: outputSchema and structuredContent agree for a set with one named
      column, single and the void annotation
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    32d80ba View commit details
    Browse the repository at this point in the history
  2. fix: money values are JSON strings in responses

    A money value in a row, an array or a composite field was written without quotes ($1,234.50), which is not valid JSON. It is a string now, as PostgreSQL writes it (lc_monetary). Parameters still take a number or a decimal string. Generated clients, OpenAPI and MCP type money as a string.
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    6b492b2 View commit details
    Browse the repository at this point in the history
  3. fix: raw responses are text/plain by default

    A raw endpoint without a content type answered as application/json, although the body is not JSON. Also for a raw routine that returns one array value. The OpenAPI document says the same.
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    fd378b2 View commit details
    Browse the repository at this point in the history
  4. fix: cache invalidation endpoint follows its endpoint's plugin metadata

    The invalidation endpoint gets the Items of the cached endpoint, so openapi hide and openapi tags apply to it. MCP does not take it for a second tool.
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    5f3e1f4 View commit details
    Browse the repository at this point in the history
  5. fix: upload endpoints in OpenAPI and in the generated clients

    OpenAPI: an upload endpoint has a multipart/form-data request body. TsClient, DartClient: the response is typed as upload metadata only when the routine returns one json value, otherwise any / dynamic.
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    cb01e67 View commit details
    Browse the repository at this point in the history
  6. fix: OpenAPI documents the 204 response for no value

    Endpoints with response_null_handling no_content that return a single value, or single with no row, have a 204 response next to the 200.
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    7d1fb13 View commit details
    Browse the repository at this point in the history
  7. docs: 4.1.1 changelog - changes in responses, summary, contents, know…

    …n limits
    
    Everything that cannot be described exactly by the generators is listed under Known limits.
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    281e54b View commit details
    Browse the repository at this point in the history
  8. chore: upgrade package references

    Serilog.Sinks.OpenTelemetry 4.3.0, Microsoft.Extensions.Caching.Hybrid 11.0.1 (10.11.1 on .NET 10), JwtBearer and StackExchangeRedis 10.0.15 on .NET 10; in tests WireMock.Net 2.35.0 and Mvc.Testing 10.0.15 on .NET 10.
    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    c1b22be View commit details
    Browse the repository at this point in the history
  9. bump version 4.1.1

    vbilopav committed Dec 2, 2026
    Configuration menu
    Copy the full SHA
    18a49eb View commit details
    Browse the repository at this point in the history
Loading