• Create Attribute Handler

    Parameters

    • attributeService: Pick<AttributeDataService, "createAttribute" | "getAttribute" | "normalizeAttributeResponse">

      injected service use to handle the attribute related operations

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

    Returns Promise<adapter.AdapterHandlerResponse>

    200 Status Ok

    • data: created attribute

    Description

    This handler is used to create a new attribute by applying the following steps in sequence:

    1. Create a new attribute (attributeService.createAttribute)

    2. Get the created attribute (attributeService.getAttribute)

    3. Return the created attribute (attributeService.normalizeAttributeResponse)

    Throws

    500 NBError Internal Server Error

    • create attribute failed

Generated using TypeDoc