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.
In the Swagger docs I have:
Optional<T>
doesn't work with query parametersHowever I think this doesn't just break Swagger as when I try to hit this endpoint, I get this error: