swagger-test 0.2.1 → 0.2.2
raw patch · 2 files changed
+6/−2 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- src/Test/Swagger/Gen.hs +5/−1
- swagger-test.cabal +1/−1
src/Test/Swagger/Gen.hs view
@@ -131,7 +131,7 @@ <> [("Content-Type", fst <$> maybeMimeAndBody)] -- use scheme from operation, if defined, or from global- scheme <- elements $ fromMaybe [Https] (operation ^. schemes <|> s ^. schemes)+ scheme <- elements $ fromMaybe [schemeForPort $ view port =<< mHost] (operation ^. schemes <|> s ^. schemes) pure ( operation , HttpRequest (buildHost scheme <$> mHost) method@@ -141,6 +141,10 @@ (snd <$> maybeMimeAndBody) ) where+ schemeForPort (Just 80) = Http+ schemeForPort (Just 443) = Https+ schemeForPort _ = Http+ buildHost :: Scheme -> Host -> String buildHost sc h = schemeToHttpPrefix sc <> (h ^. name) <> maybe "" ((':':) . show) (h ^. port)
swagger-test.cabal view
@@ -1,5 +1,5 @@ name: swagger-test-version: 0.2.1+version: 0.2.2 synopsis: Testing of Swagger APIs description: This package provides a library and executable tool that supports testing APIs specified with Swagger. It