diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java index c46875f9fb4..0cbe902cabd 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenOperation.java @@ -207,7 +207,7 @@ public class CodegenOperation { * returns a map where the key is the request body content type and the value is the current CodegenOperation * this is needed by templates when a different signature is needed for each request body content type */ - public Map getContentTypeToOperation() { + public Map contentTypeToOperation() { LinkedHashMap contentTypeToOperation = new LinkedHashMap<>(); if (bodyParam == null) { return null; diff --git a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars index ef06ac56f4b..2ddc2e3042b 100644 --- a/modules/openapi-generator/src/main/resources/python/endpoint.handlebars +++ b/modules/openapi-generator/src/main/resources/python/endpoint.handlebars @@ -234,7 +234,7 @@ _all_accept_content_types = ( class BaseApi(api_client.Api): {{#if bodyParam}} - {{#each getContentTypeToOperation}} + {{#each contentTypeToOperation}} {{> endpoint_args_baseapi_wrapper contentType=@key this=this}} {{/each}} @@ -406,7 +406,7 @@ class {{operationIdCamelCase}}(BaseApi): # this class is used by api classes that refer to endpoints with operationId fn names {{#if bodyParam}} - {{#each getContentTypeToOperation}} + {{#each contentTypeToOperation}} {{> endpoint_args_operationid_wrapper contentType=@key this=this}} {{/each}} @@ -437,7 +437,7 @@ class ApiFor{{httpMethod}}(BaseApi): # this class is used by api classes that refer to endpoints by path and http method names {{#if bodyParam}} - {{#each getContentTypeToOperation}} + {{#each contentTypeToOperation}} {{> endpoint_args_httpmethod_wrapper contentType=@key this=this}} {{/each}}