Fix alias to map response (#1067)

* fix response reference to map

* update samples

* add null check for openapi
This commit is contained in:
William Cheng
2018-09-20 19:29:33 +08:00
committed by GitHub
parent 340466066c
commit 1b2f3fbfb6
95 changed files with 616 additions and 509 deletions

View File

@@ -1130,7 +1130,7 @@ data MapTest = MapTest
{ mapTestMapMapOfString :: !(Maybe (Map.Map String (Map.Map String Text))) -- ^ "map_map_of_string"
, mapTestMapOfEnumString :: !(Maybe (Map.Map String E'Inner)) -- ^ "map_of_enum_string"
, mapTestDirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "direct_map"
, mapTestIndirectMap :: !(Maybe StringBooleanMap) -- ^ "indirect_map"
, mapTestIndirectMap :: !(Maybe (Map.Map String Bool)) -- ^ "indirect_map"
} deriving (P.Show, P.Eq, P.Typeable)
-- | FromJSON MapTest

View File

@@ -543,7 +543,7 @@ mapTestDirectMapL f MapTest{..} = (\mapTestDirectMap -> MapTest { mapTestDirectM
{-# INLINE mapTestDirectMapL #-}
-- | 'mapTestIndirectMap' Lens
mapTestIndirectMapL :: Lens_' MapTest (Maybe StringBooleanMap)
mapTestIndirectMapL :: Lens_' MapTest (Maybe (Map.Map String Bool))
mapTestIndirectMapL f MapTest{..} = (\mapTestIndirectMap -> MapTest { mapTestIndirectMap, ..} ) <$> f mapTestIndirectMap
{-# INLINE mapTestIndirectMapL #-}