Commit 62a89a42 authored by Nicolas Pouillard's avatar Nicolas Pouillard

Improve ToSchema instances

parent 1be75825
......@@ -18,7 +18,6 @@ import Data.Text (Text)
import Data.Swagger hiding (URL, url, port)
import GHC.Generics hiding (to)
import Servant.Job.Async
import Servant.Job.Client
import Servant.Job.Types
import Servant.Job.Utils (jsonOptions)
import Test.QuickCheck (elements)
......@@ -31,24 +30,6 @@ instance Arbitrary a => Arbitrary (JobStatus 'Safe a) where
instance Arbitrary a => Arbitrary (JobOutput a) where
arbitrary = JobOutput <$> arbitrary
instance ToSchema URL where
declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy TODO)
instance ToSchema AnyOutput where
declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy TODO)
instance ToSchema AnyInput where
declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy TODO)
instance ToSchema AnyEvent where
declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy TODO)
instance (ToSchema (f URL), ToSchema a) => ToSchema (JobInput f a)
instance ToSchema a => ToSchema (JobOutput a)
instance ToSchema (NoCallbacks a)
-- | Main Types
data ExternalAPIs = All
| PubMed
......@@ -78,6 +59,9 @@ instance Arbitrary ExternalAPIs
instance ToSchema ExternalAPIs
instance ToSchema URL where
declareNamedSchema _ = declareNamedSchema (Proxy :: Proxy TODO)
data ScraperInput = ScraperInput
{ _scin_spider :: !Text
, _scin_query :: !(Maybe Text)
......
......@@ -37,7 +37,7 @@ extra-deps:
commit: 746b4ce0af8f9e600d555ad7e5b2973a940cdad9
#- git: https://github.com/delanoe/servant-job.git
- git: https://github.com/np/servant-job.git
commit: 471f4952d2aa72bd373f850255a662442ad58c94
commit: 8557bfc9472a1b2be0b7bc632c23701ba5f44bf8
- git: https://gitlab.iscpif.fr/gargantext/clustering-louvain.git
commit: 1c636112b151110408e7c5a28cec39e46657358e
- git: https://github.com/np/patches-map
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment