If I have

data Thing1 = I Integer | S String

how do I instantiate ToSchema for it? Note that deriving doesn't work.

And how about for

data Thing2 = I Integer | S 

It's not possible to use Sum types with Swagger, see relevant plutus issue, you need to wait for the following PR adding OpenAPI3 support https://github.com/input-output-hk/plutus/pull/3807

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .