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
Request body objects can contain optional fields, and will acquire optional fields over time as an API evolves. Developers who have written code against an earlier version of an API should not have to "update" that code to explicitly set a new and optional field to null when they update to a newer version of the API.
The only solution I am aware of in Java is to create builders:
MyRequestBody.newBuilder()
.foo("foo!")
.build();
The user might construct response objects or any other type in their test suite (or maybe even in server code, if they use this to generate their model), and we wouldn't want that to break with a version upgrade, either. So we pretty much ought to add builders everywhere.
The text was updated successfully, but these errors were encountered:
Request body objects can contain optional fields, and will acquire optional fields over time as an API evolves. Developers who have written code against an earlier version of an API should not have to "update" that code to explicitly set a new and optional field to
null
when they update to a newer version of the API.The only solution I am aware of in Java is to create builders:
The user might construct response objects or any other type in their test suite (or maybe even in server code, if they use this to generate their model), and we wouldn't want that to break with a version upgrade, either. So we pretty much ought to add builders everywhere.
The text was updated successfully, but these errors were encountered: