File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
src/main/resources/templates/scala-lang Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -15,23 +15,37 @@ import com.kobylynskyi.graphql.codegen.model.graphql.GraphQLRequestSerializer
1515import java.util.Objects
1616</#if >
1717import scala.collection.JavaConverters._
18+ <#assign duplicateEnumImports = [ ] />
19+ <#assign enumImports = [ ] />
1820<#if fields?has_content >
1921 <#if enumImportItSelfInScala?has_content >
2022 <#list fields as field >
2123 <#list enumImportItSelfInScala as enum >
2224 <#if MapperUtil.isScalaCollection(field.type) >
2325 <#if enum == MapperUtil.getGenericParameter(field.type) >
24- import ${ enum} ._
26+ <# assign duplicateEnumImports = duplicateEnumImports + [ enum] />
2527 </#if >
2628 <#else >
2729 <#if enum == field.type >
28- import ${ enum} ._
30+ <# assign duplicateEnumImports = duplicateEnumImports + [ enum] />
2931 </#if >
3032 </#if >
3133 </#list >
3234 </#list >
3335 </#if >
3436</#if >
37+ <#if duplicateEnumImports?has_content >
38+ <#list duplicateEnumImports as duplicateEnumImport >
39+ <#if !enumImports?seq_contains(duplicateEnumImport) >
40+ <#assign enumImports = enumImports + [duplicateEnumImport ]>
41+ </#if >
42+ </#list >
43+ </#if >
44+ <#if enumImports?has_content >
45+ <#list enumImports as enumImport >
46+ import ${enumImport} ._
47+ </#list >
48+ </#if >
3549<#assign duplicateParentInterfaces = [ ] />
3650<#assign parentInterfaces = [ ] />
3751<#if fields?has_content >
You can’t perform that action at this time.
0 commit comments