-
Notifications
You must be signed in to change notification settings - Fork 221
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
Bugfix/odata error python #1990
Conversation
Kudos, SonarCloud Quality Gate passed! |
@@ -289,7 +289,7 @@ private static void WriteQueryParametersMapper(CodeMethod codeElement, CodeClass | |||
writer.WriteLine($"{errorMappingVarName}: Dict[str, ParsableFactory] = {{"); | |||
writer.IncreaseIndent(); | |||
foreach(var errorMapping in codeElement.ErrorMappings) { | |||
writer.WriteLine($"\"{errorMapping.Key.ToUpperInvariant()}\": o_data_error.{errorMapping.Value.Name}.get_from_discriminator_value(),"); | |||
writer.WriteLine($"\"{errorMapping.Key.ToUpperInvariant()}\": o_data_error.{errorMapping.Value.Name},"); |
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.
Commenting a bit late here but I'm worried that this hardcoded namespace name will throw out of balance generation for clients that are not for odata based APIs?
Assert.Contains("\"4XX\": o_data_error.Error4XX.get_from_discriminator_value()", result); | ||
Assert.Contains("\"5XX\": o_data_error.Error5XX.get_from_discriminator_value()", result); | ||
Assert.Contains("\"403\": o_data_error.Error403.get_from_discriminator_value()", result); | ||
Assert.Contains("\"4XX\": o_data_error.Error4XX", result); |
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.
Hardcoded namespace name
ODataError
class due to wrong inherited class.errorMapping
dictionary