on master help sign in
[SSO-130]: Add endpoint returning API description in OpenAPI 3 format (#5395)
e5471eeUladzimir Stsepchanka
@@ -17,6 +17,7 @@ library
17 hashable,
17 hashable,
18 lens,
18 lens,
19 postgresql-simple,
19 postgresql-simple,
20+ openapi3,
20 uuid,
21 uuid,
21 yesod-core,
22 yesod-core,
22 hs-source-dirs:
23 hs-source-dirs:
src/Data/Id.hs+2−1
@@ -15,6 +15,7 @@ import Data.Coerce (coerce)
15import Data.Hashable (Hashable)
15import Data.Hashable (Hashable)
16import Data.UUID (UUID)
16import Data.UUID (UUID)
17import qualified Data.UUID as UUID
17import qualified Data.UUID as UUID
18+import Data.OpenApi
18import Database.PostgreSQL.Simple.FromField (FromField)
19import Database.PostgreSQL.Simple.FromField (FromField)
19import Database.PostgreSQL.Simple.ToField (ToField)
20import Database.PostgreSQL.Simple.ToField (ToField)
20import GHC.Generics (Generic)
21import GHC.Generics (Generic)
@@ -25,7 +26,7 @@ import Yesod.Core (PathPiece(..))
25newtype Id t = Id { unId :: UUID }
26newtype Id t = Id { unId :: UUID }
26 deriving
27 deriving
27 ( Eq, Ord, Generic, Read, Show, ToField, FromField, PathPiece, FromJSON
28 ( Eq, Ord, Generic, Read, Show, ToField, FromField, PathPiece, FromJSON
28− , ToJSON, NFData, Hashable, FromJSONKey, ToJSONKey)
29+ , ToJSON, NFData, Hashable, FromJSONKey, ToJSONKey, ToSchema)
29
30
30type role Id nominal
31type role Id nominal
31
32