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
refactor!: drop CrudSource from the standalone client app
Auto-generated CRUD over arbitrary tables and views is a different
product shape from the rest of NpgsqlRest. The project's core promise
is "your PostgreSQL routines become REST endpoints" — explicit,
version-controlled, comment-annotated procedures and functions where
the developer chose what to expose. Auto-CRUD inverts that, so it
no longer belongs in the standalone client's configuration surface.
The plugin itself still ships as a NuGet package and remains fully
functional for embedded use:
using NpgsqlRest.CrudSource;
...
sources.Add(new CrudSource())
Library consumers see zero change. Only NpgsqlRestClient's JSON-driven
path is affected.
Removed from NpgsqlRestClient:
- ProjectReference to NpgsqlRest.CrudSource
- using NpgsqlRest.CrudSource imports + version listing in
--version and --version --json output
- App.cs config-driven CrudSource registration block
- The entire NpgsqlRest:CrudSource block in appsettings.json,
ConfigTemplate.cs, ConfigDefaults.cs, and the description /
enum-values entries in ConfigSchemaGenerator.cs
Migration for users who had `"CrudSource": { "Enabled": true }`:
1. (recommended) Rewrite as PostgreSQL functions/procedures with
HTTP annotations — explicit per-endpoint auth, validation,
caching, rate limiting.
2. Embed the library in a custom host and register CrudSource
programmatically.
1949/1949 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: NpgsqlRestClient/ConfigSchemaGenerator.cs
-18Lines changed: 0 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -476,23 +476,6 @@ public static partial class ConfigSchemaGenerator
476
476
["NpgsqlRest:ProxyOptions:ResponseSuccessParameter"]="Default name for the proxy response success parameter.",
477
477
["NpgsqlRest:ProxyOptions:ResponseErrorMessageParameter"]="Default name for the proxy response error message parameter.",
478
478
["NpgsqlRest:ProxyOptions:ForwardUploadContent"]="When true, for upload endpoints marked as proxy, the raw multipart/form-data content is forwarded directly to the upstream proxy instead of being processed locally. This allows the upstream service to handle file uploads. When false (default), upload endpoints with proxy annotation will process uploads locally and upload metadata will not be available to the proxy.",
479
-
["NpgsqlRest:CrudSource"]="CRUD endpoints for the PostgreSQL tables and views.",
480
-
["NpgsqlRest:CrudSource:Enabled"]="Enable or disable the creation of the endpoints for the PostgreSQL tables and views.",
481
-
["NpgsqlRest:CrudSource:SchemaSimilarTo"]="Filter schema names similar to this parameter or `null` to ignore this parameter.",
482
-
["NpgsqlRest:CrudSource:SchemaNotSimilarTo"]="Filter schema names NOT similar to this parameter or `null` to ignore this parameter.",
483
-
["NpgsqlRest:CrudSource:IncludeSchemas"]="List of schema names to be included or `null` to ignore this parameter.",
484
-
["NpgsqlRest:CrudSource:ExcludeSchemas"]="List of schema names to be excluded or `null` to ignore this parameter.",
485
-
["NpgsqlRest:CrudSource:NameSimilarTo"]="Filter names similar to this parameter or `null` to ignore this parameter.",
486
-
["NpgsqlRest:CrudSource:NameNotSimilarTo"]="Filter names NOT similar to this parameter or `null` to ignore this parameter.",
487
-
["NpgsqlRest:CrudSource:IncludeNames"]="List of names to be included or `null` to ignore this parameter.",
488
-
["NpgsqlRest:CrudSource:ExcludeNames"]="List of names to be excluded or `null` to ignore this parameter.",
489
-
["NpgsqlRest:CrudSource:CommentsMode"]="Configure how the comment annotations will behave. `Ignore` will create all endpoints and ignore comment annotations. `ParseAll` will create all endpoints and parse comment annotations to alter the endpoint. `OnlyWithHttpTag` (default) will only create endpoints that contain the `HTTP` tag in the comments and then parse comment annotations.",
490
-
["NpgsqlRest:CrudSource:ReturningUrlPattern"]="URL pattern for all \"returning\" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.",
491
-
["NpgsqlRest:CrudSource:OnConflictDoNothingUrlPattern"]="URL pattern for all \"do nothing\" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.",
492
-
["NpgsqlRest:CrudSource:OnConflictDoNothingReturningUrlPattern"]="URL pattern for all \"do nothing returning \" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.",
493
-
["NpgsqlRest:CrudSource:OnConflictDoUpdateUrlPattern"]="URL pattern for all \"do update\" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.",
494
-
["NpgsqlRest:CrudSource:OnConflictDoUpdateReturningUrlPattern"]="URL pattern for all \"do update returning\" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.",
495
-
["NpgsqlRest:CrudSource:CrudTypes"]="Set of flags to enable or disable the creation of the CRUD endpoints for the specific types of the PostgreSQL tables and views.\n\nPossible values are:\nSelect, Update, UpdateReturning, Insert, InsertReturning, InsertOnConflictDoNothing, InsertOnConflictDoUpdate, InsertOnConflictDoNothingReturning,\nInsertOnConflictDoUpdateReturning, Delete, DeleteReturning, All",
496
479
["NpgsqlRest:SqlFileSource"]="SQL file source for generating REST API endpoints from .sql files.",
497
480
["NpgsqlRest:SqlFileSource:Enabled"]="Enable or disable SQL file source endpoints. Default is false.",
498
481
["NpgsqlRest:SqlFileSource:FilePattern"]="Glob pattern for SQL files, e.g. \"sql/**/*.sql\", \"queries/*.sql\".\nSupports * (any chars), ** (recursive, any including /), ? (single char).\nEmpty string disables the feature.",
@@ -556,7 +539,6 @@ public static partial class ConfigSchemaGenerator
Copy file name to clipboardExpand all lines: NpgsqlRestClient/ConfigTemplate.cs
-76Lines changed: 0 additions & 76 deletions
Original file line number
Diff line number
Diff line change
@@ -2694,82 +2694,6 @@ public static partial class ConfigSchemaGenerator
2694
2694
"ForwardUploadContent": false
2695
2695
},
2696
2696
2697
-
//
2698
-
// CRUD endpoints for the PostgreSQL tables and views.
2699
-
//
2700
-
"CrudSource": {
2701
-
//
2702
-
// Enable or disable the creation of the endpoints for the PostgreSQL tables and views.
2703
-
//
2704
-
"Enabled": false,
2705
-
//
2706
-
// Filter schema names similar to this parameter or `null` to ignore this parameter.
2707
-
//
2708
-
"SchemaSimilarTo": null,
2709
-
//
2710
-
// Filter schema names NOT similar to this parameter or `null` to ignore this parameter.
2711
-
//
2712
-
"SchemaNotSimilarTo": null,
2713
-
//
2714
-
// List of schema names to be included or `null` to ignore this parameter.
2715
-
//
2716
-
"IncludeSchemas": null,
2717
-
//
2718
-
// List of schema names to be excluded or `null` to ignore this parameter.
2719
-
//
2720
-
"ExcludeSchemas": null,
2721
-
//
2722
-
// Filter names similar to this parameter or `null` to ignore this parameter.
2723
-
//
2724
-
"NameSimilarTo": null,
2725
-
//
2726
-
// Filter names NOT similar to this parameter or `null` to ignore this parameter.
2727
-
//
2728
-
"NameNotSimilarTo": null,
2729
-
//
2730
-
// List of names to be included or `null` to ignore this parameter.
2731
-
//
2732
-
"IncludeNames": null,
2733
-
//
2734
-
// List of names to be excluded or `null` to ignore this parameter.
2735
-
//
2736
-
"ExcludeNames": null,
2737
-
//
2738
-
// Configure how the comment annotations will behave. `Ignore` will create all endpoints and ignore comment annotations. `ParseAll` will create all endpoints and parse comment annotations to alter the endpoint. `OnlyWithHttpTag` (default) will only create endpoints that contain the `HTTP` tag in the comments and then parse comment annotations.
2739
-
//
2740
-
"CommentsMode": "OnlyWithHttpTag",
2741
-
//
2742
-
// URL pattern for all "returning" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.
2743
-
//
2744
-
"ReturningUrlPattern": "{0}/returning",
2745
-
//
2746
-
// URL pattern for all "do nothing" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.
Copy file name to clipboardExpand all lines: NpgsqlRestClient/appsettings.json
-76Lines changed: 0 additions & 76 deletions
Original file line number
Diff line number
Diff line change
@@ -2685,82 +2685,6 @@
2685
2685
"ForwardUploadContent": false
2686
2686
},
2687
2687
2688
-
//
2689
-
// CRUD endpoints for the PostgreSQL tables and views.
2690
-
//
2691
-
"CrudSource": {
2692
-
//
2693
-
// Enable or disable the creation of the endpoints for the PostgreSQL tables and views.
2694
-
//
2695
-
"Enabled": false,
2696
-
//
2697
-
// Filter schema names similar to this parameter or `null` to ignore this parameter.
2698
-
//
2699
-
"SchemaSimilarTo": null,
2700
-
//
2701
-
// Filter schema names NOT similar to this parameter or `null` to ignore this parameter.
2702
-
//
2703
-
"SchemaNotSimilarTo": null,
2704
-
//
2705
-
// List of schema names to be included or `null` to ignore this parameter.
2706
-
//
2707
-
"IncludeSchemas": null,
2708
-
//
2709
-
// List of schema names to be excluded or `null` to ignore this parameter.
2710
-
//
2711
-
"ExcludeSchemas": null,
2712
-
//
2713
-
// Filter names similar to this parameter or `null` to ignore this parameter.
2714
-
//
2715
-
"NameSimilarTo": null,
2716
-
//
2717
-
// Filter names NOT similar to this parameter or `null` to ignore this parameter.
2718
-
//
2719
-
"NameNotSimilarTo": null,
2720
-
//
2721
-
// List of names to be included or `null` to ignore this parameter.
2722
-
//
2723
-
"IncludeNames": null,
2724
-
//
2725
-
// List of names to be excluded or `null` to ignore this parameter.
2726
-
//
2727
-
"ExcludeNames": null,
2728
-
//
2729
-
// Configure how the comment annotations will behave. `Ignore` will create all endpoints and ignore comment annotations. `ParseAll` will create all endpoints and parse comment annotations to alter the endpoint. `OnlyWithHttpTag` (default) will only create endpoints that contain the `HTTP` tag in the comments and then parse comment annotations.
2730
-
//
2731
-
"CommentsMode": "OnlyWithHttpTag",
2732
-
//
2733
-
// URL pattern for all "returning" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.
2734
-
//
2735
-
"ReturningUrlPattern": "{0}/returning",
2736
-
//
2737
-
// URL pattern for all "do nothing" endpoints. Parameter is the original URL. Parameter placeholder {0} is default URL.
0 commit comments