Skip to content

Commit

Permalink
Remove RequiredNotNullableSchemaFilter.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTedder committed Jul 18, 2024
1 parent 990a3a1 commit 8379d2a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 54 deletions.
4 changes: 2 additions & 2 deletions LeaderboardBackend/Models/Requests/LeaderboardRequests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ public record CreateLeaderboardRequest
/// The display name of the `Leaderboard` to create.
/// </summary>
/// <example>Foo Bar</example>
public string Name { get; set; } = null!;
public required string Name { get; set; } = null!;

/// <summary>
/// The URL-scoped unique identifier of the `Leaderboard`.<br/>
/// Must be [2, 80] in length and consist only of alphanumeric characters and hyphens.
/// </summary>
/// <example>foo-bar</example>
public string Slug { get; set; } = null!;
public required string Slug { get; set; } = null!;
}
2 changes: 0 additions & 2 deletions LeaderboardBackend/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using LeaderboardBackend.Authorization;
using LeaderboardBackend.Models.Entities;
using LeaderboardBackend.Services;
using LeaderboardBackend.Swagger;
using MailKit.Net.Smtp;
using MicroElements.Swashbuckle.NodaTime;
using Microsoft.AspNetCore.Authentication.JwtBearer;
Expand Down Expand Up @@ -195,7 +194,6 @@
);

c.SupportNonNullableReferenceTypes();
c.SchemaFilter<RequiredNotNullableSchemaFilter>();
c.MapType<Guid>(() => new OpenApiSchema { Type = "string", Pattern = "^[a-zA-Z0-9-_]{22}$" });
c.ConfigureForNodaTimeWithSystemTextJson(jsonSerializerOptions);
});
Expand Down
50 changes: 0 additions & 50 deletions LeaderboardBackend/Swagger/RequiredNotNullableSchemaFilter.cs

This file was deleted.

0 comments on commit 8379d2a

Please sign in to comment.