The same error was with Data.Swagger.Internal.Swagger itself, but it was resolved with
instance ToSchema Swagger where
declareNamedSchema _ = pure $ NamedSchema (Just "Swagger") mempty
when after deriving SwaggerUiHtml it requires instance ToSchema Value which end up with
Cannot derive Generic-based Swagger Schema for Value
Value is a mixed sum type (has both unit and non-unit constructors).
Swagger does not have a good representation for these types.
Use genericDeclareNamedSchemaUnrestricted if you want to derive schema
that matches aeson's Generic-based toJSON,
but that's not supported by some Swagger tools.
When trying to configure specs:
The same error was with Data.Swagger.Internal.Swagger itself, but it was resolved with
when after deriving SwaggerUiHtml it requires instance ToSchema Value which end up with