@@ -13,7 +13,6 @@ import Control.Applicative
1313import Control.Monad
1414import Data.Aeson
1515import Data.Aeson.TH (deriveJSON)
16−import Data.Foldable (Foldable)
1716import Data.HashMap.Strict (HashMap)
1817import qualified Data.HashMap.Strict as HashMap
1918import Data.Map (Map)
@@ -23,8 +22,6 @@ import Data.Scientific (Scientific)
2322import Data.String (fromString)
2423import Data.Text (Text)
2524import qualified Data.Text as Text
26−import Data.Traversable (Traversable)
27−import Data.Hashable (Hashable)
2825import GHC.Generics (Generic)
2926import Network (HostName, PortNumber)
3027import Network.HTTP.Media (MediaType)
@@ -897,17 +894,17 @@ instance FromJSON OAuth2Params where
897894 parseJSON = genericParseJSONWithSub "flow" (jsonPrefix "oauth2")
898895
899896instance FromJSON SecuritySchemeType where
900− parseJSON json@(Object o) = do
897+ parseJSON js@(Object o) = do
901898 (t :: Text) <- o .: "type"
902899 case t of
903900 "basic" -> pure SecuritySchemeBasic
904− "apiKey" -> SecuritySchemeApiKey <$> parseJSON json
905− "oauth2" -> SecuritySchemeOAuth2 <$> parseJSON json
901+ "apiKey" -> SecuritySchemeApiKey <$> parseJSON js
902+ "oauth2" -> SecuritySchemeOAuth2 <$> parseJSON js
906903 _ -> empty
907904 parseJSON _ = empty
908905
909906instance FromJSON Swagger where
910− parseJSON json@(Object o) = do
907+ parseJSON js@(Object o) = do
911908 (version :: Text) <- o .: "swagger"
912909 when (version /= "2.0") empty
913910 (genericParseJSON (jsonPrefix "")
@@ -919,7 +916,7 @@ instance FromJSON Swagger where
919916 , "parameters" .= (mempty :: HashMap Text Parameter)
920917 , "responses" .= (mempty :: HashMap Text Response)
921918 , "securityDefinitions" .= (mempty :: HashMap Text SecurityScheme)
922− ] ) json
919+ ] ) js
923920 parseJSON _ = empty
924921
925922instance FromJSON SecurityScheme where
@@ -947,30 +944,30 @@ instance FromJSON Host where
947944 parseJSON _ = empty
948945
949946instance FromJSON Paths where
950− parseJSON json = Paths <$> parseJSON json
947+ parseJSON js = Paths <$> parseJSON js
951948
952949instance FromJSON MimeList where
953− parseJSON json = (MimeList . map fromString) <$> parseJSON json
950+ parseJSON js = (MimeList . map fromString) <$> parseJSON js
954951
955952instance FromJSON Parameter where
956953 parseJSON = genericParseJSONWithSub "schema" (jsonPrefix "parameter")
957954
958955instance FromJSON ParameterSchema where
959− parseJSON json@(Object o) = do
956+ parseJSON js@(Object o) = do
960957 (i :: Text) <- o .: "in"
961958 case i of
962959 "body" -> do
963960 schema <- o .: "schema"
964961 ParameterBody <$> parseJSON schema
965− _ -> ParameterOther <$> parseJSON json
962+ _ -> ParameterOther <$> parseJSON js
966963 parseJSON _ = empty
967964
968965instance FromJSON ParameterOtherSchema where
969966 parseJSON = genericParseJSONWithSub "common" (jsonPrefix "parameterOtherSchema")
970967
971968instance FromJSON SchemaItems where
972− parseJSON json@(Object _) = SchemaItemsObject <$> parseJSON json
973− parseJSON json@(Array _) = SchemaItemsArray <$> parseJSON json
969+ parseJSON js@(Object _) = SchemaItemsObject <$> parseJSON js
970+ parseJSON js@(Array _) = SchemaItemsArray <$> parseJSON js
974971 parseJSON _ = empty
975972
976973instance FromJSON Responses where
@@ -980,8 +977,8 @@ instance FromJSON Responses where
980977 parseJSON _ = empty
981978
982979instance FromJSON Example where
983− parseJSON json = do
984− m <- parseJSON json
980+ parseJSON js = do
981+ m <- parseJSON js
985982 pure $ Example (Map.mapKeys fromString m)
986983
987984instance FromJSON Response where
@@ -1001,9 +998,9 @@ instance FromJSON Reference where
1001998 parseJSON _ = empty
1002999
10031000instance FromJSON a => FromJSON (Referenced a) where
1004− parseJSON json
1005− = Ref <$> parseJSON json
1006− <|> Inline <$> parseJSON json
1001+ parseJSON js
1002+ = Ref <$> parseJSON js
1003+ <|> Inline <$> parseJSON js
10071004
10081005instance FromJSON Xml where
10091006 parseJSON = genericParseJSON (jsonPrefix "xml")