mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
Fix type mismatch: use OpenApiTagReference and explicit HashSet initialization
Co-authored-by: collinbarrett <6483057+collinbarrett@users.noreply.github.com>
This commit is contained in:
parent
4dc8da0d64
commit
d97e8ddfab
2 changed files with 11 additions and 11 deletions
|
|
@ -17,7 +17,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces<List<GetLanguages.Response>>()
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { LanguagesTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(LanguagesTag) };
|
||||
operation.Summary = "Gets the languages targeted by the FilterLists.";
|
||||
operation.OperationId = nameof(GetLanguages);
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -30,7 +30,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces<List<GetLicenses.Response>>()
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { LicensesTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(LicensesTag) };
|
||||
operation.Summary = "Gets the licenses applied to the FilterLists.";
|
||||
operation.OperationId = nameof(GetLicenses);
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -43,7 +43,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces<List<GetLists.Response>>()
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { FilterListsTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(FilterListsTag) };
|
||||
operation.Summary = "Gets the FilterLists.";
|
||||
operation.OperationId = nameof(GetLists);
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -64,7 +64,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces(StatusCodes.Status404NotFound)
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { FilterListsTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(FilterListsTag) };
|
||||
operation.Summary = "Gets the details of the FilterList.";
|
||||
operation.OperationId = nameof(GetListDetails);
|
||||
operation.Parameters =
|
||||
|
|
@ -88,7 +88,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces<List<GetMaintainers.Response>>()
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { MaintainersTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(MaintainersTag) };
|
||||
operation.Summary = "Gets the maintainers of the FilterLists.";
|
||||
operation.OperationId = nameof(GetMaintainers);
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -101,7 +101,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces<List<GetSoftware.Response>>()
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { SoftwareTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(SoftwareTag) };
|
||||
operation.Summary = "Gets the software that subscribes to the FilterLists.";
|
||||
operation.OperationId = nameof(GetSoftware);
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -114,7 +114,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces<List<GetSyntaxes.Response>>()
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { SyntaxesTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(SyntaxesTag) };
|
||||
operation.Summary = "Gets the syntaxes of the FilterLists.";
|
||||
operation.OperationId = nameof(GetSyntaxes);
|
||||
return Task.CompletedTask;
|
||||
|
|
@ -127,7 +127,7 @@ internal static void MapEndpoints(this WebApplication app)
|
|||
.Produces<List<GetTags.Response>>()
|
||||
.AddOpenApiOperationTransformer((operation, context, ct) =>
|
||||
{
|
||||
operation.Tags = new HashSet<OpenApiTag> { TagsTag };
|
||||
operation.Tags = new HashSet<OpenApiTagReference> { new(TagsTag) };
|
||||
operation.Summary = "Gets the tags of the FilterLists.";
|
||||
operation.OperationId = nameof(GetTags);
|
||||
return Task.CompletedTask;
|
||||
|
|
|
|||
|
|
@ -89,8 +89,8 @@ internal sealed class TagDescriptionsDocumentFilter : IDocumentFilter
|
|||
{
|
||||
public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
|
||||
{
|
||||
swaggerDoc.Tags =
|
||||
[
|
||||
swaggerDoc.Tags = new HashSet<OpenApiTag>
|
||||
{
|
||||
LanguagesTag,
|
||||
LicensesTag,
|
||||
FilterListsTag,
|
||||
|
|
@ -98,7 +98,7 @@ public void Apply(OpenApiDocument swaggerDoc, DocumentFilterContext context)
|
|||
SoftwareTag,
|
||||
SyntaxesTag,
|
||||
TagsTag
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue