Merge branch 'dev' into feature/faq

This commit is contained in:
on.nemtina 2023-04-27 12:30:47 +05:00
commit f1ae86dadf

View File

@ -1,4 +1,5 @@
using AsbCloudInfrastructure.Services;
using AsbCloudApp.Data.GTR;
using AsbCloudInfrastructure.Services;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
@ -18,6 +19,15 @@ namespace AsbCloudWebApi
services.AddSwaggerGen(c =>
{
c.MapType<DateOnly>(() => new OpenApiSchema { Type = "string", Format = "date" });
c.MapType<JsonValue>(() => new OpenApiSchema {
AnyOf = new OpenApiSchema[]
{
new OpenApiSchema {Type = "string", Format = "string" },
new OpenApiSchema {Type = "number", Format = "int32" },
new OpenApiSchema {Type = "number", Format = "float" },
}
});
c.CustomOperationIds(e =>
{
return $"{e.ActionDescriptor.RouteValues["action"]}";