-
Notifications
You must be signed in to change notification settings - Fork 460
Open
Description
When inputting the following code for a method:
param :param_1, Array, of: Hash, desc: 'Array of Objects', required: true do
param :param_2, String, required: true
param :param_3, String, required: false
endIt outputs the following after running this command: rails apipie:static_swagger_json:

However in the response, there is the array_of property which allows me to make an array_of: Hash:
returns code: 200 do
property :array_1, array_of: Hash, desc: 'Array of Objects', required: true do
property :prop_1, String
property :prop_2, String
end
endWhich results in the following:

Is there a reason that the array_of is only limited to responses?
After forking and cloning APIPie locally, I uncommented this line:
| raise "an ':array_of =>' validator is allowed exclusively on response-only fields" unless @response_only |
And was able to get the first piece of code working after refactoring to
array_of: Hash.jaynetics
Metadata
Metadata
Assignees
Labels
No labels