Skip to content

Commit 80eb725

Browse files
committed
DNM: notes
1 parent d0469df commit 80eb725

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

primer-service/test/Tests/OpenAPI.hs

+6-1
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,13 @@ genPaginatedMeta = do
160160
tasty_PaginatedMeta :: Property
161161
tasty_PaginatedMeta = testToJSON genPaginatedMeta
162162

163+
-- this fails for G.alphaNum, i.e. for strings, as have special not-just-a-list handling!
164+
-- cf toschema for polymorphic things issue
165+
-- BUT, we want a polymorphic instance, as we may well paginate other things than lists in the future
166+
-- TODO: any polymorphic thing should be checked at a few types (especially String, as that has special serialisation)!
167+
-- cf https://github.com/biocad/openapi3/pull/19/files -- the old polymorphic solution is no more
163168
tasty_Paginated :: Property
164-
tasty_Paginated = testToJSON $ Paginated <$> genPaginatedMeta <*> G.list (R.linear 0 10) genSession
169+
tasty_Paginated = testToJSON $ Paginated <$> genPaginatedMeta <*> G.list (R.linear 0 10) genSession --G.alphaNum
165170

166171
tasty_Paginated2 :: Property
167172
tasty_Paginated2 = testToJSON $ Paginated <$> genPaginatedMeta <*> G.list (R.linear 0 10) (G.string (R.linear 0 10) G.unicode)

0 commit comments

Comments
 (0)