src/main/java/com/kobylynskyi/graphql/codegen/mapper/EnumDefinitionToDataModelMapper.java
/**
     * Map field definition to a Freemarker data model
     *
     * @param mappingContext Global mapping context
     * @param definition     Definition of enum type including base definition and its extensions
     * @return Freemarker data model of the GraphQL enum
     */
Map field definition to a Freemarker data model
@param mappingContext Global mapping context
@param definition     Definition of enum type including base definition and its extensions
@return Freemarker data model of the GraphQL enum
Map field definition to a Freemarker data model @param mappingContext Global mapping context @param definition Definition of enum type including base definition and its extensions @return Freemarker data model of the GraphQL enum
public Map<String, Object> map(MappingContext mappingContext, ExtendedEnumTypeDefinition definition) {
        Map<String, Object> dataModel = new HashMap<>();
        dataModel.put(PACKAGE, DataModelMapper.getModelPackageName(mappingContext));
        dataModel.put(CLASS_NAME, dataModelMapper.getModelClassNameWithPrefixAndSuffix(mappingContext, definition));
        dataModel.put(IMPLEMENTS, getUnionInterfaces(mappingContext, definition));
        dataModel.put(ANNOTATIONS, graphQLTypeMapper.getAnnotations(mappingContext, definition));
        dataModel.put(JAVA_DOC, definition.getJavaDoc());
        dataModel.put(FIELDS, map(mappingContext, definition.getValueDefinitions()));
        dataModel.put(GENERATED_INFO, mappingContext.getGeneratedInformation());
        return dataModel;
    }
public Map < String , Object > map ( MappingContext mappingContext , ExtendedEnumTypeDefinition definition ) { Map < String , Object > dataModel = new HashMap < > ( ) ; dataModel . put ( PACKAGE , DataModelMapper . getModelPackageName ( mappingContext ) ) ; dataModel . put ( CLASS_NAME , dataModelMapper . getModelClassNameWithPrefixAndSuffix ( mappingContext , definition ) ) ; dataModel . put ( IMPLEMENTS , getUnionInterfaces ( mappingContext , definition ) ) ; dataModel . put ( ANNOTATIONS , graphQLTypeMapper . getAnnotations ( mappingContext , definition ) ) ; dataModel . put ( JAVA_DOC , definition . getJavaDoc ( ) ) ; dataModel . put ( FIELDS , map ( mappingContext , definition . getValueDefinitions ( ) ) ) ; dataModel . put ( GENERATED_INFO , mappingContext . getGeneratedInformation ( ) ) ; return dataModel ; }
Map field definition to a Freemarker data model
 @param mappingContext Global mapping context
 @param definition     Definition of enum type including base definition and its extensions
 @return Freemarker data model of the GraphQL enum
Map field definition to a Freemarker data model @param mappingContext Global mapping context @param definition Definition of enum type including base definition and its extensions @return Freemarker data model of the GraphQL enum
// type/enum/input/interface/union classes do not require any imports