richhollis / swagger-docs

Generates swagger-ui json files for Rails APIs with a simple DSL.
MIT License
750 stars 150 forks source link

How to add param for nested attributes? #143

Open shahfaizanali opened 8 years ago

shahfaizanali commented 8 years ago

I want to add param for nested attributes of an associated model.

For Example:

images_attributes: [:id,:file,:_destroy]

Is it possible?

tsymbalenkovlad commented 8 years ago

param :form, 'image_attributes[0][file]', :file, :required, 'File' idk about more efficient way when you need long array of nested attributes, but don't think that's necessary Edit: already in closed, could try https://github.com/richhollis/swagger-docs/issues/71