When [this](https://github.com/haskell-servant/servant/pull/1805) is merged, I have the code ready to have the `ToSchema` and `ToParamSchema` instances derived for free based on this code: ```haskell instance (KnownNat min, KnownNat max) => ToSchema (BoundedNat min max) where declareNamedSchema _ = pure . NamedSchema Nothing $ mempty & #type ?~ OpenApiInteger & #minimum ?~ fromIntegral (minBound @(BoundedNat min max)).unBoundedNat & #maximum ?~ fromIntegral (maxBound @(BoundedNat min max)).unBoundedNat instance (KnownNat min, KnownNat max) => ToParamSchema (BoundedNat min max) where toParamSchema = toSchema ```