From a99c58011ad3bead49f438e9f142f0e7996a42b9 Mon Sep 17 00:00:00 2001 From: julien Lengrand-Lambert Date: Tue, 27 Dec 2022 09:39:42 +0100 Subject: [PATCH] Add JsonIgnore annotation to avoid debugSupportingFiles creating heap space issues (#14298) * Updates Codegen operation to ignore debugSupportingFiles * Removes JsonIgnore annotation and rename method instead * Remove unused import --- .../java/org/openapitools/codegen/CodegenOperation.java | 2 +- .../src/main/resources/python/endpoint.handlebars | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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}}