java-rest-api icon indicating copy to clipboard operation
java-rest-api copied to clipboard

Unable to set header_url when creating a template with a HEADER component and format of VIDEO

Open hgbrown opened this issue 1 year ago • 0 comments

When creating a template with a HEADER component and a format of VIDEO, you cannot set a header_url in the example due to the following validation in HSMComponent.java:168-174:

private void checkHeaderUrl() throws IllegalArgumentException {
    if (!(type.equals(HSMComponentType.HEADER)
        && format.equals(HSMComponentFormat.IMAGE))
    ) {
      throw new IllegalArgumentException("\"header_url\" is available for only HEADER type and IMAGE format.");
    }
  }

However, you can send an HTTP request with these values which will succeed:

    {
      "type": "HEADER",
      "format": "VIDEO",
      "example": {
        "header_url": [
          "https://gvipublic.s3.af-south-1.amazonaws.com/ZZZ022/delivery+design.mp4"
        ]
      }

hgbrown avatar May 06 '24 09:05 hgbrown