Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Swagger fix - the same schemaId is already used

support232e895da669
diff --git a/src/API/Grand.Api/Infrastructure/SwaggerStartup.cs b/src/API/Grand.Api/Infrastructure/SwaggerStartup.cs
index bd1c4ccff..b6c6e74c5 100644
--- a/src/API/Grand.Api/Infrastructure/SwaggerStartup.cs
+++ b/src/API/Grand.Api/Infrastructure/SwaggerStartup.cs
@@ -53,7 +53,7 @@ namespace Grand.Api.Infrastructure
Contact = GetOpenApiContact(),
License = GetOpenApiLicense()
});
-
+ c.CustomSchemaIds(s => s.FullName?.Replace("+", "."));
c.AddSecurityDefinition(JwtBearerDefaults.AuthenticationScheme, //Name the security scheme
new OpenApiSecurityScheme
{