-
-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
bugSomething isn't workingSomething isn't workinggood-first-issueGood for newcomersGood for newcomers
Milestone
Description
Issue Description
With options
<generateJacksonTypeIdResolver>true</generateJacksonTypeIdResolver>
<modelNameSuffix>TO</modelNameSuffix>
and without model name prefix generated GraphqlJacksonTypeIdResolver does not have suffix:
@Override
public JavaType typeFromId(DatabindContext context, String typename) {
try {
Class<?> clazz = Class.forName(
"io.github.kobylynskyi.product.graphql.model." +
typename
);
return context.constructSpecializedType(superType, clazz);
} catch (ClassNotFoundException e) {
System.err.println(e.getMessage());
return null;
}
}
Steps to Reproduce
- Include options generateJacksonTypeIdResolver, modelNameSuffix and exclude modelNamePrefix from configuration.
- Generate files
Expected Result
Suffix is added to GraphqlJacksonTypeIdResolver.typeFromId()
Actual Result
Suffix is not added to GraphqlJacksonTypeIdResolver.typeFromId(), class could not be found
Your Environment and Setup
- graphql-java-codegen version: 5.3.0
- Build tool: maven
- Mapping Config: graphql-codegen-maven-plugin-example-client
<configuration>
<graphqlSchemas>
<includePattern>schema-product-service\.graphqls</includePattern>
</graphqlSchemas>
<outputDir>${project.build.directory}/generated-sources/client</outputDir>
<modelPackageName>io.github.kobylynskyi.product.graphql.model</modelPackageName>
<customTypesMapping>
<DateTime>java.util.Date</DateTime>
<!-- Following code can be used to generate boxed types instead of primitives:
<property>
<name>Int!</name>
<value>Integer</value>
</property>
-->
</customTypesMapping>
<modelNameSuffix>TO</modelNameSuffix>
<generateApis>false</generateApis>
<generateClient>true</generateClient>
<generateParameterizedFieldsResolvers>false</generateParameterizedFieldsResolvers>
<generateJacksonTypeIdResolver>true</generateJacksonTypeIdResolver>
</configuration>Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood-first-issueGood for newcomersGood for newcomers