-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Labels
Description
Description
Primitive Types can be optional.
but string field can not be optional.
Repro steps
- Step A
provide following this in swagger yaml
number_value:
type: number
nullable: true
string_value:
type: string
nullable: true- Step B
read property by SwaggerProvider
type Provider = SwaggerProvider<schema, PreferAsync = true>
let client = Provider.Client()
let result = client.Operation() |> Asnyc.RunSynchronously
let numberValue = result.NumberValue // ==> the type is option float
let stringValue = result.StringValue // ==> the type is stringExpected behavior
nullable string field should be Option type.
Actual behavior
nullable string field is not Option type.
Known workarounds
- null checking
Related information
- Operating system
Windows 10 - NuGet Version
0.10.0-beta05 - .NET Framework 4.7.2
Reactions are currently unavailable