fl-shared-utils-components-web-models
0.2.1
dotnet add package fl-shared-utils-components-web-models --version 0.2.1
NuGet\Install-Package fl-shared-utils-components-web-models -Version 0.2.1
<PackageReference Include="fl-shared-utils-components-web-models" Version="0.2.1" />
<PackageVersion Include="fl-shared-utils-components-web-models" Version="0.2.1" />
<PackageReference Include="fl-shared-utils-components-web-models" />
paket add fl-shared-utils-components-web-models --version 0.2.1
#r "nuget: fl-shared-utils-components-web-models, 0.2.1"
#:package fl-shared-utils-components-web-models@0.2.1
#addin nuget:?package=fl-shared-utils-components-web-models&version=0.2.1
#tool nuget:?package=fl-shared-utils-components-web-models&version=0.2.1
Fl.Shared.Utils.Components.Web.Models
Shared model library for .NET web applications. Contains the data transfer objects and configuration records used across Fl.Shared.Utils.Components and Fl.Shared.Utils.Mappers.
Project structure
Fl.Shared.Utils.Components.Web.Models/
├── ErrorResponse.cs
├── RoutingConfiguration.cs
└── ServiceDescription.cs
Models
ErrorResponse
Immutable record representing a JSON error response body.
public record ErrorResponse(string Message);
| Property | Type | Description |
|---|---|---|
Message |
string |
Human-readable error description |
Serialises to:
{
"message": "Something went wrong"
}
Used by JsonExceptionHandlerMiddleware and DataHttpContentMapper<T> to produce consistent error payloads.
RoutingConfiguration
Configuration record for setting an optional URL base path for the application.
public record RoutingConfiguration
{
public static readonly RoutingConfiguration Default = new() { PathBase = string.Empty };
public string PathBase { get; init; } = string.Empty;
}
| Property | Type | Default | Description |
|---|---|---|---|
PathBase |
string |
"" |
Base path prefix for all routes (e.g. /api/v1) |
RoutingConfiguration.Default is used as a fallback when no configuration entry is present. Consumed by RoutingBasePathServiceCollectionExtensions and RoutingBasePathWebApplicationExtensions in Fl.Shared.Utils.Components.
Example appsettings.json entry:
{
"RoutingConfiguration": {
"PathBase": "/api/v1"
}
}
ServiceDescription
Configuration record that describes a service, exposed at the GET /internal/description endpoint.
public record ServiceDescription
{
public string Name { get; init; } = string.Empty;
public string Version { get; init; } = string.Empty;
}
| Property | Type | Default | Description |
|---|---|---|---|
Name |
string |
"" |
Service name |
Version |
string |
"" |
Service version |
Serialises to:
{
"name": "my-service",
"version": "1.0.0"
}
Populated from servicedescription.json via AddServiceDescriptionConfiguration and consumed by ServiceDescriptionMiddleware.
Example servicedescription.json:
{
"ServiceDescription": {
"Name": "my-service",
"Version": "1.0.0"
}
}
Dependencies
This project has no external package dependencies. It targets net8.0, net9.0 and net10.0.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on fl-shared-utils-components-web-models:
| Package | Downloads |
|---|---|
|
fl-shared-utils-components
Package Description |
|
|
fl-shared-utils-mappers
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.