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

docs: Configuration objects do not show inner properties #2783

Closed
stephenplusplus opened this issue Dec 22, 2017 · 13 comments
Closed

docs: Configuration objects do not show inner properties #2783

stephenplusplus opened this issue Dec 22, 2017 · 13 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. status: blocked Resolving the issue is dependent on other work. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@stephenplusplus
Copy link
Contributor

Copied from original issue: googleapis/nodejs-storage#75

@jmdobry
November 1, 2017 4:41 PM

The options are documented in the source code, but for some reason don't show up on cloud.google.com

@stephenplusplus stephenplusplus added docs priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Dec 22, 2017
@stephenplusplus
Copy link
Contributor Author

November 1, 2017 4:44 PM

That seems to be the case for all methods on Bucket. I don't know the spec on this, but maybe marking options as optional is enough, and it would be implied that options.* is optional. In diff:

 * @param {object} [options] Configuration options.
- * @param {string|File} [options.destination] The place to save
+ * @param {string|File} options.destination The place to save

@stephenplusplus
Copy link
Contributor Author

@jmdobry
November 1, 2017 5:16 PM

I don't think that's the problem. When you run npm run docs locally and it uses the docstrap template, these options all show up fine in the generated docs. But when we generate the docs using our custom template on cloud.google.com, the options are missing. It must be a problem with the template we use on cloud.google.com.

@stephenplusplus
Copy link
Contributor Author

December 19, 2017 6:04 PM

Does another team need to take a look into why these aren't showing up?

@stephenplusplus stephenplusplus changed the title Bucket#upload() options don't show up in documentation docs: Configuration objects do not show inner properties Dec 22, 2017
@stephenplusplus
Copy link
Contributor Author

stephenplusplus commented Dec 22, 2017

This popped up in another issue: googleapis/nodejs-firestore#91

This issue affects all of our APIs. None of the nested properties of an object are documented. For any given method, the user can only see that an "options" object is required, but none of the properties that must be specified within it.

For example, see the Firestore constructor. You must use the examples to deduce the correct way to authenticate the client. This pattern repeats for all methods, and we usually don't show all possible configuration options in the example block, since that would be overwhelming.

@alexander-fenster @jmdobry - who can take a look at this?

@jmdobry
Copy link
Contributor

jmdobry commented Dec 23, 2017

It appears to be an issue with our documentation generator.

@stephenplusplus
Copy link
Contributor Author

What can we do?

@jmdobry
Copy link
Contributor

jmdobry commented Dec 27, 2017

@hegemonic and I need to look at hegemonic/jsdoc-baseline and figure out why the nested properties on params aren't showing up.

@stephenplusplus stephenplusplus added the status: blocked Resolving the issue is dependent on other work. label Dec 27, 2017
@stephenplusplus
Copy link
Contributor Author

Already reported, it looks like: hegemonic/jsdoc-baseline#185

@hegemonic
Copy link
Contributor

I've made a note to look into this, but I probably won't have time until next week. @jmdobry, if you have time to investigate now, please feel free to take this issue.

@stephenplusplus
Copy link
Contributor Author

ping @alexander-fenster this seems pretty important :)

@hegemonic
Copy link
Contributor

FYI, hegemonic/jsdoc-baseline#185 is now fixed (thanks, @jmdobry!).

@jmdobry
Copy link
Contributor

jmdobry commented Mar 29, 2018

I've republished all the API ref docs for all the latest versions of our Node.js Cloud client libraries

@stephenplusplus
Copy link
Contributor Author

It looks great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. status: blocked Resolving the issue is dependent on other work. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants