IkeMtz.NRSRx.Core.WebApi
9.2.118.8
dotnet add package IkeMtz.NRSRx.Core.WebApi --version 9.2.118.8
NuGet\Install-Package IkeMtz.NRSRx.Core.WebApi -Version 9.2.118.8
<PackageReference Include="IkeMtz.NRSRx.Core.WebApi" Version="9.2.118.8" />
<PackageVersion Include="IkeMtz.NRSRx.Core.WebApi" Version="9.2.118.8" />
<PackageReference Include="IkeMtz.NRSRx.Core.WebApi" />
paket add IkeMtz.NRSRx.Core.WebApi --version 9.2.118.8
#r "nuget: IkeMtz.NRSRx.Core.WebApi, 9.2.118.8"
#:package IkeMtz.NRSRx.Core.WebApi@9.2.118.8
#addin nuget:?package=IkeMtz.NRSRx.Core.WebApi&version=9.2.118.8
#tool nuget:?package=IkeMtz.NRSRx.Core.WebApi&version=9.2.118.8
IkeMtz.NRSRx.Core.WebApi
Overview
IkeMtz.NRSRx.Core.WebApi is a foundational library for building RESTful Web API microservices with the NRSRx framework. NRSRx is an opinionated framework that configures common cross-cutting concerns, allowing developers to focus on business logic rather than infrastructure setup.
Features
- JWT Authentication & Authorization: Pre-configured OAuth2/OIDC authentication with role-based authorization
- API Versioning: URL segment-based versioning following Microsoft REST Guidelines
- Swagger/OpenAPI Integration: Auto-generated API documentation with OAuth2 client support
- Health Checks: Built-in endpoint (
/healthz) with extensible health check configuration - JSON & XML Support: Newtonsoft.Json with camel casing, null handling, and XML serialization
- Configuration Management: Support for appsettings.json, user secrets, and environment variables
- Logging Integration: Extensible logging setup (supports Application Insights, Elasticsearch, Splunk)
- Event Publishing: Extensible publisher setup for Azure Service Bus and Redis Streams
- Entity Framework Support: Database context configuration with connection string management
Key Components
CoreWebApiStartup
The abstract base class that provides the core Web API setup. Key methods to override:
Required Overrides
ServiceTitle: Display name for your microserviceStartupAssembly: Assembly containing your controllers
Optional Overrides
SetupDatabase(): Configure Entity Framework DbContextSetupHealthChecks(): Add custom health checksSetupPublishers(): Configure event publishers (Service Bus, Redis)SetupMiscDependencies(): Register additional servicesSetupLogging(): Configure logging providersSetupAuthentication(): Customize JWT authenticationSetupSwagger(): Customize Swagger/OpenAPI configuration
Built-in Configuration
API Versioning
- URL segment-based:
/v1/products,/v2/products - Headers:
api-supported-versionsandapi-deprecated-versions - Format:
v{major}.{minor}
JSON Serialization
- Camel case property names
- Null value ignoring
- Enum string conversion
- Reference loop handling
Authentication
- JWT Bearer token authentication
- Configurable claim mappings (name, role)
- Multi-audience support
Swagger UI
- OAuth2 Authorization Code Flow with PKCE
- Auto-discovery from OIDC provider
- XML documentation comments
- Versioned endpoint organization
Endpoints
Health Check
- URL:
/healthz - Method: GET
- Response: 200 OK (Healthy) or 503 Service Unavailable (Unhealthy)
API Endpoints
All controllers inherit API versioning and are automatically registered with Swagger documentation.
Related Packages
- IkeMtz.NRSRx.Core.Models: Core model definitions
- IkeMtz.NRSRx.Core.Web: Shared web infrastructure
- IkeMtz.NRSRx.Core.EntityFramework: Entity Framework helpers
- IkeMtz.NRSRx.Events.Publishers.ServiceBus: Azure Service Bus event publishing
- IkeMtz.NRSRx.Events.Publishers.Redis: Redis Streams event publishing
Samples
See the sample WebApi project for a complete working example.
Documentation
For complete framework documentation, visit the NRSRx GitHub repository.
License
MIT © IkeMtz
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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. |
-
net9.0
- IkeMtz.NRSRx.Core.Models (>= 9.2.118.8)
- IkeMtz.NRSRx.Core.Web (>= 9.2.118.8)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 9.0.15)
- Microsoft.AspNetCore.Mvc.NewtonsoftJson (>= 9.0.15)
- Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer (>= 5.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.15)
- Microsoft.IdentityModel.Protocols.OpenIdConnect (>= 8.17.0)
- Swashbuckle.AspNetCore (>= 9.0.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on IkeMtz.NRSRx.Core.WebApi:
| Package | Downloads |
|---|---|
|
IkeMtz.NRSRx.Core.Unigration
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.2.118.8 | 4,068 | 4/28/2026 |
| 9.2.118.6 | 118 | 4/28/2026 |
| 9.2.118.5 | 116 | 4/28/2026 |
| 9.2.118.3 | 217 | 4/28/2026 |
| 9.2.117.2 | 210 | 4/27/2026 |
| 9.2.112.2 | 125 | 4/22/2026 |
| 9.2.32.1 | 303 | 2/1/2026 |
| 9.1.296.2 | 15,423 | 10/23/2025 |
| 9.1.289.3 | 506 | 10/16/2025 |
| 9.1.250.2 | 3,661 | 9/7/2025 |
| 9.1.238.3 | 2,206 | 8/27/2025 |
| 9.1.31.5 | 144 | 1/31/2026 |
| 9.1.31.4 | 136 | 1/31/2026 |
| 9.1.31.3 | 144 | 1/31/2026 |
| 8.1.198.6 | 765 | 7/17/2025 |
| 8.1.96.2 | 12,699 | 4/6/2025 |
| 8.1.54.4 | 1,954 | 2/23/2025 |
| 8.1.52.6 | 9,522 | 2/21/2025 |
| 8.1.51.7 | 305 | 2/21/2025 |
| 8.1.51.2 | 272 | 2/20/2025 |