Edit Members API annotation
grape-swagger
only selects the first option in types
because OpenAPI V2 does not support multiple types. As such, the generated documentation will not show that user_id
is actually a comma-separated array. This bridges the discrepancy between OpenAPI and Rails annotations by using Validations::Types::CommaSeparatedToIntegerArray.coerce
to support the comma-separated array.
This also fixes the success
object as grape-swagger
could not find ::Entities::Member
, causing generation to fail.
The OpenAPI V2 documentation will be used for dogfooding API fuzzing as per #372422 (closed) and the OpenAPI autogeneration &8926.
Edited by Eugene Lim