The following definition
import "@typespec/http";
using Http;
union CreateVideoMultipartBodyInputReference {
bytes,
ImageRefParam,
}
union ImageRefParam {
{
@maxLength(20971520)
image_url: url,
},
{
file_id: string,
},
}
model CreateVideoMultipartBody {
input_reference?: HttpPart<CreateVideoMultipartBodyInputReference>;
}
op createVideo(
@header
contentType: "multipart/form-data",
@multipartBody
body: CreateVideoMultipartBody,
): void;
Fails with this error message : Duplicate type name: 'CreateVideoMultipartBodyInputReference'. Check @FriendlyName decorators and overlap with types in TypeSpec or service namespace.
Interestingly, if we replace bytes by string or something else, the emission starts working. I'd expect it to work with bytes as well.
The following definition
Fails with this error message : Duplicate type name: 'CreateVideoMultipartBodyInputReference'. Check @FriendlyName decorators and overlap with types in TypeSpec or service namespace.
Interestingly, if we replace bytes by string or something else, the emission starts working. I'd expect it to work with bytes as well.