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

Update and fix JSDocs related to JobsManager #469

Merged
merged 8 commits into from
Mar 6, 2020

Conversation

orangain
Copy link
Contributor

@orangain orangain commented Mar 6, 2020

Changes

  • Update the JSDoc of ManagementClient#importUsers in conformance with that of JobsManager#importUsers.
  • Fix wrong method name get in the JSDoc of JobsManager#errors.

Checklist

@orangain orangain requested a review from a team March 6, 2020 14:00
*
* @method importUsers
* @memberOf module:management.ManagementClient.prototype
*
* @example
* var params = {
* connection_id: '{CONNECTION_ID}',
* users: '{PATH_TO_USERS_FILE}'
* users: '{PATH_TO_USERS_FILE}',
* upsert: true, //optional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd remove these optional properties from the sample snippet and keep them in the params docs below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by 405cc51. I also wrote about users_json as an alternative in 0cb767d.

* @param {String} data.connectionId Connection for the users insertion.
* @param {String} data.users Path to the users data file.
* @param {String} data.users_json JSON data for the users.
* @param {String} data.upsert OPTIONAL: set to true to upsert users, defaults to false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the way you tell a property is optional in JSDocs is using [] (see cb below for an example). Should look like this

  • [data.users_json] -> Whether to update users if they already exist (true) or to ignore them (false).
  • [data.upsert] -> Whether to send a completion email to all tenant owners when the job is finished (true) or not (false).

See that I changed the description of those params and also removed the default values, as those are not present in the official docs at least.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by f0b7a2c and 52d4024.

Though I removed the default values as you say, I believe they should be described in the document. This is because the default values are determined by the library's implementation, not by the official API.

Copy link
Contributor

@lbalmaceda lbalmaceda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!!

@orangain
Copy link
Contributor Author

orangain commented Mar 6, 2020

@lbalmaceda Thank you for the quick review! Note that I've fixed some existing problems (
af828e6, 0302ae8) outside of your suggestion.

@lbalmaceda lbalmaceda merged commit 4235906 into auth0:master Mar 6, 2020
@lbalmaceda
Copy link
Contributor

Yes, I saw that. Thanks :)

@davidpatrick davidpatrick added this to the v2.24.0 milestone Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants