2

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 
0

1 Answer 1

2

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.