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
Currently I believe if we want to specify JSON body fields of a POST/PUT request we need to create a separate object with @typedef keyword. Its would be nice to support following syntax.
/** * POST /item * @summary Create item * @param {object} request.body.required - object info * @param {string} request.body.field1.required - field1 info (required) * @param {string} request.body.field2 - field2 info * @param {object} request.body.field3.required - field3 info (required) * @param {string} request.body.field3.subfield1 - field3.subfield1 info * @param {string} request.body.field3.subfield2.required - field3.subfield2 info (required) * */
So in this case the POST /item endpoint should expect an object like this
{field1: 'data',// required field field2: 'data',field3: {subfield1: 'data',subfield2: 'data',// required field },};
The text was updated successfully, but these errors were encountered:
I agree this is a big missing feature right now. As it stands now, any large-ish API's docs will be bloated with typedefs of the request bodies. Specifying them inline would fix the issue.
Currently I believe if we want to specify JSON body fields of a POST/PUT request we need to create a separate object with @typedef keyword. Its would be nice to support following syntax.
So in this case the POST /item endpoint should expect an object like this
The text was updated successfully, but these errors were encountered: