vmarchaud / jsdoc-http-plugin Goto Github PK
View Code? Open in Web Editor NEWDocument your http endpoints with JSDoc
License: MIT License
Document your http endpoints with JSDoc
License: MIT License
Followed instructions
jsdoc --config jsdoc.conf
An argument like -d= or --directory= is mandatory!
Try 'jsdoc --help' or 'man jsdoc' for more information.
Having an issue when @params are not showing in the following Express code:
/** Get object by ID endpoint
*
* @name Fields by ID
* @memberof Field APIs
* @path {GET} /fields/:objectId
* @params {String} :objectId is the Field ID to search by
*/
router.get('/:objectId', (req, res, next) => {
fieldsSvc.getItem(req.params.objectId, 'Fields').then((data) => {
res.json(data);
}).catch(next);
});
I tried removing the namespace to see if it was affecting it but no change.
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
*/
Not sure if I'm doing something wrong
Bug with displaying array types, like:
@body {string[]} body_string_params - Array of string params
@body {Object[]} body_object_params - Array of object params
When an array is passed as a type, the angle brackets are perceived as part of the HTML document. In HTML, it looks like:
<td class="type">
Array.
<object></object>
</td>
I have a following code piece documented.
/**
* Requires `customerOrderId` and `role` parameters.
* @path {PUT} /eta/update/:customerOrder/:role
* @params :customerOrderId
* @params :role
*/
static async updateTimer(req, res)
I really like the output of parameters related to HTTP routing. However, I would like to suppress the parameters section, which is in fact not relevant to the function signature. Is there such an option?
This plugin is very useful!
Hi there, thanks for your great plugin @vmarchaud.
I have a typedef of Connection:
/**
* A connection
* @typedef {Object} Connection
* @property {String} address IP address
* @property {String} description Description
* @property {String} interface Interface
* @property {String} name Name
* @property {String} netmask Netmask
* @property {String} status Status
* @property {String} type Type (WIFI/ETH)
* @property {boolean} [captive] Enabled captive portal
* @property {boolean} [dhcp_enabled] DHCP Enabled
* @property {Number} [dhcp_lease] DHCP Lease (in seconds)
* @property {String} [dhcp_range_end] DHCP range end
* @property {String} [dhcp_range_start] DHCP range start
* @property {Number} [vlan_id] Vlan ID
* @property {String} [wifi_broadcast] Wifi Broadcast
* @property {String} [wifi_key] Wifi security key
* @property {String} [wifi_security] Wifi security
* @property {String} [wifi_ssid] Wifi SSID
*/
I would to use it as the @Body in a jsdoc for my create function:
/**
* @function create
* @name create
* @description Create a connection
* @path {POST} /connection
* @header {String} Authorization JWT token
* @header {String} Content-Type application/json
* @auth No roles / permissions required
* @body {Connection} Connection In {@link Connection} format
* @code {200} If the request is successful
* @code {500} IP Address is not valid
* @code {500} IP host address XYZ cannot be 0 or 255
* @since 1.0.0
* @response {myJson} response
* @response {Object} response.data Connection created
*/
Any ideas please as its not outputting in the generated html.
Thanks
Sharry
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.