Skip to content

Commit

Permalink
updated openapi generator
Browse files Browse the repository at this point in the history
  • Loading branch information
devhl-labs committed Sep 2, 2023
1 parent 376cb3e commit f110f20
Show file tree
Hide file tree
Showing 14 changed files with 87 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0-SNAPSHOT
7.0.1-SNAPSHOT
2 changes: 1 addition & 1 deletion src/CocApi.Rest/Extensions/IHttpClientBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client
}

/// <summary>
/// Adds a Polly circiut breaker to your clients.
/// Adds a Polly circuit breaker to your clients.
/// </summary>
/// <param name="client"></param>
/// <param name="handledEventsAllowedBeforeBreaking"></param>
Expand Down
12 changes: 6 additions & 6 deletions src/CocApi.Rest/Models/ClanCapitalRaidSeason.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ public enum StateEnum
/// <exception cref="NotImplementedException"></exception>
public static StateEnum StateEnumFromString(string value)
{
if (value == "unknown")
if (value.Equals("unknown"))
return StateEnum.Unknown;

if (value == "ongoing")
if (value.Equals("ongoing"))
return StateEnum.Ongoing;

if (value == "ended")
if (value.Equals("ended"))
return StateEnum.Ended;

throw new NotImplementedException($"Could not convert value to type StateEnum: '{value}'");
Expand All @@ -111,13 +111,13 @@ public static StateEnum StateEnumFromString(string value)
/// <returns></returns>
public static StateEnum? StateEnumFromStringOrDefault(string value)
{
if (value == "unknown")
if (value.Equals("unknown"))
return StateEnum.Unknown;

if (value == "ongoing")
if (value.Equals("ongoing"))
return StateEnum.Ongoing;

if (value == "ended")
if (value.Equals("ended"))
return StateEnum.Ended;

return null;
Expand Down
12 changes: 6 additions & 6 deletions src/CocApi.Rest/Models/GroupState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public static class GroupStateValueConverter
/// <returns></returns>
public static GroupState FromString(string value)
{
if (value == "preparation")
if (value.Equals("preparation"))
return GroupState.Preparation;

if (value == "inWar")
if (value.Equals("inWar"))
return GroupState.InWar;

if (value == "ended")
if (value.Equals("ended"))
return GroupState.Ended;

throw new NotImplementedException($"Could not convert value to type GroupState: '{value}'");
Expand All @@ -75,13 +75,13 @@ public static GroupState FromString(string value)
/// <returns></returns>
public static GroupState? FromStringOrDefault(string value)
{
if (value == "preparation")
if (value.Equals("preparation"))
return GroupState.Preparation;

if (value == "inWar")
if (value.Equals("inWar"))
return GroupState.InWar;

if (value == "ended")
if (value.Equals("ended"))
return GroupState.Ended;

return null;
Expand Down
24 changes: 12 additions & 12 deletions src/CocApi.Rest/Models/PlayerHouseElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ public enum TypeEnum
/// <exception cref="NotImplementedException"></exception>
public static TypeEnum TypeEnumFromString(string value)
{
if (value == "unknown")
if (value.Equals("unknown"))
return TypeEnum.Unknown;

if (value == "ground")
if (value.Equals("ground"))
return TypeEnum.Ground;

if (value == "roof")
if (value.Equals("roof"))
return TypeEnum.Roof;

if (value == "foot")
if (value.Equals("foot"))
return TypeEnum.Foot;

if (value == "decoration")
if (value.Equals("decoration"))
return TypeEnum.Decoration;

if (value == "walls")
if (value.Equals("walls"))
return TypeEnum.Walls;

throw new NotImplementedException($"Could not convert value to type TypeEnum: '{value}'");
Expand All @@ -115,22 +115,22 @@ public static TypeEnum TypeEnumFromString(string value)
/// <returns></returns>
public static TypeEnum? TypeEnumFromStringOrDefault(string value)
{
if (value == "unknown")
if (value.Equals("unknown"))
return TypeEnum.Unknown;

if (value == "ground")
if (value.Equals("ground"))
return TypeEnum.Ground;

if (value == "roof")
if (value.Equals("roof"))
return TypeEnum.Roof;

if (value == "foot")
if (value.Equals("foot"))
return TypeEnum.Foot;

if (value == "decoration")
if (value.Equals("decoration"))
return TypeEnum.Decoration;

if (value == "walls")
if (value.Equals("walls"))
return TypeEnum.Walls;

return null;
Expand Down
12 changes: 6 additions & 6 deletions src/CocApi.Rest/Models/RecruitingType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public static class RecruitingTypeValueConverter
/// <returns></returns>
public static RecruitingType FromString(string value)
{
if (value == "inviteOnly")
if (value.Equals("inviteOnly"))
return RecruitingType.InviteOnly;

if (value == "closed")
if (value.Equals("closed"))
return RecruitingType.Closed;

if (value == "open")
if (value.Equals("open"))
return RecruitingType.Open;

throw new NotImplementedException($"Could not convert value to type RecruitingType: '{value}'");
Expand All @@ -75,13 +75,13 @@ public static RecruitingType FromString(string value)
/// <returns></returns>
public static RecruitingType? FromStringOrDefault(string value)
{
if (value == "inviteOnly")
if (value.Equals("inviteOnly"))
return RecruitingType.InviteOnly;

if (value == "closed")
if (value.Equals("closed"))
return RecruitingType.Closed;

if (value == "open")
if (value.Equals("open"))
return RecruitingType.Open;

return null;
Expand Down
12 changes: 6 additions & 6 deletions src/CocApi.Rest/Models/Result.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public static class ResultValueConverter
/// <returns></returns>
public static Result FromString(string value)
{
if (value == "lose")
if (value.Equals("lose"))
return Result.Lose;

if (value == "tie")
if (value.Equals("tie"))
return Result.Tie;

if (value == "win")
if (value.Equals("win"))
return Result.Win;

throw new NotImplementedException($"Could not convert value to type Result: '{value}'");
Expand All @@ -75,13 +75,13 @@ public static Result FromString(string value)
/// <returns></returns>
public static Result? FromStringOrDefault(string value)
{
if (value == "lose")
if (value.Equals("lose"))
return Result.Lose;

if (value == "tie")
if (value.Equals("tie"))
return Result.Tie;

if (value == "win")
if (value.Equals("win"))
return Result.Win;

return null;
Expand Down
16 changes: 8 additions & 8 deletions src/CocApi.Rest/Models/Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,16 @@ public static class RoleValueConverter
/// <returns></returns>
public static Role FromString(string value)
{
if (value == "member")
if (value.Equals("member"))
return Role.Member;

if (value == "admin")
if (value.Equals("admin"))
return Role.Elder;

if (value == "coLeader")
if (value.Equals("coLeader"))
return Role.CoLeader;

if (value == "leader")
if (value.Equals("leader"))
return Role.Leader;

throw new NotImplementedException($"Could not convert value to type Role: '{value}'");
Expand All @@ -83,16 +83,16 @@ public static Role FromString(string value)
/// <returns></returns>
public static Role? FromStringOrDefault(string value)
{
if (value == "member")
if (value.Equals("member"))
return Role.Member;

if (value == "admin")
if (value.Equals("admin"))
return Role.Elder;

if (value == "coLeader")
if (value.Equals("coLeader"))
return Role.CoLeader;

if (value == "leader")
if (value.Equals("leader"))
return Role.Leader;

return null;
Expand Down
12 changes: 6 additions & 6 deletions src/CocApi.Rest/Models/VillageType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public static class VillageTypeValueConverter
/// <returns></returns>
public static VillageType FromString(string value)
{
if (value == "home")
if (value.Equals("home"))
return VillageType.Home;

if (value == "builderBase")
if (value.Equals("builderBase"))
return VillageType.BuilderBase;

if (value == "clanCapital")
if (value.Equals("clanCapital"))
return VillageType.ClanCapital;

throw new NotImplementedException($"Could not convert value to type VillageType: '{value}'");
Expand All @@ -75,13 +75,13 @@ public static VillageType FromString(string value)
/// <returns></returns>
public static VillageType? FromStringOrDefault(string value)
{
if (value == "home")
if (value.Equals("home"))
return VillageType.Home;

if (value == "builderBase")
if (value.Equals("builderBase"))
return VillageType.BuilderBase;

if (value == "clanCapital")
if (value.Equals("clanCapital"))
return VillageType.ClanCapital;

return null;
Expand Down
28 changes: 14 additions & 14 deletions src/CocApi.Rest/Models/WarFrequency.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,25 +76,25 @@ public static class WarFrequencyValueConverter
/// <returns></returns>
public static WarFrequency FromString(string value)
{
if (value == "unknown")
if (value.Equals("unknown"))
return WarFrequency.Unknown;

if (value == "never")
if (value.Equals("never"))
return WarFrequency.Never;

if (value == "lessThanOncePerWeek")
if (value.Equals("lessThanOncePerWeek"))
return WarFrequency.LessThanOncePerWeek;

if (value == "oncePerWeek")
if (value.Equals("oncePerWeek"))
return WarFrequency.OncePerWeek;

if (value == "moreThanOncePerWeek")
if (value.Equals("moreThanOncePerWeek"))
return WarFrequency.MoreThanOncePerWeek;

if (value == "always")
if (value.Equals("always"))
return WarFrequency.Always;

if (value == "any")
if (value.Equals("any"))
return WarFrequency.Any;

throw new NotImplementedException($"Could not convert value to type WarFrequency: '{value}'");
Expand All @@ -107,25 +107,25 @@ public static WarFrequency FromString(string value)
/// <returns></returns>
public static WarFrequency? FromStringOrDefault(string value)
{
if (value == "unknown")
if (value.Equals("unknown"))
return WarFrequency.Unknown;

if (value == "never")
if (value.Equals("never"))
return WarFrequency.Never;

if (value == "lessThanOncePerWeek")
if (value.Equals("lessThanOncePerWeek"))
return WarFrequency.LessThanOncePerWeek;

if (value == "oncePerWeek")
if (value.Equals("oncePerWeek"))
return WarFrequency.OncePerWeek;

if (value == "moreThanOncePerWeek")
if (value.Equals("moreThanOncePerWeek"))
return WarFrequency.MoreThanOncePerWeek;

if (value == "always")
if (value.Equals("always"))
return WarFrequency.Always;

if (value == "any")
if (value.Equals("any"))
return WarFrequency.Any;

return null;
Expand Down
8 changes: 4 additions & 4 deletions src/CocApi.Rest/Models/WarPreference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ public static class WarPreferenceValueConverter
/// <returns></returns>
public static WarPreference FromString(string value)
{
if (value == "out")
if (value.Equals("out"))
return WarPreference.Out;

if (value == "in")
if (value.Equals("in"))
return WarPreference.In;

throw new NotImplementedException($"Could not convert value to type WarPreference: '{value}'");
Expand All @@ -67,10 +67,10 @@ public static WarPreference FromString(string value)
/// <returns></returns>
public static WarPreference? FromStringOrDefault(string value)
{
if (value == "out")
if (value.Equals("out"))
return WarPreference.Out;

if (value == "in")
if (value.Equals("in"))
return WarPreference.In;

return null;
Expand Down
Loading

0 comments on commit f110f20

Please sign in to comment.