You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
api!"Create a new post (multipart/form-data)"param:post,Hash,required: true,action_aware: truedoparam:title,String,desc: 'Title',required: trueparam:body,String,desc: 'Body',required: trueparam:region_id,:number,desc: 'Region ID',required: false,default_value: nilparam:files,Array,of: ActionDispatch::Http::UploadedFile,desc: 'Array of files to be attached to the post (multipart/form-data array)',required: false,default_value: []param:images,Array,of: ActionDispatch::Http::UploadedFile,desc: 'Array of images to be attached to the post (multipart/form-data array)',required: false,default_value: []end
Have a look at files and images, they are wrong. Problem: it generates string fields and doesn't send them like value[] which is not recognized by rails server.
{
"name": "post[files]",
"type": "array",
"items": {
"type": "string"
},
"in": "formData",
"default": [
],
"description": "Array of files to be attached to the post (multipart/form-data array)"
},
{
"name": "post[images]",
"type": "array",
"items": {
"type": "string"
},
"in": "formData",
"default": [
],
"description": "Array of images to be attached to the post (multipart/form-data array)"
}
In full output you can see, that consumes contains application/x-www-form-urlencoded which is used by swagger as primary method too while it should be multipart/form-data for files.
The text was updated successfully, but these errors were encountered:
gem "apipie-rails", "~> 1.3"
Config
Have a look at files and images, they are wrong. Problem: it generates string fields and doesn't send them like value[] which is not recognized by rails server.
Full output
In full output you can see, that consumes contains application/x-www-form-urlencoded which is used by swagger as primary method too while it should be multipart/form-data for files.
The text was updated successfully, but these errors were encountered: