I'd like to make a swagger endpoint thats request body is a product object with 2 integar fields and an options object with 2 more fields, I'm using rswag
as a ruby gem
In my spec
parameter in: :body, schema: {
type: :object,
properties: {
product_id: { type: :integer },
quantity: { type: :integer },
options: {
properties: {
color: { type: :string },
size: { type: :string },
}
},
}
}
However, in my ui I have no fields for color or size, just a text field for options, how can i fix this?
Try this :