1

im creating the pojo using the plugin. in pojo on top of class name i want to print the class name in lowercase without modifying the swagger.

i have found that we can apply mustache lambda to do so in below link but its not working https://gitlab.supercharge.io/misc/openapi-generator-sc/-/blob/40e7c46521f77613ad9a6f77f40fcbba23c53c54/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/LowercaseLambda.java

            <groupId>io.swagger</groupId>
            <artifactId>swagger-codegen-maven-plugin</artifactId>
              <version>2.4.13</version>
            <executions>
                <execution>
                    <id>generate-swagger-norhtbound</id>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                    <configuration>
                        <inputSpec>${northbound.yaml.file}</inputSpec>
                        <templateDirectory>${template.dir.path}</templateDirectory>
                        <additionalProperties>
                          <additionalProperty>lowercase=new LowercaseLambda()</additionalProperty>
                          </additionalProperties>
                        <language>spring</language>
                        <configOptions>
                            <java8>true</java8>
                            <interfaceOnly>true</interfaceOnly>
                            <sourceFolder>./</sourceFolder>
                         
                        </configOptions>
                        <modelPackage>${project.groupId}.entity.swagger.nb.model</modelPackage>
                        <output>target/generated-sources</output>
                        <addCompileSourceRoot>false</addCompileSourceRoot>
                        <generateApis>false</generateApis>
                        <generateApiTests>false</generateApiTests>
                        <generateApiDocumentation>false</generateApiDocumentation>
                        <generateSupportingFiles>false</generateSupportingFiles>
                        <enableBuilderSupport>true</enableBuilderSupport>
                    </configuration>
                </execution>
            </executions>

in pojo.mustache template , have added below line

{{#lambda.lowercase}}CAPITAL{{/lambda.lowercase}}

but its not printing anything due to this lambda tag.

0 Answers0