swagger-api / swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
http://swagger.io
Apache License 2.0
16.94k stars 6.03k forks source link

[Spring][maven-plugin] templateDirectory attribute does not work. #4936

Open gokhansari opened 7 years ago

gokhansari commented 7 years ago
Description

<templateDirectory> attribute does not work. Instead of my templates, plugin uses default templates. This attribute was working on on 2.2.1.

Swagger-codegen version

2.2.2

Steps to reproduce

Just change version of the plugin from 2.2.1 to 2.2.2, leave the rest same.

JohannesProbst commented 2 years ago

This issue still also exists on version 3.0.27 of the codegen maven-plugin for language spring on windows 11 os.

JohannesProbst commented 2 years ago

This issue seems to be resolved on version 3.0.29 of the codegen maven-plugin for language spring

JohannesProbst commented 2 years ago

Correction: it works for pojo.mustache but not for api.mustache. On api.mustache i get a FileNotFoundException where it (URLTemplateLoader of handlebars-4.1.2.jar) prefixes the correct resolved absolute path with /handlebars/JavaSpring/ and corrupts it so.