I am trying to declare input parameters as array of objects or even as objects but none of this seems to work:
swagger_path "/set_diet_plan" do
operation :post do
extend SwaggerExtensions::AuthenticationError
extend SwaggerExtensions::ApiAuth
extend SwaggerExtensions::UnprocessableEntityError
key :summary, "Creates or updates the current patient diet plan"
key :description, "Creates or updates the current patient diet plan"
key :operationId, "setDietPlan"
key :produces, ["application/json"]
key :tags, ["Patients"]
parameter do
key :name, :physical_activity_to_add_1
key :in, :query
key :description, "list of physical activities that will be added to the current activity plan"
key :type, :object
items do
property :teste do
key :type, :string
end
property :teste2 do
key :type, :string
end
end
end
# ....
OR
swagger_path "/set_diet_plan" do
operation :post do
extend SwaggerExtensions::AuthenticationError
extend SwaggerExtensions::ApiAuth
extend SwaggerExtensions::UnprocessableEntityError
key :summary, "Creates or updates the current patient diet plan"
key :description, "Creates or updates the current patient diet plan"
key :operationId, "setDietPlan"
key :produces, ["application/json"]
key :tags, ["Patients"]
parameter do
key :name, :physical_activity_to_add_1
key :in, :query
key :description, "list of physical activities that will be added to the current activity plan"
key :type, :array
items do
property :type, :object
property :teste do
key :type, :string
end
property :teste2 do
key :type, :string
end
end
end
# ....
I am trying to declare input parameters as array of objects or even as objects but none of this seems to work:
OR
Is this supported?