-
Notifications
You must be signed in to change notification settings - Fork 249
Open
Description
I have a controller method like:
@RequestMapping(value = "/hello/{id}/world", method = RequestMethod.GET)
public ResponseEntity<GetResponse> getMethod(@PathVariable String id, @RequestParam(required = false) Set<String> queryParameter) {
return null;
}
I also have a custom type resolver:
public class CustomTypeProcessor implements TypeProcessor {
@Override
public Result processType(Type javaType, Context context) {
if(context.getTypeContext() != null){
if(javaType.getTypeName().startsWith("java.util.Set")){
System.out.println("Hello World");
}
}
return null;
}
}
I'm using Gradle build which looks like:
apply plugin: 'cz.habarta.typescript-generator'
apply plugin: 'java'
repositories {
mavenCentral()
}
dependencies {
compile "cz.habarta.typescript-generator:typescript-generator-core:2.33.956"
compile "cz.habarta.typescript-generator:typescript-generator-spring:2.33.956"
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath ("cz.habarta.typescript-generator:typescript-generator-gradle-plugin:2.33.956")
classpath ("cz.habarta.typescript-generator:typescript-generator-spring:2.33.956")
}
}
generateTypeScript {
jsonLibrary = 'jackson2'
classPatterns = [
'path.to.dto.**DTO',
'path.to.controllers.**'
]
outputFile = 'build/output.ts'
outputKind = 'global'
outputFileType = 'implementationFile'
mapClasses = 'asClasses'
mapEnum = 'asEnum'
nonConstEnums = true
optionalProperties = 'useLibraryDefinition'
scanSpringApplication = true
generateSpringApplicationClient = true
generateSpringApplicationInterface = true
customTypeProcessor = 'path.to.CustomTypeProcessor'
}
I noticed that CustomTypeProcessor
is triggered for all DTO fields but it's not triggered for any method arguments.
It would be really great if we could use custom processors to process method arguments as well.
Metadata
Metadata
Assignees
Labels
No labels