Browse Source

fix openapi client generation again (#2379)

pull/2380/head
Jason Dove 4 months ago committed by GitHub
parent
commit
a6de96c2ea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      ErsatzTV/Startup.cs

10
ErsatzTV/Startup.cs

@ -89,6 +89,7 @@ using Microsoft.Extensions.Primitives; @@ -89,6 +89,7 @@ using Microsoft.Extensions.Primitives;
using Microsoft.IdentityModel.Protocols.OpenIdConnect;
using Microsoft.IdentityModel.Tokens;
using Microsoft.IO;
using Microsoft.OpenApi.Models;
using MudBlazor.Services;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
@ -156,10 +157,17 @@ public class Startup @@ -156,10 +157,17 @@ public class Startup
options =>
{
options.ShouldInclude += a => a.GroupName == "scripted-schedule";
var tag = new OpenApiTag { Name = "ScriptedSchedule" };
options.AddOperationTransformer((operation, _, _) =>
{
// remove tags so openapi generator only generates a single api
operation.Tags.Clear();
operation.Tags.Add(tag);
return Task.CompletedTask;
});
options.AddDocumentTransformer((document, _, _) =>
{
document.Tags.Clear();
document.Tags.Add(tag);
return Task.CompletedTask;
});
});

Loading…
Cancel
Save