Skip to content

Commit

Permalink
Fix CollectionFormat Param to Collection ParamOtherSchema
Browse files Browse the repository at this point in the history
  • Loading branch information
fizruk committed Dec 30, 2015
1 parent 5f050d6 commit 5c2088f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Data/Swagger/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ data CollectionFormat t where
-- Corresponds to multiple parameter instances
-- instead of multiple values for a single instance @foo=bar&foo=baz@.
-- This is valid only for parameters in @'ParamQuery'@ or @'ParamFormData'@.
CollectionMulti :: CollectionFormat Param
CollectionMulti :: CollectionFormat ParamOtherSchema

deriving instance Eq (CollectionFormat t)
deriving instance Show (CollectionFormat t)
Expand All @@ -460,7 +460,7 @@ instance {-# OVERLAPPABLE #-} Data t => Data (CollectionFormat t) where
toConstr = collectionFormatConstr
dataTypeOf _ = collectionFormatDataType

deriving instance {-# OVERLAPPING #-} Data (CollectionFormat Param)
deriving instance {-# OVERLAPPING #-} Data (CollectionFormat ParamOtherSchema)

type ParamName = Text

Expand Down Expand Up @@ -1144,7 +1144,7 @@ instance {-# OVERLAPPABLE #-} FromJSON (SwaggerType t) where
instance {-# OVERLAPPABLE #-} FromJSON (CollectionFormat t) where
parseJSON = parseOneOf [CollectionCSV, CollectionSSV, CollectionTSV, CollectionPipes]

instance FromJSON (CollectionFormat Param) where
instance FromJSON (CollectionFormat ParamOtherSchema) where
parseJSON = parseOneOf [CollectionCSV, CollectionSSV, CollectionTSV, CollectionPipes, CollectionMulti]

-- NOTE: The constraints @FromJSON (SwaggerType t)@ and
Expand Down

0 comments on commit 5c2088f

Please sign in to comment.