Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-1472

Let modules define a default value for --inputType option

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Done
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: M7
    • Component/s: Configuration
    • Labels:
      None
    • Story Points:
      4
    • Rank (Obsolete):
      546
    • Sprint:
      Sprint 27

      Description

      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: [or[email protected]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]]]]

        Attachments

          Activity

            People

            Assignee:
            dturanski David Turanski
            Reporter:
            prietzler Peter Rietzler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: