I have a project where I have nested objects. I have tried to figure out the correct syntax for nested array. This is something that I have tired (among of the many other things):
parameter name: :measurement, in: :body, schema: {
type: :object,
properties: {
measurement_code: { type: :string },
},
type: :array_of_objects,
measure: { type: :array },
items: {
value: { type: :integer }
name: { type: :string }
id: { type: :integer }
},
required: []
}
The example data that I am sending:
{"measurement_code"=>"918031199-7",
:measure=>
[
{
"id": 1,
"value": 8049,
"name": "Temporibus quam et ipsum blanditiis hic."
},
{
"id": 2,
"value": 76060,
"name": "Sint omnis."
}]
}
}