Commit 75fa6dfa authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX BUG] Swagger bug on backend to fix: types homonymes

parent 4ab11d75
...@@ -9,7 +9,7 @@ import Gargantext.Prelude (class Eq, class Read, class Show) ...@@ -9,7 +9,7 @@ import Gargantext.Prelude (class Eq, class Read, class Show)
data UpdateNodeParams = UpdateNodeParamsList { methodList :: Method } data UpdateNodeParams = UpdateNodeParamsList { methodList :: Method }
| UpdateNodeParamsGraph { methodGraph :: Metric } | UpdateNodeParamsGraph { methodGraph :: GraphMetric }
| UpdateNodeParamsTexts { methodTexts :: Granularity } | UpdateNodeParamsTexts { methodTexts :: Granularity }
| UpdateNodeParamsBoard { methodBoard :: Charts } | UpdateNodeParamsBoard { methodBoard :: Charts }
...@@ -49,24 +49,24 @@ instance encodeJsonMethod :: Argonaut.EncodeJson Method where ...@@ -49,24 +49,24 @@ instance encodeJsonMethod :: Argonaut.EncodeJson Method where
encodeJson = genericEnumEncodeJson encodeJson = genericEnumEncodeJson
---------------------------------------------------------------------- ----------------------------------------------------------------------
data Metric = Order1 | Order2 data GraphMetric = Order1 | Order2
derive instance genericMetric :: Generic Metric _ derive instance genericGraphMetric :: Generic GraphMetric _
derive instance eqMetric :: Eq Metric derive instance eqGraphMetric :: Eq GraphMetric
instance showMetric :: Show Metric where instance showGraphMetric :: Show GraphMetric where
show = genericShow show = genericShow
instance readMetric :: Read Metric where instance readGraphMetric :: Read GraphMetric where
read "Order1" = Just Order1 read "Order1" = Just Order1
read "Order2" = Just Order2 read "Order2" = Just Order2
read _ = Nothing read _ = Nothing
instance decodeJsonMetric :: Argonaut.DecodeJson Metric where instance decodeJsonGraphMetric :: Argonaut.DecodeJson GraphMetric where
decodeJson = genericEnumDecodeJson decodeJson = genericEnumDecodeJson
instance encodeJsonMetric :: Argonaut.EncodeJson Metric where instance encodeJsonGraphMetric :: Argonaut.EncodeJson GraphMetric where
encodeJson = genericEnumEncodeJson encodeJson = genericEnumEncodeJson
---------------------------------------------------------------------- ----------------------------------------------------------------------
......
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