git.iko.soy/typeable/openapi3
on 3321dc0 help sign in
openapi3.cabal+5−4
since splitsnapshots
unifiedsplit
@@ -74,17 +74,17 @@ library
74
74
75 -- other dependencies
75 -- other dependencies
76 build-depends:
76 build-depends:
77− base-compat-batteries >=0.11.1 && <0.13
77+ base-compat-batteries >=0.10.5 && <0.13
78 , aeson >=1.4.2.0 && <1.6 || >=2.0.1.0 && < 2.1
78 , aeson >=1.4.2.0 && <1.6 || >=2.0.1.0 && < 2.1
79 , aeson-pretty >=0.8.7 && <0.9
79 , aeson-pretty >=0.8.7 && <0.9
80 -- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
80 -- cookie 0.4.3 is needed by GHC 7.8 due to time>=1.4 constraint
81 , cookie >=0.4.3 && <0.5
81 , cookie >=0.4.3 && <0.5
82− , generics-sop >=0.5.1.0 && <0.6
82+ , generics-sop >=0.4.0.1 && <0.6
83 , hashable >=1.2.7.0 && <1.5
83 , hashable >=1.2.7.0 && <1.5
84− , http-media >=0.8.0.0 && <0.9
84+ , http-media >=0.7.1.3 && <0.9
85 , insert-ordered-containers >=0.2.3 && <0.3
85 , insert-ordered-containers >=0.2.3 && <0.3
86 , lens >=4.16.1 && <5.2
86 , lens >=4.16.1 && <5.2
87− , network >=2.6.3.5 && <3.2
87+ -- , network >=2.6.3.5 && <3.2
88 , optics-core >=0.2 && <0.5
88 , optics-core >=0.2 && <0.5
89 , optics-th >=0.2 && <0.5
89 , optics-th >=0.2 && <0.5
90 , scientific >=0.3.6.2 && <0.4
90 , scientific >=0.3.6.2 && <0.4
@@ -92,6 +92,7 @@ library
92 , uuid-types >=1.0.3 && <1.1
92 , uuid-types >=1.0.3 && <1.1
93 , vector >=0.12.0.1 && <0.13
93 , vector >=0.12.0.1 && <0.13
94 , QuickCheck >=2.10.1 && <2.15
94 , QuickCheck >=2.10.1 && <2.15
95+ , generic-arbitrary >=0.1
95
96
96 default-language: Haskell2010
97 default-language: Haskell2010
97
98
src/Data/OpenApi/Internal.hs+2−1
@@ -1,3 +1,5 @@
1+{-# OPTIONS_GHC -fconstraint-solver-iterations=5 #-}
2+
1{-# LANGUAGE CPP #-}
3{-# LANGUAGE CPP #-}
2{-# LANGUAGE DataKinds #-}
4{-# LANGUAGE DataKinds #-}
3{-# LANGUAGE DeriveDataTypeable #-}
5{-# LANGUAGE DeriveDataTypeable #-}
@@ -43,7 +45,6 @@ import Data.Text.Encoding (encodeUtf8)
43import GHC.Generics (Generic)
45import GHC.Generics (Generic)
44import Network.HTTP.Media (MediaType, mainType, parameters, parseAccept, subType, (//),
46import Network.HTTP.Media (MediaType, mainType, parameters, parseAccept, subType, (//),
45 (/:))
47 (/:))
46−import Network.Socket (HostName, PortNumber)
47import Text.Read (readMaybe)
48import Text.Read (readMaybe)
48
49
49import Data.HashMap.Strict.InsOrd (InsOrdHashMap)
50import Data.HashMap.Strict.InsOrd (InsOrdHashMap)
src/Data/OpenApi/Internal/AesonUtils.hs+28−3
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
1{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE DataKinds #-}
2{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE FlexibleContexts #-}
3{-# LANGUAGE GADTs #-}
4{-# LANGUAGE GADTs #-}
@@ -138,7 +139,15 @@ sopSwaggerGenericToJSON'
138 -> DatatypeInfo '[xs]
139 -> DatatypeInfo '[xs]
139 -> POP Maybe '[xs]
140 -> POP Maybe '[xs]
140 -> [Pair]
141 -> [Pair]
142+sopSwaggerGenericToJSON'
143+ opts
144+ (SOP (Z fields))
145+#if MIN_VERSION_generics_sop(0,5,0)
141−sopSwaggerGenericToJSON' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
146+ (ADT _ _ (Record _ fieldsInfo :* Nil) _)
147+#else
148+ (ADT _ _ (Record _ fieldsInfo :* Nil))
149+#endif
150+ (POP (defs :* Nil)) =
142 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
151 sopSwaggerGenericToJSON'' opts fields fieldsInfo defs
143sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
152sopSwaggerGenericToJSON' _ _ _ _ = error "sopSwaggerGenericToJSON: unsupported type"
144
153
@@ -211,7 +220,15 @@ sopSwaggerGenericParseJSON'
211 -> DatatypeInfo '[xs]
220 -> DatatypeInfo '[xs]
212 -> POP Maybe '[xs]
221 -> POP Maybe '[xs]
213 -> Parser (SOP I '[xs])
222 -> Parser (SOP I '[xs])
214−sopSwaggerGenericParseJSON' opts obj (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
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)) =
215 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
232 SOP . Z <$> sopSwaggerGenericParseJSON'' opts obj fieldsInfo defs
216sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
233sopSwaggerGenericParseJSON' _ _ _ _ = error "sopSwaggerGenericParseJSON: unsupported type"
217
234
@@ -278,7 +295,15 @@ sopSwaggerGenericToEncoding'
278 -> DatatypeInfo '[xs]
295 -> DatatypeInfo '[xs]
279 -> POP Maybe '[xs]
296 -> POP Maybe '[xs]
280 -> Series
297 -> Series
281−sopSwaggerGenericToEncoding' opts (SOP (Z fields)) (ADT _ _ (Record _ fieldsInfo :* Nil) _) (POP (defs :* Nil)) =
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)) =
282 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
307 sopSwaggerGenericToEncoding'' opts fields fieldsInfo defs
283sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"
308sopSwaggerGenericToEncoding' _ _ _ _ = error "sopSwaggerGenericToEncoding: unsupported type"
284
309