File tree Expand file tree Collapse file tree
modules/swagger-codegen/src/main/java/io/swagger/codegen Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import javax .annotation .Nullable ;
44import java .io .File ;
5+ import java .io .IOException ;
56import java .io .UnsupportedEncodingException ;
7+ import java .io .Writer ;
68import java .net .URLDecoder ;
79import java .nio .charset .StandardCharsets ;
810import java .util .*;
911import java .util .Map .Entry ;
1012import java .util .regex .Matcher ;
1113import java .util .regex .Pattern ;
1214
15+ import com .samskivert .mustache .Mustache ;
16+ import com .samskivert .mustache .Template ;
1317import io .swagger .models .properties .UntypedProperty ;
1418import org .apache .commons .lang3 .ObjectUtils ;
1519import org .apache .commons .lang3 .StringEscapeUtils ;
@@ -174,6 +178,13 @@ public void processOpts() {
174178 } else {
175179 setIgnoreImportMapping (defaultIgnoreImportMappingOption ());
176180 }
181+
182+ additionalProperties .put ("toLowerCase" , new Mustache .Lambda () {
183+ @ Override
184+ public void execute (Template .Fragment fragment , Writer writer ) throws IOException {
185+ writer .write (fragment .execute ().toLowerCase ());
186+ }
187+ });
177188 }
178189
179190 // override with any special post-processing for all models
You can’t perform that action at this time.
0 commit comments