Skip to content

Commit

Permalink
Support float field type.
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball committed Jan 13, 2025
1 parent b5d1666 commit 18ddb60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Facility.CodeGen.Console" Version="2.15.0" />
<PackageVersion Include="Facility.Definition" Version="2.15.0" />
<PackageVersion Include="Facility.CodeGen.Console" Version="2.16.0" />
<PackageVersion Include="Facility.Definition" Version="2.16.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
2 changes: 2 additions & 0 deletions src/Facility.Definition.Swagger/SwaggerGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ private static T GetTypeSchema<T>(ServiceTypeInfo type)
return new T { Type = SwaggerSchemaType.String };
case ServiceTypeKind.Boolean:
return new T { Type = SwaggerSchemaType.Boolean };
case ServiceTypeKind.Float:
return new T { Type = SwaggerSchemaType.Number, Format = SwaggerSchemaTypeFormat.Float };
case ServiceTypeKind.Double:
return new T { Type = SwaggerSchemaType.Number, Format = SwaggerSchemaTypeFormat.Double };
case ServiceTypeKind.Int32:
Expand Down

0 comments on commit 18ddb60

Please sign in to comment.