ApiConventions.CommunityToolkit 6.4.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ApiConventions.CommunityToolkit --version 6.4.0
NuGet\Install-Package ApiConventions.CommunityToolkit -Version 6.4.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="ApiConventions.CommunityToolkit" Version="6.4.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ApiConventions.CommunityToolkit --version 6.4.0
#r "nuget: ApiConventions.CommunityToolkit, 6.4.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.
// Install ApiConventions.CommunityToolkit as a Cake Addin
#addin nuget:?package=ApiConventions.CommunityToolkit&version=6.4.0

// Install ApiConventions.CommunityToolkit as a Cake Tool
#tool nuget:?package=ApiConventions.CommunityToolkit&version=6.4.0

ApiConventions.CommunityToolKit社区工具包

ApiConventions.CommunityToolKit API社区工具包

  1. 帮助您规范编写API;
  2. 简化API返回类型声明;
  3. 统一返回结果封装;
  4. 参数校验;
  5. 自定义异常捕捉;

发行版本说明

版本 内容
1.0.0 新增约定
1.0.1 增加结果过滤器、参数校验过滤器、异常捕捉过滤器
1.0.2 增加Swagger文档注释过滤器

Definition

Namespace: ApiConventions.CommunityToolKit Assembly: ApiConventions.CommunityToolKit.dll

Examples

  • 代码
using ApiConventions.CommunityToolKit.Extends;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.

builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();

builder.Services.AddSwaggerGenCommunityToolKitFilter(builder);

builder.Services.AddResponseResultCommunityToolKitFilter();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json",
        $"{builder.Environment.ApplicationName} v1"));
}

app.UseHttpsRedirection();

app.UseAuthorization();

app.MapControllers();

app.Run();


Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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. 
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
6.4.4 176 10/19/2022
6.4.3 99 10/12/2022
6.4.2 102 10/12/2022
6.4.1 117 10/12/2022
6.4.0 133 10/12/2022
1.0.0 112 10/8/2022