Skip to content

Improve ngdoc for params and returns. - #7

Merged
bajtos merged 1 commit into
masterfrom
feature/better-returns-description-in-ngdoc
Feb 3, 2014
Merged

bajtos merged 1 commit into
masterfrom
feature/better-returns-description-in-ngdoc

Conversation

@bajtos

@bajtos bajtos commented Jan 30, 2014

Copy link
Copy Markdown
Member

Split accepts arguments into parameters and postData for POST/PUT requests.

When returns is a single root argument, include its description in the @return comment.

Fix indentation where it was not consistent and/or caused different markdown output than intended.

These changes should improve the documentation of User.login, especially after strongloop/loopback#163.

/to @ritch please review.

The diffs of the code-gen template are rather difficult to read. Suggestions on how to make the template easier to read are very welcome.

Comment thread lib/services.template Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You must supply an empty object? I guess this could be a bit more explicit.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The argument is optional (as described by {Object=}), so you can omit it.

I have improved the description, see the new fixup commit.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For the record: postData has similar description. However, it is a required argument, so the user must supply the value, even if it is {}. At least according to Angular docs, I didn't check sources.

@ritch

ritch commented Feb 3, 2014

Copy link
Copy Markdown
Member

👍

Split `accepts` arguments into `parameters` and `postData` for
POST/PUT
request.

When `returns` is a single root argument, include its description
in the @return comment.

Fix indentation where it was not consistent and/or caused different
markdown output than intended.
bajtos added a commit that referenced this pull request Feb 3, 2014
…ion-in-ngdoc

Improve ngdoc for params and returns.
@bajtos
bajtos merged commit c6cef3a into master Feb 3, 2014
@bajtos
bajtos deleted the feature/better-returns-description-in-ngdoc branch February 3, 2014 16:50
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.

2 participants