Does someone know the what mkSchemaDefinitions accomplishes and how it accomplishes it? Lars calls it boilerplate code, but now that I'm having an issue with it I have no idea how to fix it. I'll attach the error message along with my relevant code.
error:
• No instance for (Schema.ToSchema MintParams)
arising from a use of ‘Playground.Schema.endpointsToSchemas’
• In the expression:
Playground.Schema.endpointsToSchemas
@((.\/) (Endpoint "mint" MintParams) (Endpoint "sell" SellParams))
In an equation for ‘schemas’:
schemas
= Playground.Schema.endpointsToSchemas
@((.\/) (Endpoint "mint" MintParams) (Endpoint "sell" SellParams))
|
180 | mkSchemaDefinitions ''RoyaltySchema
type RoyaltySchema =
Endpoint "mint" MintParams
.\/ Endpoint "sell" SellParams
mkSchemaDefinitions ''RoyaltySchema
mkKnownCurrencies []
data MintParams = MintParams
{ name :: !TokenName
, addr :: !Address
} deriving (Generic, FromJSON, ToJSON, Show)