Project: springxd
Issue XD-1472: Let modules define a default value for --inputType option
If a module e.g. always expects the payload of the message to be of a certain java type if would be good for documentation and convenience reasons in order to specify a default value for the --inputType option. documentation = output for module info convenience = we could e.g. support to always accept a Json payload (or automatic message payload conversion once it is extensible) currently, adding options.inputType.default to the module's property file has no effect I've also tried to "redefine" it using options.inputType.description This leads to the following exception: Command failed org.springframework.xd.rest.client.impl.SpringXDException: Module option named 'outputType' is present in several delegates: [org.springframework.xd.module.options.SimpleModuleOptionsMetadata@3c1d635a, FlattenedCompositeModuleOptionsMetadata [outputType] => PojoModuleOptionsMetadata backed by class org.springframework.xd.dirt.plugins.stream.ModuleTypeConversionPluginMetadataResolver$OutputOptionsMetadata, defining options [[ModuleOption [name=outputType, type=class org.springframework.util.MimeType, defaultValue=null, description=how this module should emit messages it produces]]] [inputType] => PojoModuleOptionsMetadata backed by class org.springframework.xd.dirt.plugins.stream.ModuleTypeConversionPluginMetadataResolver$InputOptionsMetadata, defining options [[ModuleOption [name=inputType, type=class org.springframework.util.MimeType, defaultValue=null, description=how this module should interpret messages it consumes]]]]
Story points: 4