gossip_boi
5 years agoNew Contributor
Using objects from components in arrays of other object
Hello everyone. I can't find any solution, unfortunately. So, I have the object 'address' in my schemas of components, and I want to use it in the array 'addresses', which is a part of the request body. How can I do that? If I do:
addresses:
type: array
items:
$ref: '#/components/schemas/addresses'
then I get:
"addresses": [
{
"address": [
{
but I need just properties of 'address' in 'addresses' like:
"addresses":[{properties_of_address},{properties_of_address}]