-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
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 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;
Tasks
- Add optional content type to code-model
- Support optional content type in codegen
TCGC dependency
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels