Skip to content

Commit 0dff838

Browse files
author
Joel W Kall
committed
added cases in OpenApiWriterBase.WriteValue for long, float and double
1 parent f3fa054 commit 0dff838

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,22 @@ public virtual void WriteValue(object value)
194194
{
195195
WriteValue((int)value);
196196
}
197+
else if (type == typeof(long) || type == typeof(long?))
198+
{
199+
WriteValue((long)value);
200+
}
197201
else if (type == typeof(bool) || type == typeof(bool?))
198202
{
199203
WriteValue((bool)value);
200204
}
205+
else if (type == typeof(float) || type == typeof(float?))
206+
{
207+
WriteValue((float)value);
208+
}
209+
else if (type == typeof(double) || type == typeof(double?))
210+
{
211+
WriteValue((double)value);
212+
}
201213
else if (type == typeof(decimal) || type == typeof(decimal?))
202214
{
203215
WriteValue((decimal)value);

0 commit comments

Comments
 (0)