Giter Club home page Giter Club logo

jsdoc-http-plugin's People

Contributors

antonin-lebrard avatar dependabot[bot] avatar ertrzyiks avatar omgimalexis avatar vmarchaud avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

jsdoc-http-plugin's Issues

Difference between the parameters & route params

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

Add escaping for parameter type

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>

Actual result:
image
Expected result:
image

@param

the @param tag is already use by jsdoc and the addition of your plugin replace the name of @param for method.

Params Not Being Documented for Express Endpoints

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.

Suppress default params table for a function

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?

image

This plugin is very useful!

Undefined when description is missing

When we don't have any description, documention includes undefined text.

screenshot 2017-09-19 20 41 33

What do you think about replacing ${e.doclet.description} with ${e.doclet.description || ''}?

Use of @typedef in @body

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

add code columns to response

Hy,
first time i post an isssue sorry if this doesn't gone here :/
I wan't to know if it's possible to add the 'http response code' columns into the response.

exemple:
name|tpye|description|code

by the way thank for the @response and @code :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.