OpenAPI: Change GET response type to array (#1149)

This commit is contained in:
Alexey Alekhin
2018-07-24 12:26:45 -05:00
committed by Steve Chávez
parent 2b46afe1ec
commit 70e95649fd
3 changed files with 26 additions and 1 deletions
+4 -1
View File
@@ -198,8 +198,11 @@ makePathItem (t, cs, _) = ("/" ++ unpack tn, p $ tableInsertable t)
& at 206 ?~ "Partial Content"
& at 200 ?~ Inline ((mempty :: Response)
& description .~ "OK"
& schema ?~ (Ref $ Reference $ tableName t)
& schema ?~ Inline (mempty
& type_ .~ SwaggerArray
& items ?~ (SwaggerItemsObject $ Ref $ Reference $ tableName t)
)
)
postOp = tOp
& parameters .~ map ref ["body." <> tn, "preferReturn"]
& at 201 ?~ "Created"