Examples of why to use @bodyRoot vs @body #8663
Unanswered
artsiommiksiuk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
https://typespec.io/docs/libraries/http/operations/#body-vs-bodyroot
I can't find a good reason to use
@bodyRootdecorator anywhere, and also finding it confusing whenever I see it, either in language or emitter. Idea is clear but also seems pointless.Documentation mentions that @bodyRoot might be used for some templates cases, which I also can't figure exactly.
So, could somebody give an example of why @bodyRoot exists?
Beta Was this translation helpful? Give feedback.
All reactions