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

Datasource documentation tune-up #1333

Merged
merged 1 commit into from
Apr 25, 2017
Merged

Datasource documentation tune-up #1333

merged 1 commit into from
Apr 25, 2017

Conversation

kjdelisle
Copy link
Contributor

@kjdelisle kjdelisle changed the title wip - datasource documentation tune-up WIP - DO NOT MERGE - datasource documentation tune-up Apr 18, 2017
@kjdelisle kjdelisle self-assigned this Apr 18, 2017
@kjdelisle kjdelisle force-pushed the api-doc-refactor branch 2 times, most recently from 6ef1988 to 9f8648c Compare April 20, 2017 18:47
@kjdelisle
Copy link
Contributor Author

@raymondfeng When you're feeling better, please take a look at the comments marked XXX(kev); Most of them are questions for your clarification.

Once this portion is complete, I'll move onto tuning up the corresponding juggler documentation in loopback.io

* @param callback
* @returns {Promise}
* @emits connect
Copy link
Contributor

Choose a reason for hiding this comment

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

The event name is connected.

* Define relations for the model class from the relations object
* @param modelClass
* @param relations
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC, we intentionally use /*! to not expose this method to generated API references.

@@ -731,23 +745,35 @@ DataSource.prototype.mixin = function(ModelCtor) {
};

/**
* See ModelBuilder.getModel
*
* // XXX(kev): Deprecation notice for 4.x?
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to use a generic tag, such as // REVIEW or // FIXME?

@loay loay force-pushed the api-doc-refactor branch 2 times, most recently from fcc7257 to 47497f3 Compare April 25, 2017 17:56
@@ -949,7 +990,7 @@ DataSource.prototype.autoupdate = function(models, cb) {
* @property {Boolean} views If true, include views; if false, only tables.
* @property {Number} limit Page size
* @property {Number} offset Starting index
*
* @returns {Model[]}
Copy link
Contributor

Choose a reason for hiding this comment

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

We should use ModelDefinition[] to differentiate from Model which is for the mode class.

* The synchronous version of discoverModelDefinitions.
* @options {Object} options The options
* @property {Boolean} all If true, discover all models; if false, discover only models owned by the current user.
* @property {Boolean} views If true, nclude views; if false, only tables.
* @property {Number} limit Page size
* @property {Number} offset Starting index
* @returns {*}
* @returns {Model[]}
Copy link
Contributor

Choose a reason for hiding this comment

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

ModelDefinition[]

@kjdelisle
Copy link
Contributor Author

@loay Don't forget to squash and rename the commits to remove "wip"

@loay loay changed the title WIP - DO NOT MERGE - datasource documentation tune-up Datasource documentation tune-up Apr 25, 2017
Copy link
Contributor

@raymondfeng raymondfeng left a comment

Choose a reason for hiding this comment

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

LGTM

@loay loay merged commit bf7ea4c into master Apr 25, 2017
@loay loay deleted the api-doc-refactor branch April 25, 2017 20:28
@loay loay removed the #review label Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants