handle composed schemas in InlineModelResolver (#2112)

* handle composed schemas in InlineModelResolver

* fix unit test -> TestUtils.parseSpec

* update samples

* fix samples

* update samples

* update samples

* add new files
This commit is contained in:
Matthieu Berthomé
2019-05-08 04:19:15 +02:00
committed by William Cheng
parent 7eb2be9c99
commit ee43cc1520
412 changed files with 17001 additions and 101 deletions

View File

@@ -246,6 +246,14 @@ genCat n =
<*> arbitraryReducedMaybe n -- catColor :: Maybe Text
<*> arbitraryReducedMaybe n -- catDeclawed :: Maybe Bool
instance Arbitrary CatAllOf where
arbitrary = sized genCatAllOf
genCatAllOf :: Int -> Gen CatAllOf
genCatAllOf n =
CatAllOf
<$> arbitraryReducedMaybe n -- catAllOfDeclawed :: Maybe Bool
instance Arbitrary Category where
arbitrary = sized genCategory
@@ -281,6 +289,14 @@ genDog n =
<*> arbitraryReducedMaybe n -- dogColor :: Maybe Text
<*> arbitraryReducedMaybe n -- dogBreed :: Maybe Text
instance Arbitrary DogAllOf where
arbitrary = sized genDogAllOf
genDogAllOf :: Int -> Gen DogAllOf
genDogAllOf n =
DogAllOf
<$> arbitraryReducedMaybe n -- dogAllOfBreed :: Maybe Text
instance Arbitrary EnumArrays where
arbitrary = sized genEnumArrays

View File

@@ -35,10 +35,12 @@ main =
propMimeEq MimeJSON (Proxy :: Proxy ArrayTest)
propMimeEq MimeJSON (Proxy :: Proxy Capitalization)
propMimeEq MimeJSON (Proxy :: Proxy Cat)
propMimeEq MimeJSON (Proxy :: Proxy CatAllOf)
propMimeEq MimeJSON (Proxy :: Proxy Category)
propMimeEq MimeJSON (Proxy :: Proxy ClassModel)
propMimeEq MimeJSON (Proxy :: Proxy Client)
propMimeEq MimeJSON (Proxy :: Proxy Dog)
propMimeEq MimeJSON (Proxy :: Proxy DogAllOf)
propMimeEq MimeJSON (Proxy :: Proxy EnumArrays)
propMimeEq MimeJSON (Proxy :: Proxy EnumClass)
propMimeEq MimeJSON (Proxy :: Proxy EnumTest)