Forum Discussion

kayla_akey's avatar
kayla_akey
New Contributor
6 years ago

Custom Snap Input Schema is null

Developing a custom snap that is an expression and accepts input schema.

This is how I defined my parameter:

And this is the error I get when I test it in snaplogic:

Any idea of what needs to be done to get the input schema to work?

3 Replies

  • Supratim's avatar
    Supratim
    Contributor III

    @kayla.akey I think you have to use snap type as JSONPATH like that

    propertyBuilder.describe(INPUT_DATE_STR,“Date field to convert,it should be as a string”).required().expression(SnapProperty.DecoratorType.ACCEPTS_SCHEMA). expression(SnapProperty.DecoratorType.ENABLED_EXPRESSION).type(SnapType.JSONPATH).add();
    and have to use INPUT_DATE_STR_EXP_PROP.eval(document) inside Process method.
    @dmiller Example given in snap developer portal is very good but it will be great if you can add few more information and use cases there. Thanks.