• Does attribute exist validator

    Parameters

    • attributeIdFieldInfo: TargetField

      which field to get the attributeId from context

    • attributeService: AttributeDataService

      attribute service

    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

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

    Returns Promise<number>

    200 Status Ok

    Description

    This validator is used to check if the attribute exists by applying the following steps in sequence:

    1. Get the attributeId from the context

    2. Check if the attributeId is null

    3. Check if the attribute is exist

    Throws

    400 NBError Wrong parameter

    • attributeId is missing in attributeIdFieldInfo.type, attributeIdFieldInfo.name

    Throws

    404 NBError Not found

    • attribute not found: attributeId

Generated using TypeDoc