Skip to content

Commit e355440

Browse files
authored
Code generation: add comments and deprecation note (#277)
* Generate comments and deprecation info * Generate comments and deprecation info * Generate comments and deprecation info * Run codeql on cronjob
1 parent d983811 commit e355440

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

.github/workflows/codeql.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: "CodeQL"
22

33
on:
4-
push:
5-
branches: [ "main" ]
6-
pull_request:
7-
branches: [ "main" ]
84
schedule:
95
- cron: "40 12 * * 0"
106

templates/api-single.mustache

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ require_relative '{{serviceName}}/{{#lambda.snakecase}}{{classname}}{{/lambda.sn
55
{{/apiInfo}}
66

77
module Adyen
8+
9+
# NOTE: This class is auto generated by OpenAPI Generator
10+
# Ref: https://openapi-generator.tech
11+
#
12+
# Do not edit the class manually.
813
class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}
914
attr_accessor :service, :version
1015

templates/api-small.mustache

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
require_relative './service'
22
module Adyen
33
{{#operations}}
4+
5+
# NOTE: This class is auto generated by OpenAPI Generator
6+
# Ref: https://openapi-generator.tech
7+
#
8+
# Do not edit the class manually.
49
class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}} < Service
510
attr_accessor :service, :version
611

@@ -10,6 +15,10 @@ module Adyen
1015
end
1116

1217
{{#operation}}
18+
# {{{summary}}}{{^summary}}{{operationId}}{{/summary}}{{#isDeprecated}}
19+
#
20+
# Deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}}
21+
# {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}{{/isDeprecated}}
1322
def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}({{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.snakecase}}{{paramName}}{{/lambda.snakecase}}, {{/isQueryParam}}{{/requiredParams}}headers: {}{{#queryParams}}{{#-first}}, query_params: {}{{/-first}}{{/queryParams}})
1423
endpoint = '{{path}}'.gsub(/{.+?}/, '%s')
1524
endpoint = endpoint.gsub(%r{^/}, '')

templates/api.mustache

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
require_relative '../service'
22
module Adyen
33
{{#operations}}
4+
5+
# NOTE: This class is auto generated by OpenAPI Generator
6+
# Ref: https://openapi-generator.tech
7+
#
8+
# Do not edit the class manually.
49
class {{classname}} < Service
510
attr_accessor :service, :version
611

@@ -9,6 +14,10 @@ module Adyen
914
end
1015

1116
{{#operation}}
17+
# {{{summary}}}{{^summary}}{{operationId}}{{/summary}}{{#isDeprecated}}
18+
#
19+
# Deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}}
20+
# {{{.}}}{{/vendorExtensions.x-deprecatedMessage}}{{/isDeprecated}}
1221
def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}({{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.snakecase}}{{paramName}}{{/lambda.snakecase}}, {{/isQueryParam}}{{/requiredParams}}headers: {}{{#queryParams}}{{#-first}}, query_params: {}{{/-first}}{{/queryParams}})
1322
endpoint = '{{path}}'.gsub(/{.+?}/, '%s')
1423
endpoint = endpoint.gsub(%r{^/}, '')

0 commit comments

Comments
 (0)