Skip to content

Commit da44c44

Browse files
authored
Move comments to the appropriate location (#438)
Comments are helpful when placed above the class in IDEs or with YARD.
1 parent d6edbdf commit da44c44

File tree

382 files changed

+487
-481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

382 files changed

+487
-481
lines changed

generator/src/main/resources/line-bot-sdk-ruby-generator/model.pebble

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,20 @@
66
{% if model.model.parent != null %}
77
require_relative './{{ model.model.parent | underscore }}'
88
{% endif -%}
9-
{% if model.model.description != null %}
10-
# {{ model.model.description }}{% endif %}{% if model.model.externalDocumentation.description != null %}
11-
# {{ model.model.externalDocumentation.description }}{% endif %}{% if model.model.externalDocumentation.url != null %}
12-
# @see {{ model.model.externalDocumentation.url }}{% endif %}
9+
{{ "" | raw }}{# To break line #}
1310
module Line
1411
module Bot
1512
module V2
1613
module {{ packageName | camelize }}
14+
{% if model.model.description != null -%}
15+
# {{ model.model.description }}
16+
{% endif -%}
17+
{% if model.model.externalDocumentation.description != null -%}
18+
# {{ model.model.externalDocumentation.description }}
19+
{% endif -%}
20+
{% if model.model.externalDocumentation.url != null -%}
21+
# @see {{ model.model.externalDocumentation.url }}
22+
{% endif -%}
1723
class {{ model.model.classname }}{% if model.model.parent != null %} < {{ model.model.parent }}{% endif %}
1824
{%- for property in model.model.vars %}
1925
{% if model.model.vendorExtensions.get("x-selector").propertyName != property.name %}attr_accessor{% else %}attr_reader{% endif %} :{{ property.name }}{% if property.description != null %} # {{ property.description }}{% endif %}

generator/src/main/resources/line-bot-sdk-ruby-rbs-generator/model.pebble

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
{# @pebvariable name="packageName" type="String" #}
33
{%- for model in models -%}
44
{% include "./license.pebble" %}
5-
{% if model.model.description != null -%}
6-
# {{ model.model.description }}
7-
{% endif -%}
8-
{% if model.model.externalDocumentation.description != null -%}
9-
# {{ model.model.externalDocumentation.description }}
10-
{% endif -%}
11-
{% if model.model.externalDocumentation.url != null -%}
12-
# @see {{ model.model.externalDocumentation.url }}
13-
{% endif -%}
145
module Line
156
module Bot
167
module V2
178
module {{ packageName | camelize }}
9+
{% if model.model.description != null -%}
10+
# {{ model.model.description }}
11+
{% endif -%}
12+
{% if model.model.externalDocumentation.description != null -%}
13+
# {{ model.model.externalDocumentation.description }}
14+
{% endif -%}
15+
{% if model.model.externalDocumentation.url != null -%}
16+
# @see {{ model.model.externalDocumentation.url }}
17+
{% endif -%}
1818
class {{ model.model.classname }}{% if model.model.parent != null %} < {{ model.model.parent }}{% endif %}
1919
{% if not model.model.isEnum -%}
2020
{% for variable in model.model.vars -%}

lib/line/bot/v2/channel_access_token/model/channel_access_token_key_ids_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# Channel access token key IDs
11-
# @see https://developers.line.biz/en/reference/messaging-api/#get-all-valid-channel-access-token-key-ids-v2-1
1210
module Line
1311
module Bot
1412
module V2
1513
module ChannelAccessToken
14+
# Channel access token key IDs
15+
# @see https://developers.line.biz/en/reference/messaging-api/#get-all-valid-channel-access-token-key-ids-v2-1
1616
class ChannelAccessTokenKeyIdsResponse
1717
attr_accessor :kids # Array of channel access token key IDs.
1818

lib/line/bot/v2/channel_access_token/model/error_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# Error response of the Channel access token
1110
module Line
1211
module Bot
1312
module V2
1413
module ChannelAccessToken
14+
# Error response of the Channel access token
1515
class ErrorResponse
1616
attr_accessor :error # Error summary
1717
attr_accessor :error_description # Details of the error. Not returned in certain situations.

lib/line/bot/v2/channel_access_token/model/issue_channel_access_token_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# Issued channel access token
11-
# @see https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token-v2-1
1210
module Line
1311
module Bot
1412
module V2
1513
module ChannelAccessToken
14+
# Issued channel access token
15+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token-v2-1
1616
class IssueChannelAccessTokenResponse
1717
attr_accessor :access_token # Channel access token.
1818
attr_accessor :expires_in # Amount of time in seconds from issue to expiration of the channel access token

lib/line/bot/v2/channel_access_token/model/issue_short_lived_channel_access_token_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# Issued short-lived channel access token
11-
# @see https://developers.line.biz/en/reference/messaging-api/#issue-shortlived-channel-access-token
1210
module Line
1311
module Bot
1412
module V2
1513
module ChannelAccessToken
14+
# Issued short-lived channel access token
15+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-shortlived-channel-access-token
1616
class IssueShortLivedChannelAccessTokenResponse
1717
attr_accessor :access_token # A short-lived channel access token. Valid for 30 days. Note: Channel access tokens cannot be refreshed.
1818
attr_accessor :expires_in # Time until channel access token expires in seconds from time the token is issued.

lib/line/bot/v2/channel_access_token/model/issue_stateless_channel_access_token_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# Issued stateless channel access token
11-
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
1210
module Line
1311
module Bot
1412
module V2
1513
module ChannelAccessToken
14+
# Issued stateless channel access token
15+
# @see https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token
1616
class IssueStatelessChannelAccessTokenResponse
1717
attr_accessor :access_token # A stateless channel access token. The token is an opaque string which means its format is an implementation detail and the consumer of this token should never try to use the data parsed from the token.
1818
attr_accessor :expires_in # Duration in seconds after which the issued access token expires

lib/line/bot/v2/channel_access_token/model/verify_channel_access_token_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# Verification result
1110
module Line
1211
module Bot
1312
module V2
1413
module ChannelAccessToken
14+
# Verification result
1515
class VerifyChannelAccessTokenResponse
1616
attr_accessor :client_id # The channel ID for which the channel access token was issued.
1717
attr_accessor :expires_in # Number of seconds before the channel access token expires.

lib/line/bot/v2/insight/model/error_response.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# @see https://developers.line.biz/en/reference/messaging-api/#error-responses
1110
module Line
1211
module Bot
1312
module V2
1413
module Insight
14+
# @see https://developers.line.biz/en/reference/messaging-api/#error-responses
1515
class ErrorResponse
1616
attr_accessor :message # Message containing information about the error.
1717
attr_accessor :details # An array of error details. If the array is empty, this property will not be included in the response.

lib/line/bot/v2/insight/model/get_friends_demographics_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
# https://openapi-generator.tech
88
# Do not edit the class manually.
99

10-
# Get friend demographics
11-
# @see https://developers.line.biz/en/reference/messaging-api/#get-demographic
1210
module Line
1311
module Bot
1412
module V2
1513
module Insight
14+
# Get friend demographics
15+
# @see https://developers.line.biz/en/reference/messaging-api/#get-demographic
1616
class GetFriendsDemographicsResponse
1717
attr_accessor :available # true if friend demographic information is available.
1818
attr_accessor :genders # Percentage per gender.

0 commit comments

Comments
 (0)