Codescovery.Library.Api 9.0.0

dotnet add package Codescovery.Library.Api --version 9.0.0
                    
NuGet\Install-Package Codescovery.Library.Api -Version 9.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Codescovery.Library.Api" Version="9.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Codescovery.Library.Api" Version="9.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Codescovery.Library.Api" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Codescovery.Library.Api --version 9.0.0
                    
#r "nuget: Codescovery.Library.Api, 9.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Codescovery.Library.Api@9.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Codescovery.Library.Api&version=9.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Codescovery.Library.Api&version=9.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 112 11/23/2024
2.0.0-beta5 276 10/24/2023
2.0.0-beta4 122 10/1/2023
2.0.0-beta3 118 9/29/2023
2.0.0-beta2 127 9/28/2023
2.0.0-beta1 113 9/28/2023
1.0.0-beta9 158 5/4/2023
1.0.0-beta8 123 5/4/2023
1.0.0-beta7 128 5/4/2023
1.0.0-beta6 139 5/4/2023
1.0.0-beta5 138 4/26/2023
1.0.0-beta4 141 4/23/2023
1.0.0-beta3 143 4/21/2023
1.0.0-beta2 147 4/21/2023
1.0.0-beta10 128 9/26/2023
1.0.0-beta1 153 4/21/2023