Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsdoc generated html missing for overloaded methods #723

Closed
zamnuts opened this issue Feb 25, 2020 · 1 comment · Fixed by #725
Closed

jsdoc generated html missing for overloaded methods #723

zamnuts opened this issue Feb 25, 2020 · 1 comment · Fixed by #725
Assignees
Labels
api: logging Issues related to the googleapis/nodejs-logging API. type: docs Improvement to the documentation for an API.

Comments

@zamnuts
Copy link
Contributor

zamnuts commented Feb 25, 2020

Environment details

  • OS: all
  • Node.js version: all
  • npm version:
  • @google-cloud/logging version: 7.2.2
  • jsdoc version: 3.6.3

Steps to reproduce

  1. npm run docs
  2. view docs/index.html in browser
  3. notice many methods are missing from Log and other classes

Example code snippet:

nodejs-logging/src/log.ts

Lines 737 to 819 in 56a8ed8

/**
* Write log entries to Stackdriver Logging.
*
* @see [entries.write API Documentation]{@link https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/write}
*
* @param {Entry|Entry[]} entry A log entry, or array of entries, to write.
* @param {?WriteOptions} [options] Write options
* @param {LogWriteCallback} [callback] Callback function.
* @returns {Promise<LogWriteResponse>}
*
* @example
* const entry = log.entry('gce_instance', {
* instance: 'my_instance'
* });
*
* log.write(entry, (err, apiResponse) => {
* if (!err) {
* // The log entry was written.
* }
* });
*
* //-
* // You may also pass multiple log entries to write.
* //-
* const secondEntry = log.entry('compute.googleapis.com', {
* user: 'my_username'
* });
*
* log.write([
* entry,
* secondEntry
* ], (err, apiResponse) => {
* if (!err) {
* // The log entries were written.
* }
* });
*
* //-
* // To save some steps, you can also pass in plain values as your entries.
* // Note, however, that you must provide a configuration object to specify
* // the resource.
* //-
* const entries = [
* {
* user: 'my_username'
* },
* {
* home: process.env.HOME
* }
* ];
*
* const options = {
* resource: 'compute.googleapis.com'
* };
*
* log.write(entries, options, (err, apiResponse) => {});
*
* //-
* // If the callback is omitted, we'll return a Promise.
* //-
* log.write(entries).then(data => {
* const apiResponse = data[0];
* });
*
* @example <caption>include:samples/logs.js</caption>
* region_tag:logging_write_log_entry
* Another example:
*
* @example <caption>include:samples/logs.js</caption>
* region_tag:logging_write_log_entry_advanced
* Another example:
*/
write(entry: Entry | Entry[], options?: WriteOptions): Promise<ApiResponse>;
write(
entry: Entry | Entry[],
options: WriteOptions,
callback: ApiResponseCallback
): void;
write(entry: Entry | Entry[], callback: ApiResponseCallback): void;
async write(
entry: Entry | Entry[],
opts?: WriteOptions | ApiResponseCallback
): Promise<ApiResponse> {

See TypeScript issues:

A workaround is to move the jsdoc comment adjacent to the concrete method, and after the overload signatures.

@product-auto-label product-auto-label bot added the api: logging Issues related to the googleapis/nodejs-logging API. label Feb 25, 2020
@zamnuts zamnuts added the type: docs Improvement to the documentation for an API. label Feb 25, 2020
@laljikanjareeya
Copy link
Contributor

@zamnuts Thanks for catching it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the googleapis/nodejs-logging API. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants