Add nullability annotations to Java generated clients (#19617)

* issue-1960: Add nullability annotations to Java generated clients

Motivations:
Have generated clients properly annotated for nullability to be able to check code using them with tools like NullAway

Modifications:
* Add nullable_var_annotations template to handle nullability annotation on vars
* Add pojo templates to use the nullability template
* Adapt tests

* issue-1960: Add nullability annotations to Java generated clients

Modifications:
* Run export_docs_generator.sh script to update samples
This commit is contained in:
Nicolas Vervelle
2024-10-16 10:14:29 +02:00
committed by GitHub
parent 8f7d9f7467
commit 65b1859161
1582 changed files with 14871 additions and 9980 deletions

View File

@@ -54,12 +54,13 @@ import org.openapitools.client.JSON;
public class OneOf1 {
public static final String SERIALIZED_NAME_MESSAGE1 = "message1";
@SerializedName(SERIALIZED_NAME_MESSAGE1)
@javax.annotation.Nullable
private String message1;
public OneOf1() {
}
public OneOf1 message1(String message1) {
public OneOf1 message1(@javax.annotation.Nullable String message1) {
this.message1 = message1;
return this;
}
@@ -74,7 +75,7 @@ public class OneOf1 {
return message1;
}
public void setMessage1(String message1) {
public void setMessage1(@javax.annotation.Nullable String message1) {
this.message1 = message1;
}