Automatic REST API for PostgreSQL Database as .NET8 Middleware
MIT License
Bot releases are visible (Hide)
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and
appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first
file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The
first file after the --optional switch is optional.
Note: Values in the later file will override the values in the previous one.
npgsqlrest [--key=value] Override the configuration with this key with a new value (case insensitive,
use : to separate sections).
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Examples:
Example: use two config files npgsqlrest appsettings.json appsettings.Development.json
Example: second config file optional npgsqlrest appsettings.json -o appsettings.Development.json
Example: override ApplicationName config npgsqlrest --applicationname=Test
Example: override Auth:CookieName config npgsqlrest --auth:cookiename=Test
See client changelog for more details on version changes.
Published by vbilopav 3 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and
appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first
file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The
first file after the --optional switch is optional.
Note: Values in the later file will override the values in the previous one.
npgsqlrest [--key=value] Override the configuration with this key with a new value (case insensitive,
use : to separate sections).
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Examples:
Example: use two config files npgsqlrest appsettings.json appsettings.Development.json
Example: second config file optional npgsqlrest appsettings.json -o appsettings.Development.json
Example: override ApplicationName config npgsqlrest --applicationname=Test
Example: override Auth:CookieName config npgsqlrest --auth:cookiename=Test
See client changelog for more details on version changes.
Published by vbilopav 3 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
NpgsqlRest.UseEnvironmentConnection
:
If the connection string is not found, empty, or missing host, port or database, the connection string is created from the environment variables.
See https://www.postgresql.org/docs/current/libpq-envars.html for the list of the environment variables.
Note: Npgsql will use the environment variables by default but only for the small set of the connection string parameters like username and password (see https://www.npgsql.org/doc/connection-string-parameters.html#environment-variables).
Set this option to true to use environment variables for host, port and database as well.
When this option is enabled and these environment variables are set, connection string doesn't have to be defined at all and it will be created from the environment variables.
NpgsqlRest.TsClient.DefaultJsonType
:
Sets the default TypeScript type for JSON types when generating the TypeScript client.
Upgrade NpgsqlRest to 2.8.4.
Version from 1.2.4 to 1.2.7 is to sync with the version of the NPM package.
Improvements in external auth:
select * from auth($1)
or select * from auth($1,$2)
or select * from auth($1,$2,3)
(three is max).New setting NpgsqlRest.InstanceIdRequestHeaderName
:
{
//
//...
//
"NpgsqlRest": {
"InstanceIdRequestHeaderName": "X-Instance-Id"
}
//
//...
//
}
The NpgsqlRest.InstanceIdRequestHeaderName
setting allows you to specify the header name that will be used to identify the instance of the application. Header value will be used as the unique running instance ID.
This is useful when you have multiple instances of the application running behind a load balancer, and you want to identify which instance is handling the request.
Default is null
(not used).
New setting NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
:
{
//
//...
//
"NpgsqlRest": {
"AuthenticationOptions": {
"CustomParameterNameToClaimMappings": {
"parameter_name": "claim_type_name"
}
}
},
//
//...
//
}
Maps a routine function name to a custom claim type. If the request parameter maps to the parameter name defined by the NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
- it will return the matching value of the claim type, regardless of the parameter value.
If that parameter is an array, it will have all values in an array of that claim type. If it is a single value, it will have only the first value of that claim type.
UseHsts
: Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.{
//
//...
//
"Ssl": {
"HttpsRedirection": true,
//
// Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builderhstsbuilderextensions.usehsts?view=aspnetcore-2.1
//
"UseHsts": true
}
//
//...
//
}
Bugfix with missing dictionary key when using external auth.
New Config section:
"Config": {
//
// Expose current configuration to the endpoint for debugging and inspection. Note, the password in the connection string is not exposed.
//
"ExposeAsEndpoint": "/config",
//
// Add the environment variables to configuration first.
//
"AddEnvironmentVariables": false
}
CustomRequestHeaders
option.Published by vbilopav 4 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
Upgrade NpgsqlRest to 2.8.4.
Version from 1.2.4 to 1.2.7 is to sync with the version of the NPM package.
Improvements in external auth:
select * from auth($1)
or select * from auth($1,$2)
or select * from auth($1,$2,3)
(three is max).New setting NpgsqlRest.InstanceIdRequestHeaderName
:
{
//
//...
//
"NpgsqlRest": {
"InstanceIdRequestHeaderName": "X-Instance-Id"
}
//
//...
//
}
The NpgsqlRest.InstanceIdRequestHeaderName
setting allows you to specify the header name that will be used to identify the instance of the application. Header value will be used as the unique running instance ID.
This is useful when you have multiple instances of the application running behind a load balancer, and you want to identify which instance is handling the request.
Default is null
(not used).
New setting NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
:
{
//
//...
//
"NpgsqlRest": {
"AuthenticationOptions": {
"CustomParameterNameToClaimMappings": {
"parameter_name": "claim_type_name"
}
}
},
//
//...
//
}
Maps a routine function name to a custom claim type. If the request parameter maps to the parameter name defined by the NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
- it will return the matching value of the claim type, regardless of the parameter value.
If that parameter is an array, it will have all values in an array of that claim type. If it is a single value, it will have only the first value of that claim type.
UseHsts
: Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.{
//
//...
//
"Ssl": {
"HttpsRedirection": true,
//
// Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builderhstsbuilderextensions.usehsts?view=aspnetcore-2.1
//
"UseHsts": true
}
//
//...
//
}
Bugfix with missing dictionary key when using external auth.
New Config section:
"Config": {
//
// Expose current configuration to the endpoint for debugging and inspection. Note, the password in the connection string is not exposed.
//
"ExposeAsEndpoint": "/config",
//
// Add the environment variables to configuration first.
//
"AddEnvironmentVariables": false
}
CustomRequestHeaders
option.Published by vbilopav 4 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
Upgrade NpgsqlRest to 2.8.4.
Version from 1.2.4 to 1.2.7 is to sync with the version of the NPM package.
Improvements in external auth:
select * from auth($1)
or select * from auth($1,$2)
or select * from auth($1,$2,3)
(three is max).New setting NpgsqlRest.InstanceIdRequestHeaderName
:
{
//
//...
//
"NpgsqlRest": {
"InstanceIdRequestHeaderName": "X-Instance-Id"
}
//
//...
//
}
The NpgsqlRest.InstanceIdRequestHeaderName
setting allows you to specify the header name that will be used to identify the instance of the application. Header value will be used as the unique running instance ID.
This is useful when you have multiple instances of the application running behind a load balancer, and you want to identify which instance is handling the request.
Default is null
(not used).
New setting NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
:
{
//
//...
//
"NpgsqlRest": {
"AuthenticationOptions": {
"CustomParameterNameToClaimMappings": {
"parameter_name": "claim_type_name"
}
}
},
//
//...
//
}
Maps a routine function name to a custom claim type. If the request parameter maps to the parameter name defined by the NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
- it will return the matching value of the claim type, regardless of the parameter value.
If that parameter is an array, it will have all values in an array of that claim type. If it is a single value, it will have only the first value of that claim type.
UseHsts
: Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.{
//
//...
//
"Ssl": {
"HttpsRedirection": true,
//
// Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builderhstsbuilderextensions.usehsts?view=aspnetcore-2.1
//
"UseHsts": true
}
//
//...
//
}
Bugfix with missing dictionary key when using external auth.
New Config section:
"Config": {
//
// Expose current configuration to the endpoint for debugging and inspection. Note, the password in the connection string is not exposed.
//
"ExposeAsEndpoint": "/config",
//
// Add the environment variables to configuration first.
//
"AddEnvironmentVariables": false
}
CustomRequestHeaders
option.Published by vbilopav 4 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
New setting NpgsqlRest.InstanceIdRequestHeaderName
:
{
//
//...
//
"NpgsqlRest": {
"InstanceIdRequestHeaderName": "X-Instance-Id"
}
//
//...
//
}
The NpgsqlRest.InstanceIdRequestHeaderName
setting allows you to specify the header name that will be used to identify the instance of the application. Header value will be used as the unique running instance ID.
This is useful when you have multiple instances of the application running behind a load balancer, and you want to identify which instance is handling the request.
Default is null
(not used).
New setting NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
:
{
//
//...
//
"NpgsqlRest": {
"AuthenticationOptions": {
"CustomParameterNameToClaimMappings": {
"parameter_name": "claim_type_name"
}
}
},
//
//...
//
}
Maps a routine function name to a custom claim type. If the request parameter maps to the parameter name defined by the NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
- it will return the matching value of the claim type, regardless of the parameter value.
If that parameter is an array, it will have all values in an array of that claim type. If it is a single value, it will have only the first value of that claim type.
UseHsts
: Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.{
//
//...
//
"Ssl": {
"HttpsRedirection": true,
//
// Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builderhstsbuilderextensions.usehsts?view=aspnetcore-2.1
//
"UseHsts": true
}
//
//...
//
}
Bugfix with missing dictionary key when using external auth.
New Config section:
"Config": {
//
// Expose current configuration to the endpoint for debugging and inspection. Note, the password in the connection string is not exposed.
//
"ExposeAsEndpoint": "/config",
//
// Add the environment variables to configuration first.
//
"AddEnvironmentVariables": false
}
CustomRequestHeaders
option.Published by vbilopav 4 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
New setting NpgsqlRest.InstanceIdRequestHeaderName
:
{
//
//...
//
"NpgsqlRest": {
"InstanceIdRequestHeaderName": "X-Instance-Id"
}
//
//...
//
}
The NpgsqlRest.InstanceIdRequestHeaderName
setting allows you to specify the header name that will be used to identify the instance of the application. Header value will be used as the unique running instance ID.
This is useful when you have multiple instances of the application running behind a load balancer, and you want to identify which instance is handling the request.
Default is null
(not used).
New setting NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
:
{
//
//...
//
"NpgsqlRest": {
"AuthenticationOptions": {
"CustomParameterNameToClaimMappings": {
"parameter_name": "claim_type_name"
}
}
},
//
//...
//
}
Maps a routine function name to a custom claim type. If the request parameter maps to the parameter name defined by the NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
- it will return the matching value of the claim type, regardless of the parameter value.
If that parameter is an array, it will have all values in an array of that claim type. If it is a single value, it will have only the first value of that claim type.
UseHsts
: Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.{
//
//...
//
"Ssl": {
"HttpsRedirection": true,
//
// Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builderhstsbuilderextensions.usehsts?view=aspnetcore-2.1
//
"UseHsts": true
}
//
//...
//
}
Bugfix with missing dictionary key when using external auth.
New Config section:
"Config": {
//
// Expose current configuration to the endpoint for debugging and inspection. Note, the password in the connection string is not exposed.
//
"ExposeAsEndpoint": "/config",
//
// Add the environment variables to configuration first.
//
"AddEnvironmentVariables": false
}
CustomRequestHeaders
option.Published by vbilopav 5 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
New setting NpgsqlRest.InstanceIdRequestHeaderName
:
{
//
//...
//
"NpgsqlRest": {
"InstanceIdRequestHeaderName": "X-Instance-Id"
}
//
//...
//
}
The NpgsqlRest.InstanceIdRequestHeaderName
setting allows you to specify the header name that will be used to identify the instance of the application. Header value will be used as the unique running instance ID.
This is useful when you have multiple instances of the application running behind a load balancer, and you want to identify which instance is handling the request.
Default is null
(not used).
New setting NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
:
{
//
//...
//
"NpgsqlRest": {
"AuthenticationOptions": {
"CustomParameterNameToClaimMappings": {
"parameter_name": "claim_type_name"
}
}
},
//
//...
//
}
Maps a routine function name to a custom claim type. If the request parameter maps to the parameter name defined by the NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
- it will return the matching value of the claim type, regardless of the parameter value.
If that parameter is an array, it will have all values in an array of that claim type. If it is a single value, it will have only the first value of that claim type.
UseHsts
: Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.{
//
//...
//
"Ssl": {
"HttpsRedirection": true,
//
// Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builderhstsbuilderextensions.usehsts?view=aspnetcore-2.1
//
"UseHsts": true
}
//
//...
//
}
Bugfix with missing dictionary key when using external auth.
New Config section:
"Config": {
//
// Expose current configuration to the endpoint for debugging and inspection. Note, the password in the connection string is not exposed.
//
"ExposeAsEndpoint": "/config",
//
// Add the environment variables to configuration first.
//
"AddEnvironmentVariables": false
}
CustomRequestHeaders
option.Published by vbilopav 5 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To create a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
New setting NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
:
{
//
//...
//
"NpgsqlRest": {
"AuthenticationOptions": {
"CustomParameterNameToClaimMappings": {
"parameter_name": "claim_type_name"
}
}
},
//
//...
//
}
Maps a routine function name to a custom claim type. If the request parameter maps to the parameter name defined by the NpgsqlRest.AuthenticationOptions.CustomParameterNameToClaimMappings
- it will return the matching value of the claim type, regardless of the parameter value.
If that parameter is an array, it will have all values in an array of that claim type. If it is a single value, it will have only the first value of that claim type.
UseHsts
: Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builder.{
//
//...
//
"Ssl": {
"HttpsRedirection": true,
//
// Adds middleware for using HSTS, which adds the Strict-Transport-Security header. See https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.builderhstsbuilderextensions.usehsts?view=aspnetcore-2.1
//
"UseHsts": true
}
//
//...
//
}
Bugfix with missing dictionary key when using external auth.
New Config section:
"Config": {
//
// Expose current configuration to the endpoint for debugging and inspection. Note, the password in the connection string is not exposed.
//
"ExposeAsEndpoint": "/config",
//
// Add the environment variables to configuration first.
//
"AddEnvironmentVariables": false
}
CustomRequestHeaders
option.Published by vbilopav 5 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To crate a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
Published by vbilopav 6 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To crate a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
Published by vbilopav 6 months ago
There are three files available for download:
appsettings.json
: The default configuration file. See the default configuration file.npgsqlrest-linux64
: Linux64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Linux 64x systems.npgsqlrest-win64.exe
: Windows64 build. This is a self-contained ahead-of-time (AOT) compiled to native code executable for the Windows 64x systems.Installation is possible via the NPM package manager:
npm install npgsqlrest --save-dev
The NPM package will download on installation the appropriate executable binary for your target operating system. The command will be available with the NPX runner:
$ npx npgsqlrest [arguments]
See usage for more info.
The client application was built from the NpgsqlRestClient
project directory.
To crate a custom build follow these steps:
NpgsqlRestClient
project directory.dotnet publish -r win-x64 -c Release --output [target dir]
Notes: win-x64
is the designated target OS for the build. Adjust this parameter appropriately for the target OS. See https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids. The project is already configured for the AOT builds, but you will need to run the publish command from the same flavor OS as the build target OS (Windows for Windows builds, Linux for Linux builds, etc).
The Mac OS builds are missing because I don't have a Mac machine. If someone could help me out with this I'd be grateful.
See the default configuration file with descriptions for more information.
❯ npgsqlrest --help
Usage:
npgsqlrest Run with the default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
npgsqlrest [files...] Run with the custom configuration files. All configuration files are required.
npgsqlrest [file1 -o file2...] Use the -o switch to mark the next configuration file as optional. The first file after the -o switch is optional.
npgsqlrest [file1 --optional file2...] Use --optional switch to mark the next configuration file as optional. The first file after the --optional switch is optional.
npgsqlrest -v, --version Show version information.
npgsqlrest -h, --help Show command line help.
Note: Values in the later file will override the values in the previous one.
Example: npgsqlrest appsettings.json appsettings.Development.json
Example: npgsqlrest appsettings.json -o appsettings.Development.json
Published by vbilopav 6 months ago
This release contains stand-alone client builds of the NpgsqlRest
web application console clients.
The build is the native ahead-of-time (AOT) compiled to native code build from following source: https://github.com/vb-consulting/NpgsqlRest/blob/master/NpgsqlRestTestWebApi/Program.cs
It contains the following files:
appsettings.json
: default configuration file (with comments).npgsqlrest-win64.exe
: native Windows-64 build.npgsqlrest-linux64
: native Linux-64 build.Usages
1: npgsqlrest-[os]
2: npgsqlrest-[os] [path to one or more configuration file(s)]
3: npgsqlrest-[os] [-v | --version | -h | --help]
Where
npgsqlrest-[os] is executable for the specific OS (like npgsqlrest-win64 or npgsqlrest-linux64)
1: run executable with default configuration files: appsettings.json (required) and appsettings.Development.json (optional).
2: run executable with optional configuration files from argument list.
3: show this screen.
Versions
Build 1.0.0.0
Npgsql 2.7.0.0
NpgsqlRest.HttpFiles 1.0.2.0
NpgsqlRest.TsClient 1.6.0.0
Note: configuration files are hierarchical, the later will override previous.
Published by vbilopav 9 months ago
This release contains framework-independent executable binaries (AOT builds) published from the AOT template project for Win-64, and Linux-64 build targets, built with NpgsqlRest version 1.6.2.
Published by vbilopav 9 months ago
This release contains framework-independent executable binaries AOT builds for Win-64, and Linux-64 build targets built with library version 1.6.1.