git.iko.soy/typeable/openapi3
on master help sign in
3 files changed+8−35
since splitsnapshots
unifiedsplit
openapi3.cabal+4−5 src/Data/OpenApi/Internal.hs+1−2 src/Data/OpenApi/Internal/AesonUtils.hs+3−28
openapi3.cabal+4−5
@@ -74,17 +74,17 @@ library
7474
7575 -- other dependencies
7676 build-depends:
77− base-compat-batteries >=0.10.5 && <0.13
77+ base-compat-batteries >=0.11.1 && <0.13
7878 , aeson >=1.4.2.0 && <1.6 || >=2.0.1.0 && < 2.1
7979 , aeson-pretty >=0.8.7 && <0.9
8080 -- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
8181 , cookie >=0.4.3 && <0.5
82− , generics-sop >=0.4.0.1 && <0.6
82+ , generics-sop >=0.5.1.0 && <0.6
8383 , hashable >=1.2.7.0 && <1.5
84− , http-media >=0.7.1.3 && <0.9
84+ , http-media >=0.8.0.0 && <0.9
8585 , insert-ordered-containers >=0.2.3 && <0.3
8686 , lens >=4.16.1 && <5.2
87− -- , network >=2.6.3.5 && <3.2
87+ , network >=2.6.3.5 && <3.2
8888 , optics-core >=0.2 && <0.5
8989 , optics-th >=0.2 && <0.5
9090 , scientific >=0.3.6.2 && <0.4
@@ -92,7 +92,6 @@ library
9292 , uuid-types >=1.0.3 && <1.1
9393 , vector >=0.12.0.1 && <0.13
9494 , QuickCheck >=2.10.1 && <2.15
95− , generic-arbitrary >=0.1
9695
9796 default-language: Haskell2010
9897
src/Data/OpenApi/Internal.hs+1−2
@@ -1,5 +1,3 @@
1−{-# OPTIONS_GHC -fconstraint-solver-iterations=5 #-}
2−
31{-# LANGUAGE CPP #-}
42{-# LANGUAGE DataKinds #-}
53{-# LANGUAGE DeriveDataTypeable #-}
@@ -45,6 +43,7 @@ import Data.Text.Encoding (encodeUtf8)
4543import GHC.Generics (Generic)
4644import Network.HTTP.Media (MediaType, mainType, parameters, parseAccept, subType, (//),
4745 (/:))
46+import Network.Socket (HostName, PortNumber)
4847import Text.Read (readMaybe)
4948
5049import Data.HashMap.Strict.InsOrd (InsOrdHashMap)
src/Data/OpenApi/Internal/AesonUtils.hs+3−28
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE DataKinds #-}
32{-# LANGUAGE FlexibleContexts #-}
43{-# LANGUAGE GADTs #-}
@@ -139,15 +138,7 @@ sopSwaggerGenericToJSON'
139138 -> DatatypeInfo '[xs]
140139 -> POP Maybe '[xs]
141140 -> [Pair]
142−sopSwaggerGenericToJSON'
143− opts
144− (SOP (Z fields))
145−#if MIN_VERSION_generics_sop(0,5,0)
146− (ADT _ _ (Record _ fieldsInfo :* Nil) _)
147−#else
148− (ADT _ _ (Record _ fieldsInfo :* Nil))
149−#endif
150− (POP (defs :* Nil)) =
141+sopSwaggerGenericToJSON' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
151142 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
152143sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
153144
@@ -220,15 +211,7 @@ sopSwaggerGenericParseJSON'
220211 -> DatatypeInfo '[xs]
221212 -> POP Maybe '[xs]
222213 -> Parser (SOP I '[xs])
223−sopSwaggerGenericParseJSON'
224− opts
225− obj
226−#if MIN_VERSION_generics_sop(0,5,0)
227− (ADT _ _ (Record _ fieldsInfo :* Nil) _)
228−#else
229− (ADT _ _ (Record _ fieldsInfo :* Nil))
230−#endif
231− (POP (defs :* Nil)) =
214+sopSwaggerGenericParseJSON' opts obj (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
232215 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
233216sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
234217
@@ -295,15 +278,7 @@ sopSwaggerGenericToEncoding'
295278 -> DatatypeInfo '[xs]
296279 -> POP Maybe '[xs]
297280 -> Series
298−sopSwaggerGenericToEncoding'
299− opts
300− (SOP (Z fields))
301−#if MIN_VERSION_generics_sop(0,5,0)
302− (ADT _ _ (Record _ fieldsInfo :* Nil) _)
303−#else
304− (ADT _ _ (Record _ fieldsInfo :* Nil))
305−#endif
306− (POP (defs :* Nil)) =
281+sopSwaggerGenericToEncoding' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
307282 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
308283sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"
309284