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
op default(
@body
value: bytes,
): NoContentResponse;
As discussed in DPG office hour, compiler have two options here:
try our best to guess a content type.
trust whatever the spec says.
Currently, we lean towards to take option1 for this on the client side. But as this information could be used in both server generation and client generation and maybe other emitters, it would be problematic if the server emitter is taking a different approach than the client emitter.
Maybe the compiler side should unify the logic here?
A proposed guessing logic is:
bytes: octect-stream
model: json
everything else: text/plain
I think this also applies to accept header.
The text was updated successfully, but these errors were encountered:
See this original issue Azure/typespec-azure#1994, in the case where the content type is absent.
As discussed in DPG office hour, compiler have two options here:
Currently, we lean towards to take option1 for this on the client side. But as this information could be used in both server generation and client generation and maybe other emitters, it would be problematic if the server emitter is taking a different approach than the client emitter.
Maybe the compiler side should unify the logic here?
A proposed guessing logic is:
I think this also applies to accept header.
The text was updated successfully, but these errors were encountered: