Codescovery.Library.Api
2.0.0-beta5
See the version list below for details.
dotnet add package Codescovery.Library.Api --version 2.0.0-beta5
NuGet\Install-Package Codescovery.Library.Api -Version 2.0.0-beta5
<PackageReference Include="Codescovery.Library.Api" Version="2.0.0-beta5" />
paket add Codescovery.Library.Api --version 2.0.0-beta5
#r "nuget: Codescovery.Library.Api, 2.0.0-beta5"
// Install Codescovery.Library.Api as a Cake Addin #addin nuget:?package=Codescovery.Library.Api&version=2.0.0-beta5&prerelease // Install Codescovery.Library.Api as a Cake Tool #tool nuget:?package=Codescovery.Library.Api&version=2.0.0-beta5&prerelease
library-commons-api
A package for common api problems
Roles Permissions Authorization Handler
You can use our extension method that will help you to authorize your users based on their roles and permissions.
How to use it
You can use either the default Roles Permissions Authorization Handler or you can create your own Roles Permissions Authorization Handler.
Using the default Roles Permissions Authorization Handler
services.AddDefaultRolesPermissionsAuthorizationHandler();
Using your own Roles Permissions Authorization Handler
services.AddRolesPermissionsAuthorizationHandler<YourRolesPermissionsAuthorizationHandler>();
YourRolesPermissionsAuthorizationHandler must implement IAuthorizationHandler interface.
Response Builder Services
You can use our extension method that will help you to build your responses.
How to use it
services.AddResultBuilderService();
Response Result Handlers
It will automatically add all IResponseResultHandler implementations to the DI container.
How to use it
services.AddResponseResultHandlers();
services.AddDefaultResponseResultsHandler();
Configure Using Api Configuration
Enables the use of the configuration file to configure the api.
How to use it
// Configure services
services.ConfigureUsingApiConfiguration(builder.Configuration);
//Configure app
appBuilder.ConfigureSwaggerUsingApiConfigurations(apiConfigurations.Value);
AppSettings Section
"ApiConfiguration": {
"UseCors": true,
"UseSwagger": true,
"UseHealthCheck": true,
"UseHttpContextAccessor": true,
"UseControllers": true,
"UseDefaultJsonSerializerOptions": true,
"UseHttpsRedirection": true,
"Cors": [
{
"AllowAll": true,
"PolicyName": "AllowAll",
"AllowedOrigins": null,
"AllowedHeaders": null,
"AllowedMethods": null,
"AllowedCredentials": null
}
],
"Swagger": {
"Title": "Your Api Title",
"Version": "v1",
"Description": "Your api description"
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
-
net7.0
- Codescovery.Library.DependencyInjection (>= 1.0.0-beta5)
- Microsoft.AspNetCore.Authorization (>= 7.0.11)
- Microsoft.AspNetCore.Mvc.Versioning (>= 5.1.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.1)
- Swashbuckle.AspNetCore (>= 6.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 87 | 11/23/2024 |
2.0.0-beta5 | 264 | 10/24/2023 |
2.0.0-beta4 | 111 | 10/1/2023 |
2.0.0-beta3 | 106 | 9/29/2023 |
2.0.0-beta2 | 114 | 9/28/2023 |
2.0.0-beta1 | 97 | 9/28/2023 |
1.0.0-beta9 | 128 | 5/4/2023 |
1.0.0-beta8 | 95 | 5/4/2023 |
1.0.0-beta7 | 100 | 5/4/2023 |
1.0.0-beta6 | 109 | 5/4/2023 |
1.0.0-beta5 | 110 | 4/26/2023 |
1.0.0-beta4 | 114 | 4/23/2023 |
1.0.0-beta3 | 115 | 4/21/2023 |
1.0.0-beta2 | 119 | 4/21/2023 |
1.0.0-beta10 | 111 | 9/26/2023 |
1.0.0-beta1 | 120 | 4/21/2023 |