This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git

commit 5939135abfa635b001e03ee81321c75a1f20b9c7
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Wed Sep 13 16:17:09 2023 -0400

    Issue with Java code generator for #885
---
 karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts 
b/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts
index 4c0c3335..86353a30 100644
--- a/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts
+++ b/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts
@@ -213,7 +213,8 @@ export class ProjectService {
             KaravanApi.getTemplatesFiles((files: ProjectFile[]) => {
                 files.filter(f => f.name.endsWith('java'))
                     .forEach(f => {
-                        TemplateApi.saveTemplate(f.name, f.code);
+                        const name = f.name.replace(".java", '');
+                        TemplateApi.saveTemplate(name, f.code);
                     })
             });
         });

Reply via email to