Comment for client function#469
Conversation
63a50c6 to
b28b2e4
Compare
d3d84bd to
65d787e
Compare
| {% if op.summary -%} | ||
| # @summary {{ op.summary }} | ||
| {% endif -%} |
There was a problem hiding this comment.
@summary doesn't exist, and op.summary is rarely used. This change deletes this.
| # @param from [String] Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 | ||
| # @param to [String] End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 |
There was a problem hiding this comment.
@param name [type] description: https://rubydoc.info/gems/yard/file/docs/GettingStarted.md
| # @return [Array(String(nilable), Integer, Hash{String => String})] when HTTP status code is 200 | ||
| # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 400 | ||
| # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 403 | ||
| # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 409 | ||
| # @return [Array(Line::Bot::V2::MessagingApi::ErrorResponse, Integer, Hash{String => String})] when HTTP status code is 429 |
There was a problem hiding this comment.
It's somewhat redundant, but I thought it's better than nothing.
65d787e to
e0b8d1d
Compare
NO-ISSUE template NO-ISSUE teamplte NO-ISSUE template NO-ISSUE template NO-ISSUE template
NO-ISSUE gen NO-ISSUE gen NO-ISSUE gen NO-ISSUE gen
e0b8d1d to
de5d9b4
Compare
| end | ||
|
|
||
| # Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID). | ||
| # This requests to <code>GET https://api.line.me/v2/bot/insight/demographic</code> |
There was a problem hiding this comment.
Without the <code> or <tt> tags, YRAD fails to interpret brackets like { in parts of a URL, such as in https://hoge/{userId}. I tried several escapes and tags, but they didn't work. As a workaround, this change uses HTML tags to prevent { from being interpreted as part of a URL. Since <code>GET https://api.line.me/v2/bot/insight/demographic</code> is simply a comment directed at the user and the URL doesn't lead anywhere meaningful, I believe this solution is sufficient.
| - run: bundle install | ||
| - run: bundle exec rubocop | ||
| - run: bundle exec rspec | ||
| - run: bundle exec yard stats ./lib/line/bot/v2 --fail-on-warning |
There was a problem hiding this comment.
Since some YARD errors can be detected this way, let's add it to the CI.
| - Ask a question using [the issue tracker](https://github.com/line/line-bot-sdk-ruby/issues). | ||
| - Contribute your work by sending [a pull request](https://github.com/line/line-bot-sdk-ruby/pulls). | ||
|
|
||
| ## Development |
There was a problem hiding this comment.
(We should also address the OpenAPI code generator, but for this PR, it is considered out of scope.)
| # | ||
| # @param start Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all basic information about the bots in one request, include this parameter to get the remaining array. | ||
| # @param limit Specify the maximum number of bots that you get basic information from. The default value is 100. Max value: 100 | ||
| # @param start [String, nil] Value of the continuation token found in the next property of the JSON object returned in the response. If you can't get all basic information about the bots in one request, include this parameter to get the remaining array. |
There was a problem hiding this comment.
mokuzon
left a comment
There was a problem hiding this comment.
The @return type in *_with_http_info is wrong, please check!
| # This requests to <code>GET https://api.line.me/v2/bot/insight/demographic</code> | ||
| # | ||
| # @see https://developers.line.biz/en/reference/messaging-api/#get-demographic | ||
| # @return [response body, response status code, and response headers] |
There was a problem hiding this comment.
This is an incorrect description of YARD.
There was a problem hiding this comment.
This was intentional. Currently, these are being packed into an Array, but it's not understandable unless you read the code, so I thought it should be commented.
(WIP) depends on the previous PR #469 This change provides YARD with sufficient information about the models(classes). Many of the comments created are the same as the types in RBS, as well as existing descriptions and variable names. Since YARD uses a different notation than RBS, you can consider this as an adaptation to that notation, and there should be almost no issues.
This change adds comments for the functions that each client has for YARD and IDE purposes.
Since YARD seems to report errors if the comments are incorrect, This change also ensures that the command is executed in the CI job.