-
Notifications
You must be signed in to change notification settings - Fork 122
[sessionauthentication] Code generation: update services and models #1711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,8 +111,7 @@ public override LegalEntityResource Read(ref Utf8JsonReader utf8JsonReader, Type | |
| break; | ||
| case "type": | ||
| string? typeRawValue = utf8JsonReader.GetString(); | ||
| if (typeRawValue != null) | ||
| type = new Option<ResourceType?>(ResourceTypeValueConverter.FromStringOrDefault(typeRawValue)); | ||
| type = new Option<ResourceType?>(ResourceType.FromStringOrDefault(typeRawValue) ?? (ResourceType)typeRawValue); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| break; | ||
| default: | ||
| break; | ||
|
|
@@ -158,7 +157,7 @@ public void WriteProperties(Utf8JsonWriter writer, LegalEntityResource legalEnti | |
| writer.WriteString("legalEntityId", legalEntityResource.LegalEntityId); | ||
|
|
||
| if (legalEntityResource.Type != null) | ||
| writer.WriteString("type", ResourceTypeValueConverter.ToJsonValue(legalEntityResource.Type)); | ||
| writer.WriteString("type", ResourceType.ToJsonValue(legalEntityResource.Type)); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -110,8 +110,7 @@ public override PaymentInstrumentResource Read(ref Utf8JsonReader utf8JsonReader | |
| break; | ||
| case "type": | ||
| string? typeRawValue = utf8JsonReader.GetString(); | ||
| if (typeRawValue != null) | ||
| type = new Option<ResourceType?>(ResourceTypeValueConverter.FromStringOrDefault(typeRawValue)); | ||
| type = new Option<ResourceType?>(ResourceType.FromStringOrDefault(typeRawValue) ?? (ResourceType)typeRawValue); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| break; | ||
| default: | ||
| break; | ||
|
|
@@ -157,7 +156,7 @@ public void WriteProperties(Utf8JsonWriter writer, PaymentInstrumentResource pay | |
| writer.WriteString("paymentInstrumentId", paymentInstrumentResource.PaymentInstrumentId); | ||
|
|
||
| if (paymentInstrumentResource.Type != null) | ||
| writer.WriteString("type", ResourceTypeValueConverter.ToJsonValue(paymentInstrumentResource.Type)); | ||
| writer.WriteString("type", ResourceType.ToJsonValue(paymentInstrumentResource.Type)); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,7 @@ public partial class Resource | |
| /// </summary> | ||
| public Resource() | ||
| { | ||
| Type = (ResourceType)Enum.Parse(typeof(ResourceType), this.GetType().Name); | ||
| Type = (ResourceType)this.GetType().Name; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The initialization of |
||
| OnCreated(); | ||
| } | ||
|
|
||
|
|
@@ -117,8 +117,7 @@ public override Resource Read(ref Utf8JsonReader utf8JsonReader, Type typeToConv | |
| { | ||
| case "type": | ||
| string? typeRawValue = utf8JsonReader.GetString(); | ||
| if (typeRawValue != null) | ||
| type = new Option<ResourceType?>(ResourceTypeValueConverter.FromStringOrDefault(typeRawValue)); | ||
| type = new Option<ResourceType?>(ResourceType.FromStringOrDefault(typeRawValue) ?? (ResourceType)typeRawValue); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| break; | ||
| default: | ||
| break; | ||
|
|
@@ -172,7 +171,7 @@ public void WriteProperties(Utf8JsonWriter writer, Resource resource, JsonSerial | |
| { | ||
|
|
||
| if (resource.Type != null) | ||
| writer.WriteString("type", ResourceTypeValueConverter.ToJsonValue(resource.Type)); | ||
| writer.WriteString("type", ResourceType.ToJsonValue(resource.Type)); | ||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable
typeis assigned here but never used within theReadmethod. This appears to be dead code.