Skip to content

Commit 39fc32a

Browse files
committed
fix openapi models namespace
1 parent 1bd7644 commit 39fc32a

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

playground/Coalesce.Web.Vue3/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using IntelliTect.Coalesce;
55
using Microsoft.EntityFrameworkCore;
66
using Microsoft.Extensions.Logging.Console;
7-
using Microsoft.OpenApi;
87
using Microsoft.SemanticKernel;
98
using Scalar.AspNetCore;
109
using System.Reflection;
@@ -56,7 +55,7 @@
5655
services.AddSwaggerGen(c =>
5756
{
5857
c.AddCoalesce();
59-
c.SwaggerDoc("v1", new OpenApiInfo { Title = "My API", Version = "v1" });
58+
c.SwaggerDoc("v1", new() { Title = "My API", Version = "v1" });
6059
});
6160

6261
services.AddScoped<IWeatherService, WeatherService>();

src/IntelliTect.Coalesce/Api/OpenApi/CoalesceApiOperationFilter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ private void ProcessStandardParameters(OpenApiOperation operation, MethodViewMod
144144
{
145145
foreach (var filterProp in cvm.ClientProperties.Where(p => p.IsUrlFilterParameter))
146146
{
147-
operation.Parameters?.Add(new OpenApiParameter
147+
operation.Parameters ??= [];
148+
operation.Parameters.Add(new OpenApiParameter
148149
{
149150
In = ParameterLocation.Query,
150151
Name = $"filter.{filterProp.Name}",

templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/Program.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using Microsoft.EntityFrameworkCore;
77
using Microsoft.EntityFrameworkCore.Diagnostics;
88
#if OpenAPI
9-
using Microsoft.OpenApi.Models;
109
using Scalar.AspNetCore;
1110
#endif
1211
using System.Security.Claims;
@@ -90,7 +89,7 @@
9089
services.AddSwaggerGen(c =>
9190
{
9291
c.AddCoalesce();
93-
c.SwaggerDoc("current", new OpenApiInfo
92+
c.SwaggerDoc("current", new()
9493
{
9594
Title = "Current API",
9695
Version = "current",

0 commit comments

Comments
 (0)