You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in codegen we get content types from requests.protocol.http.mediaTypes. Not from the values of contentType constant.
We need to pay attention to is single optional content type and multiple optional content types cases.
model ImageRequest {
@body body?: bytes;
@header contentType?: "image/png";
}
@post
op upload(...ImageRequest): void;
model ImageRequest {
@body body?: bytes;
@header contentType?: "image/png" | "image/jpeg";
}
@post
op upload(...ImageRequest): void;
Will need to modify codegen to support adding the javadoc to let user input content-type.
Link #2861 (comment)
Depends on TCGC issue: Azure/typespec-azure#1259
Currently in codegen we get content types from
requests.protocol.http.mediaTypes. Not from the values ofcontentTypeconstant.We need to pay attention to is single optional content type and multiple optional content types cases.
Tasks
TCGC dependency