Open
Description
code like this:
desc 'create new symptom'
params do
optional :id, type: Integer
requires :reasonCode, type: String
requires :lifeThreatening, type: Boolean
requires :msp, type: Boolean
optional :symptomNamesAttributes, type: Array, default: [] do
requires :name, type: String
requires :primary, type: Boolean, default: false
end
end
end
The area of interest is the SymtomNamesAttributes.
First problem: you can only enter one symtomNamesAttributes despite it being declared as an array.
Second (bigger problem): even though symtomNamesAttributes is marked as "optional", the UI makes it required because the nested names/primary fields are required.
Are these known issues? Is there a work around?