java-rest-api
java-rest-api copied to clipboard
Unable to set header_url when creating a template with a HEADER component and format of VIDEO
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"
]
}