diff options
author | stuebinm | 2022-09-11 00:50:43 +0200 |
---|---|---|
committer | stuebinm | 2022-09-11 00:50:43 +0200 |
commit | 30324fc535b73e18f576bb12fe3a421d404c19ff (patch) | |
tree | 9ee3edbc414d8a4ca03f38d04473b8f53e13613f /lib/Persist.hs | |
parent | 76303ad71e0d7e63cf34a68a81548cb791798f97 (diff) |
correct the generated openapi description
Diffstat (limited to 'lib/Persist.hs')
-rw-r--r-- | lib/Persist.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Persist.hs b/lib/Persist.hs index aa040cf..769db2a 100644 --- a/lib/Persist.hs +++ b/lib/Persist.hs @@ -87,7 +87,7 @@ TrainPing json sql=tt_trip_ping lat Double long Double timestamp UTCTime - deriving Show Generic Eq ToSchema + deriving Show Generic Eq -- status of a train somewhen in time (may be in the future), -- inferred from trainpings / entered via controlRoom @@ -123,6 +123,8 @@ ScheduleAmendment json sql=tt_schedule_amendement instance ToSchema RunningId where declareNamedSchema _ = declareNamedSchema (Proxy @UUID) +instance ToSchema TrainPing where + declareNamedSchema = genericDeclareNamedSchema (swaggerOptions "trainPing") runSql :: MonadIO m => Pool SqlBackend -> ReaderT SqlBackend (NoLoggingT (ResourceT IO)) a -> m a runSql pool = liftIO . flip runSqlPersistMPool pool |