Skip to content

No grouping when using CommonJS modules #654

Closed
@ahmehri

Description

@ahmehri

When using CommonJS modules as the following example:

/**
 * Used to request web services.
 * @module client
 */
module.exports = {
  /**
   * requester.requestTransaction web service.
   *
   * @memberof client
   * @function
   * @param req Transaction request
   * @return {string} Signer id
   */
  requestTransaction: requestTransaction,
 
  /**
   * transactionSigner.requestOTP web service.
   *
   * @function
   * @param signerId the signer ID
   * @return {Object} the server response
   */
  requestOTP: requestOTP,
};

the generated html will be the following:
ungrouped-methods

This is not the good grouping and I think that's because only ES2015 modules are supported. The same example when used with ESM:

/**
 * Used to request web services.
 * @module
 */
export default {
  requestTransaction: requestTransaction,
  requestOTP: requestOTP,
};
 
/**
 * requester.requestTransaction web service.
 *
 * @memberof client
 * @param req Transaction request
 * @return {string} Signer id
 */
async function requestTransaction(req) {
}
 
/**
 * transactionSigner.requestOTP web service.
 *
 * @memberof client
 * @param signerId the signer ID
 * @return {Object} the server response
 */
async function requestOTP(signerId) {
}

will generate the correct html:
grouped-methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions