1.1.1 • Published 5 years ago

@argodigital/formula-response v1.1.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

formula-response

Handles data (or error) response returned by handler. Provides unified shape of response for all formula services.

Customization

By default response will return data with status code 200 or an error with status code matching code in statuses package (see errors package for error customization).

In addition, response can be customized through input of formula-sl-function and responseOptions object. In example:

postUser:
    component: "@argodigital/formula-sl-function"
    responseOptions:
        statusCode: 201
        attributes:
            - name
            - email
            - dob
        id: userId

More options are listed on jsonapi-serializer package page.