Commit 0771f383 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Restore swagger.json

parent 45eff945
......@@ -14,9 +14,10 @@ Portability : POSIX
module Gargantext.Core.Viz.Graph.Types
where
import Data.Aeson (defaultOptions)
import Data.HashSet (HashSet)
import Data.HashSet qualified as HashSet
import Data.Swagger (ToSchema(..), genericDeclareNamedSchema)
import Data.Swagger (ToSchema(..), genericDeclareNamedSchema, defaultSchemaOptions)
import Data.Text (pack)
import Database.PostgreSQL.Simple.FromField (FromField(..))
import Gargantext.API.Ngrams.Types (NgramsTerm)
......@@ -245,9 +246,9 @@ instance FromField HyperdataGraphAPI
data GraphLegendAPI = GraphLegendAPI [LegendField]
deriving (Show, Generic)
$(deriveJSON (unPrefix "_graphAPI") ''GraphLegendAPI)
$(deriveJSON defaultOptions ''GraphLegendAPI)
instance ToSchema GraphLegendAPI where
declareNamedSchema = genericDeclareNamedSchema (unPrefixSwagger "_graphAPI")
declareNamedSchema = genericDeclareNamedSchema defaultSchemaOptions
makeLenses ''GraphLegendAPI
......
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