mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 00:17:05 +00:00
Issue 20804: Add java nullability annotations (#20806)
* issue-20804: Add nullability annotations to Java generated clients Motivation: Be able to use generated clients in code checked by tools like NullAway. * issue-20804: Add nullability annotations to Java generated clients Motivation: Be able to use generated clients in code checked by tools like NullAway. * issue-20804: Add nullability annotations to Java generated clients Motivation: Be able to use generated clients in code checked by tools like NullAway.
This commit is contained in:
@@ -127,7 +127,7 @@ public class AnotherFakeApi {
|
||||
* @param body (Client) client model (required)
|
||||
* @return operation
|
||||
*/
|
||||
public Call123testSpecialTagsOper body(Client body) {
|
||||
public Call123testSpecialTagsOper body(@javax.annotation.Nonnull Client body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ public class FakeApi {
|
||||
* @param xmlItem (XmlItem) XmlItem Body (required)
|
||||
* @return operation
|
||||
*/
|
||||
public CreateXmlItemOper body(XmlItem xmlItem) {
|
||||
public CreateXmlItemOper body(@javax.annotation.Nonnull XmlItem xmlItem) {
|
||||
reqSpec.setBody(xmlItem);
|
||||
return this;
|
||||
}
|
||||
@@ -259,7 +259,7 @@ public class FakeApi {
|
||||
* @param body (Boolean) Input boolean as post body (optional)
|
||||
* @return operation
|
||||
*/
|
||||
public FakeOuterBooleanSerializeOper body(Boolean body) {
|
||||
public FakeOuterBooleanSerializeOper body(@javax.annotation.Nullable Boolean body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ public class FakeApi {
|
||||
* @param body (OuterComposite) Input composite as post body (optional)
|
||||
* @return operation
|
||||
*/
|
||||
public FakeOuterCompositeSerializeOper body(OuterComposite body) {
|
||||
public FakeOuterCompositeSerializeOper body(@javax.annotation.Nullable OuterComposite body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -403,7 +403,7 @@ public class FakeApi {
|
||||
* @param body (BigDecimal) Input number as post body (optional)
|
||||
* @return operation
|
||||
*/
|
||||
public FakeOuterNumberSerializeOper body(BigDecimal body) {
|
||||
public FakeOuterNumberSerializeOper body(@javax.annotation.Nullable BigDecimal body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -475,7 +475,7 @@ public class FakeApi {
|
||||
* @param body (String) Input string as post body (optional)
|
||||
* @return operation
|
||||
*/
|
||||
public FakeOuterStringSerializeOper body(String body) {
|
||||
public FakeOuterStringSerializeOper body(@javax.annotation.Nullable String body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -536,7 +536,7 @@ public class FakeApi {
|
||||
* @param body (FileSchemaTestClass) (required)
|
||||
* @return operation
|
||||
*/
|
||||
public TestBodyWithFileSchemaOper body(FileSchemaTestClass body) {
|
||||
public TestBodyWithFileSchemaOper body(@javax.annotation.Nonnull FileSchemaTestClass body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -598,7 +598,7 @@ public class FakeApi {
|
||||
* @param body (User) (required)
|
||||
* @return operation
|
||||
*/
|
||||
public TestBodyWithQueryParamsOper body(User body) {
|
||||
public TestBodyWithQueryParamsOper body(@javax.annotation.Nonnull User body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -681,7 +681,7 @@ public class FakeApi {
|
||||
* @param body (Client) client model (required)
|
||||
* @return operation
|
||||
*/
|
||||
public TestClientModelOper body(Client body) {
|
||||
public TestClientModelOper body(@javax.annotation.Nonnull Client body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -900,7 +900,7 @@ public class FakeApi {
|
||||
* @param binary (File) None (optional)
|
||||
* @return operation
|
||||
*/
|
||||
public TestEndpointParametersOper binaryMultiPart(File binary) {
|
||||
public TestEndpointParametersOper binaryMultiPart(@javax.annotation.Nullable File binary) {
|
||||
reqSpec.addMultiPart(binary);
|
||||
return this;
|
||||
}
|
||||
@@ -1230,7 +1230,7 @@ public class FakeApi {
|
||||
* @param param (Map<String, String>) request body (required)
|
||||
* @return operation
|
||||
*/
|
||||
public TestInlineAdditionalPropertiesOper body(Map<String, String> param) {
|
||||
public TestInlineAdditionalPropertiesOper body(@javax.annotation.Nonnull Map<String, String> param) {
|
||||
reqSpec.setBody(param);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ public class FakeClassnameTags123Api {
|
||||
* @param body (Client) client model (required)
|
||||
* @return operation
|
||||
*/
|
||||
public TestClassnameOper body(Client body) {
|
||||
public TestClassnameOper body(@javax.annotation.Nonnull Client body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class PetApi {
|
||||
* @param body (Pet) Pet object that needs to be added to the store (required)
|
||||
* @return operation
|
||||
*/
|
||||
public AddPetOper body(Pet body) {
|
||||
public AddPetOper body(@javax.annotation.Nonnull Pet body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -514,7 +514,7 @@ public class PetApi {
|
||||
* @param body (Pet) Pet object that needs to be added to the store (required)
|
||||
* @return operation
|
||||
*/
|
||||
public UpdatePetOper body(Pet body) {
|
||||
public UpdatePetOper body(@javax.annotation.Nonnull Pet body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -699,7 +699,7 @@ public class PetApi {
|
||||
* @param _file (File) file to upload (optional)
|
||||
* @return operation
|
||||
*/
|
||||
public UploadFileOper _fileMultiPart(File _file) {
|
||||
public UploadFileOper _fileMultiPart(@javax.annotation.Nullable File _file) {
|
||||
reqSpec.addMultiPart(_file);
|
||||
return this;
|
||||
}
|
||||
@@ -797,7 +797,7 @@ public class PetApi {
|
||||
* @param requiredFile (File) file to upload (required)
|
||||
* @return operation
|
||||
*/
|
||||
public UploadFileWithRequiredFileOper requiredFileMultiPart(File requiredFile) {
|
||||
public UploadFileWithRequiredFileOper requiredFileMultiPart(@javax.annotation.Nonnull File requiredFile) {
|
||||
reqSpec.addMultiPart(requiredFile);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ public class StoreApi {
|
||||
* @param body (Order) order placed for purchasing the pet (required)
|
||||
* @return operation
|
||||
*/
|
||||
public PlaceOrderOper body(Order body) {
|
||||
public PlaceOrderOper body(@javax.annotation.Nonnull Order body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ public class UserApi {
|
||||
* @param body (User) Created user object (required)
|
||||
* @return operation
|
||||
*/
|
||||
public CreateUserOper body(User body) {
|
||||
public CreateUserOper body(@javax.annotation.Nonnull User body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -211,7 +211,7 @@ public class UserApi {
|
||||
* @param body (List<@Valid User>) List of user object (required)
|
||||
* @return operation
|
||||
*/
|
||||
public CreateUsersWithArrayInputOper body(List<@Valid User> body) {
|
||||
public CreateUsersWithArrayInputOper body(@javax.annotation.Nonnull List<@Valid User> body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ public class UserApi {
|
||||
* @param body (List<@Valid User>) List of user object (required)
|
||||
* @return operation
|
||||
*/
|
||||
public CreateUsersWithListInputOper body(List<@Valid User> body) {
|
||||
public CreateUsersWithListInputOper body(@javax.annotation.Nonnull List<@Valid User> body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
@@ -604,7 +604,7 @@ public class UserApi {
|
||||
* @param body (User) Updated user object (required)
|
||||
* @return operation
|
||||
*/
|
||||
public UpdateUserOper body(User body) {
|
||||
public UpdateUserOper body(@javax.annotation.Nonnull User body) {
|
||||
reqSpec.setBody(body);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user