-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: behavior change to HttpOperationResponse.response.body.type in 0.56.0-dev #3225
Comments
Chenjie notified me that it may be caused by PR #2945 Would e.g. |
This has been done by design to make sure request and response body resolution use the exact same logic. Http library was doing some very inconsitent thing that were completely blocking and breaking certain scenarios. The change it that the body property is not exactly the body in both the request and response instead of just being in the request and in the response sometimes being the wrapper model. Use the same logic you did for request and it will work fine. |
Thanks Timothee. I will go update the cadl-ranch to e.g. @get
op getModel(@body input: VisibilityModel): {
@body output: VisibilityModel
}; However, I may reopen it, if we see behavior changed on real service. |
Describe the bug
HttpOperationResponse.responses.body.type
changes in 0.56.0-dev, compared to 0.55.0case in cadl-ranch
https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http/type/model/visibility/main.tsp#L50-L51
in 0.55.0, the response.body.type is
VisibilityModel
model with 5 propertiesin next, it is an anonymous model with only 1 property (the one with "read")
There is some other cases of difference in response, e.g. empty model
https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http/type/model/empty/main.tsp#L35
Also see some diff of response status code changed from 204 to 200.
Reproduction
https://github.com/Azure/cadl-ranch/blob/main/packages/cadl-ranch-specs/http/type/model/visibility/main.tsp#L50-L51
next
Checklist
The text was updated successfully, but these errors were encountered: