vmarchaud / jsdoc-http-plugin

Document your http endpoints with JSDoc
MIT License
40 stars 10 forks source link

Difference between the parameters & route params #13

Closed molinto closed 5 years ago

molinto commented 5 years ago

Both show, one with no Type

/**
 * @function remove
 * @name remove
 * @description blah blah
 * @path {DELETE} /abc/:id
 * @params {string} id Unique identifier
 * @header {string} Authorization JWT token
 * @header {string} Content-Type application/json
 * @auth restrictToRoles('superadmin')
 * @code {200} If the request is successful
 * @code {500} Issue with blah blah
 * @since 1.0.0
 * @response {Json} response In {@link Json} format
 * @response {Object} response.data Empty object
 */

Selection_626

Not sure if I'm doing something wrong

vmarchaud commented 5 years ago

The plugin will inject the Route parameters part in the doc but i believe the Parameters is injected by JSDoc itself. From what i red, the params property is already used internally so when i add mine, jsdoc believe it's his own and print it too. I don't think we have a way to remove it without renaming the params tag

vmarchaud commented 5 years ago

Actually someone (#11) already had the issue, closing this one