webgear-openapi 1.0.0 → 1.0.1
raw patch · 2 files changed
+12/−6 lines, 2 filesdep ~openapi3dep ~textdep ~webgear-core
Dependency ranges changed: openapi3, text, webgear-core
Files
src/WebGear/OpenApi/Handler.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {- | An implementation of `Handler` to generate `OpenApi` documentation from WebGear API specifications. -}@@ -262,8 +263,13 @@ mergeDoc :: CompactDocNode -> Tree CompactDocNode -> OpenApi -> OpenApi mergeDoc (CDocSecurityScheme schemeName scheme) child doc =- let secSchemes = [(schemeName, scheme)] :: Definitions SecurityScheme- secReqs = [SecurityRequirement [(schemeName, [])]] :: [SecurityRequirement]+ let+#if MIN_VERSION_openapi3(3, 2, 0)+ secSchemes = SecurityDefinitions [(schemeName, scheme)]+#else+ secSchemes = [(schemeName, scheme)] :: Definitions SecurityScheme+#endif+ secReqs = [SecurityRequirement [(schemeName, [])]] :: [SecurityRequirement] in postOrder child doc $ \doc' -> doc' & components . securitySchemes <>~ secSchemes
webgear-openapi.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.4 name: webgear-openapi-version: 1.0.0+version: 1.0.1 synopsis: Composable, type-safe library to build HTTP API servers description: WebGear is a library to for building composable, type-safe HTTP API servers.@@ -72,9 +72,9 @@ , http-types ==0.12.* , insert-ordered-containers ==0.2.* , lens >=4.18.1 && <5.2- , openapi3 ==3.1.*- , text ==1.2.*- , webgear-core ==1.0.0+ , openapi3 >=3.1.0 && <3.3+ , text >=1.2.0.0 && <2.1+ , webgear-core ==1.0.1 ghc-options: -Wall -Wno-unticked-promoted-constructors -Wcompat