-
Notifications
You must be signed in to change notification settings - Fork 200
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
Inconsitency with @visibility
and the body resolution
#2513
Comments
Related discussion: #2511 |
There is a few problems:
|
Inconsistency with bodyProposal 1: Empty object after removing non-body properties get
|
Use case examples
|
Use case for sdk Case 1 model with only headers with body of void
Case 2: Only headers but with body of
|
Summary of current proposalEmpty object after removing non-body properties get
|
Implementation #2868 |
Using
@visibility("none")
(or other name) in the goal to hide a property from http does result in some inconsitent behavior in the body resolution.If a property is a metadataa prop like header it is not included in the body and if all properties were metadata props then the body is changed to be
void
instead of an empty object.However the same logic doesn't apply for
@visibility
it is also inconsitent for request and response.Playground Link
Other inconsitency that apply to verisoning too
Proposed fixes
If the parameters or response variant result in an empty model
{}
after removing properties due to visibility, metadata, etc. the resulkting body isvoid
The reason we had this inconsitency is when we had
object
as a type andop test(): object
producing204 nocontent
was weird.The text was updated successfully, but these errors were encountered: