git.iko.soy/typeable/swagger2
on master help sign in
Add test case for newtype series
commitd60def933cd4badfdd9a375189be0d27bf91ba40 authorNickolay Kudasov <nickolay.kudasov@gmail.com> dateMon 18 Jan 2016, 15:29 (11 years ago) parent37525ce
1 file changed+8
test/Data/Swagger/SchemaSpec.hs+8
test/Data/Swagger/SchemaSpec.hs+8
@@ -83,6 +83,7 @@ spec = do
8383 context "Character" $ checkDefs (Proxy :: Proxy Character) ["Player", "Point"]
8484 context "MyRoseTree" $ checkDefs (Proxy :: Proxy MyRoseTree) ["RoseTree"]
8585 context "[Set (Unit, Maybe Color)]" $ checkDefs (Proxy :: Proxy [Set (Unit, Maybe Color)]) ["Unit", "Color"]
86+ context "ResourceId" $ checkDefs (Proxy :: Proxy ResourceId) []
8687 describe "Inlining Schemas" $ do
8788 context "Paint" $ checkInlinedSchema (Proxy :: Proxy Paint) paintInlinedSchemaJSON
8889 context "Character" $ checkInlinedSchema (Proxy :: Proxy Character) characterInlinedSchemaJSON
@@ -573,3 +574,10 @@ lightInlinedSchemaJSON = [aesonQQ|
573574}
574575|]
575576
577+-- ========================================================================
578+-- ResourceId (series of newtypes)
579+-- ========================================================================
580+
581+newtype Id = Id String deriving (Generic, ToSchema)
582+
583+newtype ResourceId = ResourceId Id deriving (Generic, ToSchema)