From d0db2bc38b1cde0d20be6bcd5f7eb46cb0c2ea90 Mon Sep 17 00:00:00 2001 From: Hugo Mercado Date: Mon, 5 Feb 2024 12:19:19 -0500 Subject: [PATCH] allow custom codegen generator be loaded --- .../io/swagger/codegen/v3/config/CodegenConfigurator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/config/CodegenConfigurator.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/config/CodegenConfigurator.java index ce894922999..898a8034ace 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/config/CodegenConfigurator.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/config/CodegenConfigurator.java @@ -515,7 +515,7 @@ public ClientOptInput toClientOptInput() { setVerboseFlags(); setSystemProperties(); - CodegenConfig config = CodegenConfigLoader.forName(lang); + CodegenConfig config = loadCodegenConfig(); ClientOptInput input = new ClientOptInput(); Predicate urlMatcher = null; @@ -669,6 +669,10 @@ public ClientOptInput toClientOptInput() { return input; } + protected CodegenConfig loadCodegenConfig() { + return CodegenConfigLoader.forName(lang); + } + private ParseOptions buildParseOptions() { ParseOptions options = new ParseOptions(); options.setResolve(true);