packages feed

swagger2 2.1.4 → 2.1.4.1

raw patch · 6 files changed

+72/−22 lines, 6 filesdep ~QuickCheckdep ~basebuild-type:Customsetup-changed

Dependency ranges changed: QuickCheck, base

Files

CHANGELOG.md view
@@ -1,3 +1,9 @@+2.1.4.1+-------++* GHC-8.2 support (see [#95](https://github.com/GetShopTV/swagger2/issues/95))+* Documentation corrections (see [#105](https://github.com/GetShopTV/swagger2/pull/105))+ 2.1.4 ----- 
Setup.hs view
@@ -1,2 +1,33 @@+{-# LANGUAGE CPP #-}+{-# OPTIONS_GHC -Wall #-}+module Main (main) where++#ifndef MIN_VERSION_cabal_doctest+#define MIN_VERSION_cabal_doctest(x,y,z) 0+#endif++#if MIN_VERSION_cabal_doctest(1,0,0)++import Distribution.Extra.Doctest ( defaultMainWithDoctests )+main :: IO ()+main = defaultMainWithDoctests "doctests"++#else++#ifdef MIN_VERSION_Cabal+-- If the macro is defined, we have new cabal-install,+-- but for some reason we don't have cabal-doctest in package-db+--+-- Probably we are running cabal sdist, when otherwise using new-build+-- workflow+#warning You are configuring this package without cabal-doctest installed. \+         The doctests test-suite will not work as a result. \+         To fix this, install cabal-doctest before configuring.+#endif+ import Distribution.Simple++main :: IO () main = defaultMain++#endif
src/Data/Swagger/Internal/Schema.hs view
@@ -65,10 +65,6 @@ import qualified Data.Swagger.Lens as Swagger import Data.Swagger.SchemaOptions -#ifdef __DOCTEST__-import Data.Swagger.Lens (name, schema)-#endif- #if __GLASGOW_HASKELL__ < 800 #else import qualified Data.ByteString as BS@@ -100,6 +96,8 @@ -- {-\# LANGUAGE OverloadedLists \#-}     -- allows to write 'Map' and 'HashMap' as lists -- -- import Control.Lens+-- import Data.Proxy+-- import Data.Swagger -- -- data Coord = Coord { x :: Double, y :: Double } --@@ -727,7 +725,7 @@  type AllNullary = All -class GSumToSchema f where+class GSumToSchema (f :: * -> *)  where   gsumToSchema :: SchemaOptions -> proxy f -> Schema -> WriterT AllNullary (Declare (Definitions Schema)) Schema  instance (GSumToSchema f, GSumToSchema g) => GSumToSchema (f :+: g) where@@ -766,3 +764,5 @@  data Proxy3 a b c = Proxy3 +-- $setup+-- >>> import Data.Swagger
swagger2.cabal view
@@ -1,7 +1,11 @@ name:                swagger2-version:             2.1.4+version:             2.1.4.1 synopsis:            Swagger 2.0 data model-description:         Please see README.md+description:+  This library is inteded to be used for decoding and encoding Swagger 2.0 API+  specifications as well as manipulating them.+  .+  The original Swagger 2.0 specification is available at http://swagger.io/specification/. homepage:            https://github.com/GetShopTV/swagger2 bug-reports:         https://github.com/GetShopTV/swagger2/issues license:             BSD3@@ -10,15 +14,19 @@ maintainer:          nickolay@getshoptv.com copyright:           (c) 2015-2016, GetShopTV category:            Web-build-type:          Simple+build-type:          Custom extra-source-files:     README.md   , CHANGELOG.md   , examples/*.hs   , include/overlapping-compat.h cabal-version:       >=1.10-tested-with:         GHC==7.8.4, GHC==7.10.3, GHC==8.0.1+tested-with:         GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.1 +custom-setup+  setup-depends:+    base, Cabal, cabal-doctest >=1.0.2 && <1.1+ library   hs-source-dirs:      src   include-dirs:        include@@ -39,13 +47,13 @@     Data.Swagger.Internal.ParamSchema     Data.Swagger.Internal.Utils     Data.Swagger.Internal.AesonUtils-  build-depends:       base        >=4.7   && <4.10+  build-depends:       base        >=4.7   && <4.11                      , base-compat >=0.9.1 && <0.10                      , aeson       >=0.11.2.1                      , bytestring                      , containers                      , hashable-                     , generics-sop >=0.2 && <0.3+                     , generics-sop >=0.2 && <0.4                      , http-media                      , insert-ordered-containers >=0.1.0.0 && <0.3                      , lens@@ -93,11 +101,12 @@     Data.Swagger.Schema.ValidationSpec   default-language: Haskell2010 -test-suite doctest-  build-depends:    base, doctest, Glob+test-suite doctests+  -- See QuickCheck note in https://github.com/phadej/cabal-doctest#notes+  build-depends:    base, doctest, Glob, QuickCheck   default-language: Haskell2010   hs-source-dirs:   test-  main-is:          DocTest.hs+  main-is:          doctests.hs   type:             exitcode-stdio-1.0  source-repository head
− test/DocTest.hs
@@ -1,8 +0,0 @@-module Main (main) where--import System.FilePath.Glob (glob)-import Test.DocTest (doctest)--main :: IO ()-main = glob "src/**/*.hs" >>= doctest'-  where doctest' files = doctest $ "-Iinclude/" : "-D__DOCTEST__" : files
+ test/doctests.hs view
@@ -0,0 +1,12 @@+module Main where++import Build_doctests (flags, pkgs, module_sources)+import Data.Foldable (traverse_)+import Test.DocTest++main :: IO ()+main = do+    traverse_ putStrLn args+    doctest args+  where+    args = flags ++ pkgs ++ module_sources