fsprojects / FSharp.Configuration

The FSharp.Configuration project contains type providers for the configuration of .NET projects.
http://fsprojects.github.io/FSharp.Configuration/
Other
114 stars 63 forks source link

List cannot contain elements of heterogeneous types (attempt to mix types: []) #121

Open Lenne231 opened 7 years ago

Lenne231 commented 7 years ago

FSharp.Configuration 1.1.0

I'm getting this error when using the YAML file from http://editor.swagger.io/#/.

It seems to have a problem with

      - api_key: []

is this a bug or does it works as intended?

Lenne231 commented 7 years ago

FSharp.Data.JsonProvider seems to handle this by returning FSharp.Data.Runtime.BaseTypes.IJsonDocument[].

vasily-kirichenko commented 7 years ago

We could return obj [], but it's unlikely the type you want. Can you add a single fake element from which we could infer the type?