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:
Nicolas Vervelle
2025-03-25 16:01:17 +01:00
committed by GitHub
parent d81b5a37d1
commit 8ca3543436
228 changed files with 4520 additions and 4421 deletions

View File

@@ -61,7 +61,7 @@ public class AnotherFakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException {
public Client call123testSpecialTags(@javax.annotation.Nonnull UUID uuidTest, @javax.annotation.Nonnull Client body) throws ApiException {
return call123testSpecialTagsWithHttpInfo(uuidTest, body).getData();
}
@@ -79,7 +79,7 @@ public class AnotherFakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws ApiException {
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(@javax.annotation.Nonnull UUID uuidTest, @javax.annotation.Nonnull Client body) throws ApiException {
// Check required parameters
if (uuidTest == null) {
throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags");

View File

@@ -66,7 +66,7 @@ public class FakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public void createXmlItem(XmlItem xmlItem) throws ApiException {
public void createXmlItem(@javax.annotation.Nonnull XmlItem xmlItem) throws ApiException {
createXmlItemWithHttpInfo(xmlItem);
}
@@ -83,7 +83,7 @@ public class FakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
public ApiResponse<Void> createXmlItemWithHttpInfo(@javax.annotation.Nonnull XmlItem xmlItem) throws ApiException {
// Check required parameters
if (xmlItem == null) {
throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem");
@@ -108,7 +108,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output boolean </td><td> - </td></tr>
</table>
*/
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
public Boolean fakeOuterBooleanSerialize(@javax.annotation.Nullable Boolean body) throws ApiException {
return fakeOuterBooleanSerializeWithHttpInfo(body).getData();
}
@@ -125,7 +125,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output boolean </td><td> - </td></tr>
</table>
*/
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(@javax.annotation.Nullable Boolean body) throws ApiException {
String localVarAccept = apiClient.selectHeaderAccept("*/*");
String localVarContentType = apiClient.selectHeaderContentType();
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
@@ -146,7 +146,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output composite </td><td> - </td></tr>
</table>
*/
public OuterComposite fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
public OuterComposite fakeOuterCompositeSerialize(@javax.annotation.Nullable OuterComposite body) throws ApiException {
return fakeOuterCompositeSerializeWithHttpInfo(body).getData();
}
@@ -163,7 +163,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output composite </td><td> - </td></tr>
</table>
*/
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(@javax.annotation.Nullable OuterComposite body) throws ApiException {
String localVarAccept = apiClient.selectHeaderAccept("*/*");
String localVarContentType = apiClient.selectHeaderContentType();
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
@@ -184,7 +184,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output number </td><td> - </td></tr>
</table>
*/
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
public BigDecimal fakeOuterNumberSerialize(@javax.annotation.Nullable BigDecimal body) throws ApiException {
return fakeOuterNumberSerializeWithHttpInfo(body).getData();
}
@@ -201,7 +201,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output number </td><td> - </td></tr>
</table>
*/
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(@javax.annotation.Nullable BigDecimal body) throws ApiException {
String localVarAccept = apiClient.selectHeaderAccept("*/*");
String localVarContentType = apiClient.selectHeaderContentType();
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
@@ -222,7 +222,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output string </td><td> - </td></tr>
</table>
*/
public String fakeOuterStringSerialize(String body) throws ApiException {
public String fakeOuterStringSerialize(@javax.annotation.Nullable String body) throws ApiException {
return fakeOuterStringSerializeWithHttpInfo(body).getData();
}
@@ -239,7 +239,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Output string </td><td> - </td></tr>
</table>
*/
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(@javax.annotation.Nullable String body) throws ApiException {
String localVarAccept = apiClient.selectHeaderAccept("*/*");
String localVarContentType = apiClient.selectHeaderContentType();
GenericType<String> localVarReturnType = new GenericType<String>() {};
@@ -259,7 +259,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Success </td><td> - </td></tr>
</table>
*/
public void testBodyWithFileSchema(FileSchemaTestClass body) throws ApiException {
public void testBodyWithFileSchema(@javax.annotation.Nonnull FileSchemaTestClass body) throws ApiException {
testBodyWithFileSchemaWithHttpInfo(body);
}
@@ -276,7 +276,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Success </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException {
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(@javax.annotation.Nonnull FileSchemaTestClass body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema");
@@ -301,7 +301,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Success </td><td> - </td></tr>
</table>
*/
public void testBodyWithQueryParams(String query, User body) throws ApiException {
public void testBodyWithQueryParams(@javax.annotation.Nonnull String query, @javax.annotation.Nonnull User body) throws ApiException {
testBodyWithQueryParamsWithHttpInfo(query, body);
}
@@ -319,7 +319,7 @@ public class FakeApi {
<tr><td> 200 </td><td> Success </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException {
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(@javax.annotation.Nonnull String query, @javax.annotation.Nonnull User body) throws ApiException {
// Check required parameters
if (query == null) {
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
@@ -352,7 +352,7 @@ public class FakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public Client testClientModel(Client body) throws ApiException {
public Client testClientModel(@javax.annotation.Nonnull Client body) throws ApiException {
return testClientModelWithHttpInfo(body).getData();
}
@@ -369,7 +369,7 @@ public class FakeApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException {
public ApiResponse<Client> testClientModelWithHttpInfo(@javax.annotation.Nonnull Client body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
@@ -408,7 +408,7 @@ public class FakeApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, LocalDateTime dateTime, String password, String paramCallback) throws ApiException {
public void testEndpointParameters(@javax.annotation.Nonnull BigDecimal number, @javax.annotation.Nonnull Double _double, @javax.annotation.Nonnull String patternWithoutDelimiter, @javax.annotation.Nonnull byte[] _byte, @javax.annotation.Nullable Integer integer, @javax.annotation.Nullable Integer int32, @javax.annotation.Nullable Long int64, @javax.annotation.Nullable Float _float, @javax.annotation.Nullable String string, @javax.annotation.Nullable File binary, @javax.annotation.Nullable LocalDate date, @javax.annotation.Nullable LocalDateTime dateTime, @javax.annotation.Nullable String password, @javax.annotation.Nullable String paramCallback) throws ApiException {
testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
}
@@ -439,7 +439,7 @@ public class FakeApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, LocalDateTime dateTime, String password, String paramCallback) throws ApiException {
public ApiResponse<Void> testEndpointParametersWithHttpInfo(@javax.annotation.Nonnull BigDecimal number, @javax.annotation.Nonnull Double _double, @javax.annotation.Nonnull String patternWithoutDelimiter, @javax.annotation.Nonnull byte[] _byte, @javax.annotation.Nullable Integer integer, @javax.annotation.Nullable Integer int32, @javax.annotation.Nullable Long int64, @javax.annotation.Nullable Float _float, @javax.annotation.Nullable String string, @javax.annotation.Nullable File binary, @javax.annotation.Nullable LocalDate date, @javax.annotation.Nullable LocalDateTime dateTime, @javax.annotation.Nullable String password, @javax.annotation.Nullable String paramCallback) throws ApiException {
// Check required parameters
if (number == null) {
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
@@ -518,7 +518,7 @@ public class FakeApi {
<tr><td> 404 </td><td> Not found </td><td> - </td></tr>
</table>
*/
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
public void testEnumParameters(@javax.annotation.Nullable List<String> enumHeaderStringArray, @javax.annotation.Nullable String enumHeaderString, @javax.annotation.Nullable List<String> enumQueryStringArray, @javax.annotation.Nullable String enumQueryString, @javax.annotation.Nullable Integer enumQueryInteger, @javax.annotation.Nullable Double enumQueryDouble, @javax.annotation.Nullable List<String> enumFormStringArray, @javax.annotation.Nullable String enumFormString) throws ApiException {
testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
}
@@ -543,7 +543,7 @@ public class FakeApi {
<tr><td> 404 </td><td> Not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
public ApiResponse<Void> testEnumParametersWithHttpInfo(@javax.annotation.Nullable List<String> enumHeaderStringArray, @javax.annotation.Nullable String enumHeaderString, @javax.annotation.Nullable List<String> enumQueryStringArray, @javax.annotation.Nullable String enumQueryString, @javax.annotation.Nullable Integer enumQueryInteger, @javax.annotation.Nullable Double enumQueryDouble, @javax.annotation.Nullable List<String> enumFormStringArray, @javax.annotation.Nullable String enumFormString) throws ApiException {
// Query parameters
List<Pair> localVarQueryParams = new ArrayList<>(
apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)
@@ -577,7 +577,7 @@ public class FakeApi {
null, null, false);
}
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
private ApiResponse<Void> testGroupParametersWithHttpInfo(@javax.annotation.Nonnull Integer requiredStringGroup, @javax.annotation.Nonnull Boolean requiredBooleanGroup, @javax.annotation.Nonnull Long requiredInt64Group, @javax.annotation.Nullable Integer stringGroup, @javax.annotation.Nullable Boolean booleanGroup, @javax.annotation.Nullable Long int64Group) throws ApiException {
// Check required parameters
if (requiredStringGroup == null) {
throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
@@ -612,11 +612,17 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
}
public class APItestGroupParametersRequest {
@javax.annotation.Nonnull
private Integer requiredStringGroup;
@javax.annotation.Nonnull
private Boolean requiredBooleanGroup;
@javax.annotation.Nonnull
private Long requiredInt64Group;
@javax.annotation.Nullable
private Integer stringGroup;
@javax.annotation.Nullable
private Boolean booleanGroup;
@javax.annotation.Nullable
private Long int64Group;
private APItestGroupParametersRequest() {
@@ -627,7 +633,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
* @param requiredStringGroup Required String in group parameters (required)
* @return APItestGroupParametersRequest
*/
public APItestGroupParametersRequest requiredStringGroup(Integer requiredStringGroup) {
public APItestGroupParametersRequest requiredStringGroup(@javax.annotation.Nonnull Integer requiredStringGroup) {
this.requiredStringGroup = requiredStringGroup;
return this;
}
@@ -637,7 +643,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
* @param requiredBooleanGroup Required Boolean in group parameters (required)
* @return APItestGroupParametersRequest
*/
public APItestGroupParametersRequest requiredBooleanGroup(Boolean requiredBooleanGroup) {
public APItestGroupParametersRequest requiredBooleanGroup(@javax.annotation.Nonnull Boolean requiredBooleanGroup) {
this.requiredBooleanGroup = requiredBooleanGroup;
return this;
}
@@ -647,7 +653,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
* @param requiredInt64Group Required Integer in group parameters (required)
* @return APItestGroupParametersRequest
*/
public APItestGroupParametersRequest requiredInt64Group(Long requiredInt64Group) {
public APItestGroupParametersRequest requiredInt64Group(@javax.annotation.Nonnull Long requiredInt64Group) {
this.requiredInt64Group = requiredInt64Group;
return this;
}
@@ -657,7 +663,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
* @param stringGroup String in group parameters (optional)
* @return APItestGroupParametersRequest
*/
public APItestGroupParametersRequest stringGroup(Integer stringGroup) {
public APItestGroupParametersRequest stringGroup(@javax.annotation.Nullable Integer stringGroup) {
this.stringGroup = stringGroup;
return this;
}
@@ -667,7 +673,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
* @param booleanGroup Boolean in group parameters (optional)
* @return APItestGroupParametersRequest
*/
public APItestGroupParametersRequest booleanGroup(Boolean booleanGroup) {
public APItestGroupParametersRequest booleanGroup(@javax.annotation.Nullable Boolean booleanGroup) {
this.booleanGroup = booleanGroup;
return this;
}
@@ -677,7 +683,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
* @param int64Group Integer in group parameters (optional)
* @return APItestGroupParametersRequest
*/
public APItestGroupParametersRequest int64Group(Long int64Group) {
public APItestGroupParametersRequest int64Group(@javax.annotation.Nullable Long int64Group) {
this.int64Group = int64Group;
return this;
}
@@ -739,7 +745,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public void testInlineAdditionalProperties(Map<String, String> param) throws ApiException {
public void testInlineAdditionalProperties(@javax.annotation.Nonnull Map<String, String> param) throws ApiException {
testInlineAdditionalPropertiesWithHttpInfo(param);
}
@@ -756,7 +762,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param) throws ApiException {
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(@javax.annotation.Nonnull Map<String, String> param) throws ApiException {
// Check required parameters
if (param == null) {
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
@@ -781,7 +787,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public void testJsonFormData(String param, String param2) throws ApiException {
public void testJsonFormData(@javax.annotation.Nonnull String param, @javax.annotation.Nonnull String param2) throws ApiException {
testJsonFormDataWithHttpInfo(param, param2);
}
@@ -799,7 +805,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
public ApiResponse<Void> testJsonFormDataWithHttpInfo(@javax.annotation.Nonnull String param, @javax.annotation.Nonnull String param2) throws ApiException {
// Check required parameters
if (param == null) {
throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
@@ -835,7 +841,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
<tr><td> 200 </td><td> Success </td><td> - </td></tr>
</table>
*/
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
public void testQueryParameterCollectionFormat(@javax.annotation.Nonnull List<String> pipe, @javax.annotation.Nonnull List<String> ioutil, @javax.annotation.Nonnull List<String> http, @javax.annotation.Nonnull List<String> url, @javax.annotation.Nonnull List<String> context) throws ApiException {
testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context);
}
@@ -856,7 +862,7 @@ private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredString
<tr><td> 200 </td><td> Success </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(@javax.annotation.Nonnull List<String> pipe, @javax.annotation.Nonnull List<String> ioutil, @javax.annotation.Nonnull List<String> http, @javax.annotation.Nonnull List<String> url, @javax.annotation.Nonnull List<String> context) throws ApiException {
// Check required parameters
if (pipe == null) {
throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");

View File

@@ -59,7 +59,7 @@ public class FakeClassnameTags123Api {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public Client testClassname(Client body) throws ApiException {
public Client testClassname(@javax.annotation.Nonnull Client body) throws ApiException {
return testClassnameWithHttpInfo(body).getData();
}
@@ -76,7 +76,7 @@ public class FakeClassnameTags123Api {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
public ApiResponse<Client> testClassnameWithHttpInfo(@javax.annotation.Nonnull Client body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");

View File

@@ -62,7 +62,7 @@ public class PetApi {
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
*/
public void addPet(Pet body) throws ApiException {
public void addPet(@javax.annotation.Nonnull Pet body) throws ApiException {
addPetWithHttpInfo(body);
}
@@ -80,7 +80,7 @@ public class PetApi {
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
public ApiResponse<Void> addPetWithHttpInfo(@javax.annotation.Nonnull Pet body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
@@ -107,7 +107,7 @@ public class PetApi {
<tr><td> 400 </td><td> Invalid pet value </td><td> - </td></tr>
</table>
*/
public void deletePet(Long petId, String apiKey) throws ApiException {
public void deletePet(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws ApiException {
deletePetWithHttpInfo(petId, apiKey);
}
@@ -126,7 +126,7 @@ public class PetApi {
<tr><td> 400 </td><td> Invalid pet value </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
public ApiResponse<Void> deletePetWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String apiKey) throws ApiException {
// Check required parameters
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
@@ -163,7 +163,7 @@ public class PetApi {
<tr><td> 400 </td><td> Invalid status value </td><td> - </td></tr>
</table>
*/
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
public List<Pet> findPetsByStatus(@javax.annotation.Nonnull List<String> status) throws ApiException {
return findPetsByStatusWithHttpInfo(status).getData();
}
@@ -181,7 +181,7 @@ public class PetApi {
<tr><td> 400 </td><td> Invalid status value </td><td> - </td></tr>
</table>
*/
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(@javax.annotation.Nonnull List<String> status) throws ApiException {
// Check required parameters
if (status == null) {
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
@@ -216,7 +216,7 @@ public class PetApi {
* @deprecated
*/
@Deprecated
public Set<Pet> findPetsByTags(Set<String> tags) throws ApiException {
public Set<Pet> findPetsByTags(@javax.annotation.Nonnull Set<String> tags) throws ApiException {
return findPetsByTagsWithHttpInfo(tags).getData();
}
@@ -236,7 +236,7 @@ public class PetApi {
* @deprecated
*/
@Deprecated
public ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(Set<String> tags) throws ApiException {
public ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(@javax.annotation.Nonnull Set<String> tags) throws ApiException {
// Check required parameters
if (tags == null) {
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
@@ -270,7 +270,7 @@ public class PetApi {
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
</table>
*/
public Pet getPetById(Long petId) throws ApiException {
public Pet getPetById(@javax.annotation.Nonnull Long petId) throws ApiException {
return getPetByIdWithHttpInfo(petId).getData();
}
@@ -289,7 +289,7 @@ public class PetApi {
<tr><td> 404 </td><td> Pet not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
public ApiResponse<Pet> getPetByIdWithHttpInfo(@javax.annotation.Nonnull Long petId) throws ApiException {
// Check required parameters
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
@@ -322,7 +322,7 @@ public class PetApi {
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
*/
public void updatePet(Pet body) throws ApiException {
public void updatePet(@javax.annotation.Nonnull Pet body) throws ApiException {
updatePetWithHttpInfo(body);
}
@@ -342,7 +342,7 @@ public class PetApi {
<tr><td> 405 </td><td> Validation exception </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
public ApiResponse<Void> updatePetWithHttpInfo(@javax.annotation.Nonnull Pet body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
@@ -369,7 +369,7 @@ public class PetApi {
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
*/
public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
public void updatePetWithForm(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws ApiException {
updatePetWithFormWithHttpInfo(petId, name, status);
}
@@ -388,7 +388,7 @@ public class PetApi {
<tr><td> 405 </td><td> Invalid input </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
public ApiResponse<Void> updatePetWithFormWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String name, @javax.annotation.Nullable String status) throws ApiException {
// Check required parameters
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
@@ -429,7 +429,7 @@ public class PetApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws ApiException {
public ModelApiResponse uploadFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws ApiException {
return uploadFileWithHttpInfo(petId, additionalMetadata, _file).getData();
}
@@ -448,7 +448,7 @@ public class PetApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nullable String additionalMetadata, @javax.annotation.Nullable File _file) throws ApiException {
// Check required parameters
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
@@ -490,7 +490,7 @@ public class PetApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
public ModelApiResponse uploadFileWithRequiredFile(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull File requiredFile, @javax.annotation.Nullable String additionalMetadata) throws ApiException {
return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData();
}
@@ -509,7 +509,7 @@ public class PetApi {
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(@javax.annotation.Nonnull Long petId, @javax.annotation.Nonnull File requiredFile, @javax.annotation.Nullable String additionalMetadata) throws ApiException {
// Check required parameters
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");

View File

@@ -59,7 +59,7 @@ public class StoreApi {
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
*/
public void deleteOrder(String orderId) throws ApiException {
public void deleteOrder(@javax.annotation.Nonnull String orderId) throws ApiException {
deleteOrderWithHttpInfo(orderId);
}
@@ -77,7 +77,7 @@ public class StoreApi {
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
public ApiResponse<Void> deleteOrderWithHttpInfo(@javax.annotation.Nonnull String orderId) throws ApiException {
// Check required parameters
if (orderId == null) {
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
@@ -145,7 +145,7 @@ public class StoreApi {
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
*/
public Order getOrderById(Long orderId) throws ApiException {
public Order getOrderById(@javax.annotation.Nonnull Long orderId) throws ApiException {
return getOrderByIdWithHttpInfo(orderId).getData();
}
@@ -164,7 +164,7 @@ public class StoreApi {
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
public ApiResponse<Order> getOrderByIdWithHttpInfo(@javax.annotation.Nonnull Long orderId) throws ApiException {
// Check required parameters
if (orderId == null) {
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
@@ -195,7 +195,7 @@ public class StoreApi {
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
</table>
*/
public Order placeOrder(Order body) throws ApiException {
public Order placeOrder(@javax.annotation.Nonnull Order body) throws ApiException {
return placeOrderWithHttpInfo(body).getData();
}
@@ -213,7 +213,7 @@ public class StoreApi {
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
</table>
*/
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
public ApiResponse<Order> placeOrderWithHttpInfo(@javax.annotation.Nonnull Order body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");

View File

@@ -59,7 +59,7 @@ public class UserApi {
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public void createUser(User body) throws ApiException {
public void createUser(@javax.annotation.Nonnull User body) throws ApiException {
createUserWithHttpInfo(body);
}
@@ -76,7 +76,7 @@ public class UserApi {
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
public ApiResponse<Void> createUserWithHttpInfo(@javax.annotation.Nonnull User body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
@@ -100,7 +100,7 @@ public class UserApi {
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public void createUsersWithArrayInput(List<User> body) throws ApiException {
public void createUsersWithArrayInput(@javax.annotation.Nonnull List<User> body) throws ApiException {
createUsersWithArrayInputWithHttpInfo(body);
}
@@ -117,7 +117,7 @@ public class UserApi {
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(@javax.annotation.Nonnull List<User> body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
@@ -141,7 +141,7 @@ public class UserApi {
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public void createUsersWithListInput(List<User> body) throws ApiException {
public void createUsersWithListInput(@javax.annotation.Nonnull List<User> body) throws ApiException {
createUsersWithListInputWithHttpInfo(body);
}
@@ -158,7 +158,7 @@ public class UserApi {
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(@javax.annotation.Nonnull List<User> body) throws ApiException {
// Check required parameters
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
@@ -183,7 +183,7 @@ public class UserApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public void deleteUser(String username) throws ApiException {
public void deleteUser(@javax.annotation.Nonnull String username) throws ApiException {
deleteUserWithHttpInfo(username);
}
@@ -201,7 +201,7 @@ public class UserApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
public ApiResponse<Void> deleteUserWithHttpInfo(@javax.annotation.Nonnull String username) throws ApiException {
// Check required parameters
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
@@ -232,7 +232,7 @@ public class UserApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public User getUserByName(String username) throws ApiException {
public User getUserByName(@javax.annotation.Nonnull String username) throws ApiException {
return getUserByNameWithHttpInfo(username).getData();
}
@@ -251,7 +251,7 @@ public class UserApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
public ApiResponse<User> getUserByNameWithHttpInfo(@javax.annotation.Nonnull String username) throws ApiException {
// Check required parameters
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
@@ -283,7 +283,7 @@ public class UserApi {
<tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
</table>
*/
public String loginUser(String username, String password) throws ApiException {
public String loginUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws ApiException {
return loginUserWithHttpInfo(username, password).getData();
}
@@ -302,7 +302,7 @@ public class UserApi {
<tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
</table>
*/
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
public ApiResponse<String> loginUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull String password) throws ApiException {
// Check required parameters
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
@@ -372,7 +372,7 @@ public class UserApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public void updateUser(String username, User body) throws ApiException {
public void updateUser(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User body) throws ApiException {
updateUserWithHttpInfo(username, body);
}
@@ -391,7 +391,7 @@ public class UserApi {
<tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table>
*/
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
public ApiResponse<Void> updateUserWithHttpInfo(@javax.annotation.Nonnull String username, @javax.annotation.Nonnull User body) throws ApiException {
// Check required parameters
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");