Skip to content

Construct new output in handler #5

Open
@matthewhanson

Description

@matthewhanson

Currently the handler takes the array of Items returned by process and puts them in features field of the input payload, and returns it.

This means the output payload will have any additional fields from the input payload which may not be what is intended. The output of a Task should be a valid ItemCollection with an 'id' and process definition, whereas the input could be any JSON at all as long as it has a process definition and optionally an id.

Construct a new ItemCollection output to return, populating with the output from the Task.process into the features field and copying over the process definition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions