on master help sign in
[SSO-130]: Add endpoint returning API description in OpenAPI 3 format (#5395)
commite5471ee09a2457d94d61f1240e7d2924fdcca715 authorUladzimir Stsepchanka <st.uladzimir@protonmail.com> dateWed 11 Nov 2020, 10:08 (6 years ago) parent5ac64be
2 files changed+3−1
id.cabal+1 src/Data/Id.hs+2−1
id.cabal+1
@@ -17,6 +17,7 @@ library
1717 hashable,
1818 lens,
1919 postgresql-simple,
20+ openapi3,
2021 uuid,
2122 yesod-core,
2223 hs-source-dirs:
src/Data/Id.hs+2−1
@@ -15,6 +15,7 @@ import Data.Coerce (coerce)
1515import Data.Hashable (Hashable)
1616import Data.UUID (UUID)
1717import qualified Data.UUID as UUID
18+import Data.OpenApi
1819import Database.PostgreSQL.Simple.FromField (FromField)
1920import Database.PostgreSQL.Simple.ToField (ToField)
2021import GHC.Generics (Generic)
@@ -25,7 +26,7 @@ import Yesod.Core (PathPiece(..))
2526newtype Id t = Id { unId :: UUID }
2627 deriving
2728 ( Eq, Ord, Generic, Read, Show, ToField, FromField, PathPiece, FromJSON
28− , ToJSON, NFData, Hashable, FromJSONKey, ToJSONKey)
29+ , ToJSON, NFData, Hashable, FromJSONKey, ToJSONKey, ToSchema)
2930
3031type role Id nominal
3132