fix: honor required fields in jackson @JsonProperty annotations (#21876)

* fix: honor required fields in jackson @JsonProperty annotations

* add samples

* fix: trigger build

* fix: undo

* update to handle nullable as well

---------

Co-authored-by: Erik Lagerholm <erik.lagerholm@volvocars.com>
This commit is contained in:
William Cheng
2025-09-03 16:41:59 +08:00
committed by GitHub
parent babb3e272b
commit 6e443f1354
1415 changed files with 8393 additions and 8393 deletions

View File

@@ -52,7 +52,7 @@ public class InlineObject {
* @return messageId
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_MESSAGE_ID)
@JsonProperty(value = JSON_PROPERTY_MESSAGE_ID, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public UUID getMessageId() {
@@ -60,7 +60,7 @@ public class InlineObject {
}
@JsonProperty(JSON_PROPERTY_MESSAGE_ID)
@JsonProperty(value = JSON_PROPERTY_MESSAGE_ID, required = true)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setMessageId(@jakarta.annotation.Nonnull UUID messageId) {
this.messageId = messageId;