user5801: 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)


user5801: I was able to fix this issue by adding ToSchema to the deriving statement

5801: <p>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.</p>
<pre><code> error:
    • No instance for (Schema.ToSchema MintParams)
        arising from a use of ‘Playground.Schema.endpointsToSchemas’
    • In the expression:
        Playground.Schema.endpointsToSchemas
          @((.\/) (Endpoint &quot;mint&quot; MintParams) (Endpoint &quot;sell&quot; SellParams))
      In an equation for ‘schemas’:
          schemas
            = Playground.Schema.endpointsToSchemas
                @((.\/) (Endpoint &quot;mint&quot; MintParams) (Endpoint &quot;sell&quot; SellParams))
    |
180 | mkSchemaDefinitions ''RoyaltySchema
</code></pre>
<pre><code>type RoyaltySchema =
            Endpoint &quot;mint&quot; MintParams
        .\/ Endpoint &quot;sell&quot; SellParams
</code></pre>
<pre><code>mkSchemaDefinitions ''RoyaltySchema
mkKnownCurrencies []
</code></pre>
<pre><code>data MintParams = MintParams
    { name :: !TokenName
    , addr :: !Address
    } deriving (Generic, FromJSON, ToJSON, Show)
</code></pre>
 5801: <p>I was able to fix this issue by adding <code>ToSchema</code> to the deriving statement</p>
