mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Misc
This commit is contained in:
@@ -74,7 +74,7 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
|
|
||||||
// Use friendly swagger UI
|
// Use friendly swagger UI
|
||||||
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/ASF/swagger.json", "ASF API"));
|
app.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/" + SharedInfo.ASF + "/swagger.json", SharedInfo.ASF + " API"));
|
||||||
|
|
||||||
// We're using index for URL routing in our static files so re-execute all non-API calls on /
|
// We're using index for URL routing in our static files so re-execute all non-API calls on /
|
||||||
app.UseWhen(context => !context.Request.Path.StartsWithSegments("/Api", StringComparison.OrdinalIgnoreCase), appBuilder => appBuilder.UseStatusCodePagesWithReExecute("/"));
|
app.UseWhen(context => !context.Request.Path.StartsWithSegments("/Api", StringComparison.OrdinalIgnoreCase), appBuilder => appBuilder.UseStatusCodePagesWithReExecute("/"));
|
||||||
@@ -114,7 +114,10 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
new OpenApiSecurityRequirement {
|
new OpenApiSecurityRequirement {
|
||||||
{
|
{
|
||||||
new OpenApiSecurityScheme {
|
new OpenApiSecurityScheme {
|
||||||
Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = nameof(GlobalConfig.IPCPassword) }
|
Reference = new OpenApiReference {
|
||||||
|
Id = nameof(GlobalConfig.IPCPassword),
|
||||||
|
Type = ReferenceType.SecurityScheme
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
new string[0]
|
new string[0]
|
||||||
@@ -125,7 +128,7 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
c.DescribeAllEnumsAsStrings();
|
c.DescribeAllEnumsAsStrings();
|
||||||
c.EnableAnnotations();
|
c.EnableAnnotations();
|
||||||
c.SwaggerDoc(
|
c.SwaggerDoc(
|
||||||
"ASF", new OpenApiInfo {
|
SharedInfo.ASF, new OpenApiInfo {
|
||||||
Contact = new OpenApiContact {
|
Contact = new OpenApiContact {
|
||||||
Name = SharedInfo.GithubRepo,
|
Name = SharedInfo.GithubRepo,
|
||||||
Url = new Uri(SharedInfo.ProjectURL)
|
Url = new Uri(SharedInfo.ProjectURL)
|
||||||
@@ -136,7 +139,7 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
Url = new Uri(SharedInfo.LicenseURL)
|
Url = new Uri(SharedInfo.LicenseURL)
|
||||||
},
|
},
|
||||||
|
|
||||||
Title = "ASF API"
|
Title = SharedInfo.ASF + " API"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user