Skip to content

Commit

Permalink
Merge pull request #97 from ejball/null-body-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball authored Oct 3, 2024
2 parents edec406 + 668c1bc commit f8f41b5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project>

<PropertyGroup>
<VersionPrefix>2.29.2</VersionPrefix>
<PackageValidationBaselineVersion>2.29.1</PackageValidationBaselineVersion>
<VersionPrefix>2.29.3</VersionPrefix>
<PackageValidationBaselineVersion>2.29.2</PackageValidationBaselineVersion>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
2 changes: 1 addition & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release Notes

## 2.29.2
## 2.29.3

* Allow missing or empty HTTP content to be treated as an empty DTO for backward compatibility with method bodies that previously had no fields.

Expand Down
2 changes: 1 addition & 1 deletion src/Facility.CodeGen.CSharp/CSharpGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ private CodeGenFile GenerateHttpMapping(HttpServiceInfo httpServiceInfo, Context
foreach (var field in httpMethodInfo.RequestNormalFields)
{
var fieldName = context.GetFieldPropertyName(field.ServiceField);
code.WriteLine($"{fieldName} = (({requestTypeName}) body{NullableReferenceBang}).{fieldName},");
code.WriteLine($"{fieldName} = (({requestTypeName}?) body)?.{fieldName},");
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions src/Facility.ConformanceApi/Http/ConformanceApiHttpMapping.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tools/EdgeCases/Http/EdgeCasesHttpMapping.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f8f41b5

Please sign in to comment.