Skip to content
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

Support float field type. #14

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support float field type.
  • Loading branch information
ejball committed Jan 13, 2025
commit 18ddb60682f58b24a45c7d2e18630fedf7d5ccab
4 changes: 2 additions & 2 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -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" />
2 changes: 2 additions & 0 deletions src/Facility.Definition.Swagger/SwaggerGenerator.cs
Original file line number Diff line number Diff line change
@@ -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: