I have an API that includes an array of hashes as a parameter:
param :parties, Array, :required => true, :desc => "A set of parties", of: Hash do
param :role, String, :required => true
param :guid, String, :required => true
param :first_name, :required => false
param :last_name, :required => false
end
However, if I use rake apipie:static_swagger_json
using APIPIE 0.5.19 on Ruby 3.0.3 to create an OpenAPI 2.0 compatible schema it gets translated to
"parties": {
"type": "array",
"items": {
"type": "string"
},
"description": "A set of parties"
},
Am I doing something wrong or is the SwaggerGenerator bundled with Apipie not able to produce a schema for arrays of objects/hashes ?