1

I´m generating my DTO classes using swagger codegen and I want to avoid a concrete import. Is it possible? Maybe using regex someway? This is my mustage template :

{{#imports}}
import {{import}};
{{/imports}}
juanmorschrott
  • 573
  • 5
  • 25
  • Lambdas, in particulary 'decompile', could help you do this https://github.com/samskivert/jmustache#lambdas and you have '{{-first}}' and '{{-last}}' but, in general, the idea is for it to be logic-less http://stackoverflow.com/questions/20345288/check-with-mustache-js-if-parameter-is-a-specific-value – moondaisy Apr 11 '17 at 14:28
  • Or maybe using `--import-mappings my.import.i.dont.want=false` to change the import you don't want for a `false` and then use `{{#import}}` (or maybe `{{#this}}`) and if the value is `false` not importing it. I haven't tried this myself but it might work . – moondaisy Apr 11 '17 at 14:48

0 Answers0