Skip to content

Commit

Permalink
Fix enum pointer failures in swagger schema
Browse files Browse the repository at this point in the history
  • Loading branch information
JustArchi committed Jan 2, 2024
1 parent d825f74 commit dd0949b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ArchiSteamFarm/IPC/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ public void ConfigureServices(IServiceCollection services) {

// We require custom schema IDs due to conflicting type names, choosing the proper one is tricky as there is no good answer and any kind of convention has a potential to create conflict
// FullName and Name both do, ToString() for unknown to me reason doesn't, and I don't have courage to call our WebUtilities.GetUnifiedName() better than what .NET ships with (because it isn't)
// Let's use ToString() until we find a good enough reason to change it
options.CustomSchemaIds(static type => type.ToString());
// Let's use ToString() until we find a good enough reason to change it, also, the name must pass ^[a-zA-Z0-9.-_]+$ regex
options.CustomSchemaIds(static type => type.ToString().Replace('+', '-'));

options.EnableAnnotations(true, true);

Expand Down

0 comments on commit dd0949b

Please sign in to comment.