git.iko.soy/typeable/swagger2
on master help sign in
Relax contraint on ToJSON ParamSchema instance
commit26217bca04ac0e0f1d364b8efa404b6794e114f5 authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateWed 9 Dec 2015, 16:09 (11 years ago) parent59375b5
1 file changed+3−1
src/Data/Swagger/Internal.hs+3−1
src/Data/Swagger/Internal.hs+3−1
@@ -721,7 +721,6 @@ deriveJSONDefault ''Scheme
721721deriveJSON' ''Tag
722722deriveJSON' ''ExternalDocs
723723
724−deriveToJSON' ''ParamSchema
725724deriveToJSON' ''Operation
726725deriveToJSON' ''Response
727726deriveToJSON' ''PathItem
@@ -833,6 +832,9 @@ instance ToJSON (CollectionFormat t) where
833832 toJSON CollectionPipes = "pipes"
834833 toJSON CollectionMulti = "multi"
835834
835+instance ToJSON i => ToJSON (ParamSchema t i) where
836+ toJSON = genericToJSON (jsonPrefix "paramSchema")
837+
836838-- =======================================================================
837839-- Manual FromJSON instances
838840-- =======================================================================