harvzor / harvzor-optional

A type wrapper that lets you know if that object value has been explicitly defined
MIT License
0 stars 0 forks source link

Optional<string> doesn't work with query params? #8

Open harvzor opened 8 months ago

harvzor commented 8 months ago

In the Swagger docs I have:

However I think this doesn't just break Swagger as when I try to hit this endpoint, I get this error:

InvalidOperationException: Could not create an instance of type 'Harvzor.Optional.Optional`1[[System.String, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]'. Model bound complex types must not be abstract or value types and must have a parameterless constructor. Record types must have a single primary constructor. Alternatively, give the 'foo' parameter a non-null default value.