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
Below two cases are not supported yet in some emitters in @markcowl's todo spec pr. I'd like to clarify if both of them are in Jan e2e demo's scope.
Unsupported 1: Model is shared among mfd and non-mfd operations
TodoAttachment will be shared in a json operation createJson(link) and a mfd operation createForm(link). Since currently emitters would treat mfd model differently so sharing here would be an issue for Java and JavaScript and I didn't check other language yet.
I know other lanagues would only generate protocol methods for this. This seems to be a JS issue only, currently we can't handle the deserialization/serialization for union model TodoAttachment without a discriminator property.
Full support of union deserialization/serialization are problematic and a big issue in JS. Not sure we could scope to discriminated union for now?
union TodoAttachment {
file: TodoFileAttachment,
url: TodoUrlAttachment,
}
model TodoFileAttachment is File;
model File {
contentType?: string;
filename?: string;
contents: bytes;
}
model TodoUrlAttachment {
/** A description of the URL */
description: string;
/** The url */
url: url;
}
The text was updated successfully, but these errors were encountered:
Below two cases are not supported yet in some emitters in @markcowl's todo spec pr. I'd like to clarify if both of them are in Jan e2e demo's scope.
TodoAttachment
will be shared in a json operation createJson(link) and a mfd operation createForm(link). Since currently emitters would treat mfd model differently so sharing here would be an issue for Java and JavaScript and I didn't check other language yet.I am also clarifying if there is any limitation for these cases: microsoft/typespec#5376.
bytes
typeI know other lanagues would only generate protocol methods for this. This seems to be a JS issue only, currently we can't handle the deserialization/serialization for union model
TodoAttachment
without a discriminator property.Full support of union deserialization/serialization are problematic and a big issue in JS. Not sure we could scope to discriminated union for now?
The text was updated successfully, but these errors were encountered: