Skip to content

Commit

Permalink
Add deprecation info as comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Beppe Catanese committed Oct 15, 2024
1 parent 1d7cca6 commit d3d59b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions templates/api-small.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ class Adyen{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}Api(AdyenSer
def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}(self, {{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/requiredParams}}idempotency_key=None, **kwargs):
"""
{{{summary}}}{{^summary}}{{operationId}}{{/summary}}
{{#isDeprecated}}

Deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}}
{{{.}}}{{/vendorExtensions.x-deprecatedMessage}}
{{/isDeprecated}}
"""
endpoint = self.baseUrl + f"{{{path}}}"
method = "{{httpMethod}}"
Expand Down
5 changes: 5 additions & 0 deletions templates/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ class {{classname}}(AdyenServiceBase):
def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}(self, {{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/isQueryParam}}{{/requiredParams}}idempotency_key=None, **kwargs):
"""
{{{summary}}}{{^summary}}{{operationId}}{{/summary}}
{{#isDeprecated}}

Deprecated {{#vendorExtensions.x-deprecatedInVersion}}since {{#appName}}{{{.}}}{{/appName}} v{{.}}{{/vendorExtensions.x-deprecatedInVersion}}{{#vendorExtensions.x-deprecatedMessage}}
{{{.}}}{{/vendorExtensions.x-deprecatedMessage}}
{{/isDeprecated}}
"""
endpoint = self.baseUrl + f"{{{path}}}"
method = "{{httpMethod}}"
Expand Down

0 comments on commit d3d59b3

Please sign in to comment.