Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba7b3ecd60 | ||
|
|
f52c19938f | ||
|
|
83ab8ba385 | ||
|
|
7d70e8326a |
@@ -1,4 +1,4 @@
|
||||
name: CI
|
||||
name: PublishNugetPackage
|
||||
|
||||
on: [create]
|
||||
|
||||
@@ -29,6 +29,6 @@ jobs:
|
||||
run: |
|
||||
version=`git describe --tags`
|
||||
dotnet pack --configuration release -p:PackageVersion=$version
|
||||
dotnet nuget push bin/release/simcu.simapi.$version.nupkg -k ${NUGET_APIKEY} -s https://www.nuget.org/api/v2/package
|
||||
dotnet nuget push bin/release/Simcu.SimApi.$version.nupkg -k ${NUGET_APIKEY} -s https://www.nuget.org/api/v2/package
|
||||
env:
|
||||
APIKEY: ${{ secrets.APPKEY }}
|
||||
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace SimApiApi.Helpers
|
||||
namespace SimApi.Helpers
|
||||
{
|
||||
public static class SimApiUtil
|
||||
{
|
||||
|
||||
+3
-1
@@ -7,10 +7,12 @@
|
||||
<Version>0.2.3</Version>
|
||||
<Authors>xRain@SimcuTeam</Authors>
|
||||
<Description>AspNetCore一个方便的API文档,捕获异常,统一输入输出的API类库</Description>
|
||||
<PackageId>simcu.simapi</PackageId>
|
||||
<PackageId>Simcu.SimApi</PackageId>
|
||||
<IsPackable>true</IsPackable>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<ReleaseVersion>1.1.1</ReleaseVersion>
|
||||
<SynchReleaseVersion>false</SynchReleaseVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+4
-4
@@ -16,27 +16,27 @@ namespace SimApi
|
||||
//**********快捷添加**************
|
||||
|
||||
/// <summary>
|
||||
/// 添加整个SimApiAPI,同时增加CORS规则
|
||||
/// 添加整个SimAPI,同时增加CORS规则
|
||||
/// </summary>
|
||||
/// <param name="builder"></param>
|
||||
/// <param name="title"></param>
|
||||
/// <param name="description"></param>
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddSimApiApi(this IServiceCollection builder, string title,
|
||||
public static IServiceCollection AddSimApi(this IServiceCollection builder, string title,
|
||||
string description = null)
|
||||
{
|
||||
return builder.AddSimApiAuth().AddSimApiDoc(title, description).AddCors().AddSimApiUpload();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 使用所有SimApiApi自定义中间件
|
||||
/// 使用所有SimApi自定义中间件
|
||||
/// </summary>
|
||||
/// <param name="builder"></param>
|
||||
/// <param name="title"></param>
|
||||
/// <param name="staticFileroot"></param>
|
||||
/// <param name="submitMethods"></param>
|
||||
/// <returns></returns>
|
||||
public static IApplicationBuilder UseSimApiApi(this IApplicationBuilder builder, string title = "API文档", params SubmitMethod[] submitMethods)
|
||||
public static IApplicationBuilder UseSimApi(this IApplicationBuilder builder, string title = "API文档", params SubmitMethod[] submitMethods)
|
||||
{
|
||||
return builder.UseSimApiException().UseSimApiDoc(title, submitMethods).UseMiddleware<SimApiAuthMiddleware>().UseCors(x => x.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin()).UseSimApiUpload();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user