ResponseTemplateManager Singleton Class

Properties

templates: any

template container

Methods

  • Generate API response template string for given code and description

    Parameters

    • code: string

      API response code

    • description: string

      API response description

    Returns string

    generate response template string

  • Return all available response templates

    Returns any

    all available response template instances

  • Check if given template exists in template container

    Parameters

    • id: string

      template id

    Returns boolean

    boolean result

  • Check if given API response hash matches a given template by code and description

    Parameters

    • tpl2: any

      api response hash

    • id: string

      template id

    Returns boolean

    boolean result

  • Check if given API plain response matches a given template by code and description

    Parameters

    • plain: string

      API plain response

    • id: string

      template id

    Returns boolean

    boolean result