mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 22:07:07 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user