Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public class {{classname}} extends BaseApi {
{{#isDeprecated}}
@Deprecated
{{/isDeprecated}}
public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
public {{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{>nullableArgumentForApi}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
{{#returnType}}
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}).getBody();
{{/returnType}}
Expand Down Expand Up @@ -107,7 +107,7 @@ public class {{classname}} extends BaseApi {
{{#isDeprecated}}
@Deprecated
{{/isDeprecated}}
public ResponseEntity<{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#isFile}}{{#useAbstractionForFiles}}{{#collectionFormat}}java.util.Collection<org.springframework.core.io.Resource>{{/collectionFormat}}{{^collectionFormat}}org.springframework.core.io.Resource{{/collectionFormat}}{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{dataType}}}{{/useAbstractionForFiles}}{{/isFile}}{{^isFile}}{{{dataType}}}{{/isFile}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
public ResponseEntity<{{#returnType}}{{#isResponseFile}}{{#useAbstractionForFiles}}org.springframework.core.io.Resource{{/useAbstractionForFiles}}{{^useAbstractionForFiles}}{{{.}}}{{/useAbstractionForFiles}}{{/isResponseFile}}{{^isResponseFile}}{{{.}}}{{/isResponseFile}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{>nullableArgumentForApi}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws RestClientException {
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4823,15 +4823,13 @@ public void testJspecify(String library, int springBootVersion, boolean hasJspec
"private @Nullable VirusScanEnum virusScan",
"FileContent.Builder virusScan(@Nullable VirusScanEnum virusScan)"
);
if (!RESTTEMPLATE.equals(library)) {
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)");
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains(
"import org.jspecify.annotations.Nullable;",
"(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"
);
}
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)");
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains(
"import org.jspecify.annotations.Nullable;",
"(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"
);
JavaFileAssert.assertThat(files.get("api/package-info.java"))
.fileContains("@org.jspecify.annotations.NullMarked");
JavaFileAssert.assertThat(files.get("model/package-info.java"))
Expand Down Expand Up @@ -4891,15 +4889,13 @@ public void testJspecify_openapiNullable(String library, int springBootVersion,
"public Foo(@JsonProperty(JSON_PROPERTY_DT) java.time.@Nullable Instant dt, @JsonProperty(JSON_PROPERTY_NULLABLE_DT) java.time.@Nullable Instant nullableDt, @JsonProperty(JSON_PROPERTY_BINARY) @Nullable File binary, @JsonProperty(JSON_PROPERTY_NULLABLE_BINARY) @Nullable File nullableBinary, @JsonProperty(JSON_PROPERTY_LIST_OF_DT) @Nullable List<java.time.Instant> listOfDt, @JsonProperty(JSON_PROPERTY_LIST_MIN_INTEMS) @Nullable List<java.time.Instant> listMinIntems, @JsonProperty(JSON_PROPERTY_NULLABLE_LIST_MIN_INTEMS) @Nullable List<java.time.Instant> nullableListMinIntems, @JsonProperty(JSON_PROPERTY_REQUIRED_DT) java.time.Instant requiredDt, @JsonProperty(JSON_PROPERTY_NUMBER) java.math.@Nullable BigDecimal number, @JsonProperty(JSON_PROPERTY_NULLABLE_NUMBER) java.math.@Nullable BigDecimal nullableNumber, @JsonProperty(JSON_PROPERTY_COLOR) @Nullable String color, @JsonProperty(JSON_PROPERTY_REQUIRED_COLOR) String requiredColor, @JsonProperty(JSON_PROPERTY_NULLABLE_COLOR) @Nullable String nullableColor) {"
);
}
if (!RESTTEMPLATE.equals(library)) {
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)");
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains(
"import org.jspecify.annotations.Nullable;",
"(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"
);
}
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains("fooDtParamGet(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)");
JavaFileAssert.assertThat(files.get("FooApi.java"))
.fileContains(
"import org.jspecify.annotations.Nullable;",
"(java.time.@Nullable Instant dtParam, java.time.@Nullable Instant dtQuery, java.time.@Nullable Instant dtCookie, @Nullable String color)"
);
JavaFileAssert.assertThat(files.get("api/package-info.java"))
.fileContains("@org.jspecify.annotations.NullMarked");
JavaFileAssert.assertThat(files.get("model/package-info.java"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public ResponseEntity<File> testBinaryGifWithHttpInfo() throws RestClientExcepti
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testBodyApplicationOctetstreamBinary(File body) throws RestClientException {
public String testBodyApplicationOctetstreamBinary(@javax.annotation.Nullable File body) throws RestClientException {
return testBodyApplicationOctetstreamBinaryWithHttpInfo(body).getBody();
}

Expand All @@ -99,7 +99,7 @@ public String testBodyApplicationOctetstreamBinary(File body) throws RestClientE
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(File body) throws RestClientException {
public ResponseEntity<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(@javax.annotation.Nullable File body) throws RestClientException {
Object localVarPostBody = body;


Expand Down Expand Up @@ -130,7 +130,7 @@ public ResponseEntity<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(F
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testBodyMultipartFormdataArrayOfBinary(List<File> files) throws RestClientException {
public String testBodyMultipartFormdataArrayOfBinary(@javax.annotation.Nonnull List<File> files) throws RestClientException {
return testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files).getBody();
}

Expand All @@ -142,7 +142,7 @@ public String testBodyMultipartFormdataArrayOfBinary(List<File> files) throws Re
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(List<File> files) throws RestClientException {
public ResponseEntity<String> testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(@javax.annotation.Nonnull List<File> files) throws RestClientException {
Object localVarPostBody = null;

// verify the required parameter 'files' is set
Expand Down Expand Up @@ -181,7 +181,7 @@ public ResponseEntity<String> testBodyMultipartFormdataArrayOfBinaryWithHttpInfo
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testBodyMultipartFormdataSingleBinary(File myFile) throws RestClientException {
public String testBodyMultipartFormdataSingleBinary(@javax.annotation.Nullable File myFile) throws RestClientException {
return testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile).getBody();
}

Expand All @@ -193,7 +193,7 @@ public String testBodyMultipartFormdataSingleBinary(File myFile) throws RestClie
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testBodyMultipartFormdataSingleBinaryWithHttpInfo(File myFile) throws RestClientException {
public ResponseEntity<String> testBodyMultipartFormdataSingleBinaryWithHttpInfo(@javax.annotation.Nullable File myFile) throws RestClientException {
Object localVarPostBody = null;


Expand Down Expand Up @@ -227,7 +227,7 @@ public ResponseEntity<String> testBodyMultipartFormdataSingleBinaryWithHttpInfo(
* @return Pet
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public Pet testEchoBodyAllOfPet(Pet pet) throws RestClientException {
public Pet testEchoBodyAllOfPet(@javax.annotation.Nullable Pet pet) throws RestClientException {
return testEchoBodyAllOfPetWithHttpInfo(pet).getBody();
}

Expand All @@ -239,7 +239,7 @@ public Pet testEchoBodyAllOfPet(Pet pet) throws RestClientException {
* @return ResponseEntity&lt;Pet&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Pet> testEchoBodyAllOfPetWithHttpInfo(Pet pet) throws RestClientException {
public ResponseEntity<Pet> testEchoBodyAllOfPetWithHttpInfo(@javax.annotation.Nullable Pet pet) throws RestClientException {
Object localVarPostBody = pet;


Expand Down Expand Up @@ -270,7 +270,7 @@ public ResponseEntity<Pet> testEchoBodyAllOfPetWithHttpInfo(Pet pet) throws Rest
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testEchoBodyFreeFormObjectResponseString(Object body) throws RestClientException {
public String testEchoBodyFreeFormObjectResponseString(@javax.annotation.Nullable Object body) throws RestClientException {
return testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body).getBody();
}

Expand All @@ -282,7 +282,7 @@ public String testEchoBodyFreeFormObjectResponseString(Object body) throws RestC
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object body) throws RestClientException {
public ResponseEntity<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(@javax.annotation.Nullable Object body) throws RestClientException {
Object localVarPostBody = body;


Expand Down Expand Up @@ -313,7 +313,7 @@ public ResponseEntity<String> testEchoBodyFreeFormObjectResponseStringWithHttpIn
* @return Pet
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public Pet testEchoBodyPet(Pet pet) throws RestClientException {
public Pet testEchoBodyPet(@javax.annotation.Nullable Pet pet) throws RestClientException {
return testEchoBodyPetWithHttpInfo(pet).getBody();
}

Expand All @@ -325,7 +325,7 @@ public Pet testEchoBodyPet(Pet pet) throws RestClientException {
* @return ResponseEntity&lt;Pet&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Pet> testEchoBodyPetWithHttpInfo(Pet pet) throws RestClientException {
public ResponseEntity<Pet> testEchoBodyPetWithHttpInfo(@javax.annotation.Nullable Pet pet) throws RestClientException {
Object localVarPostBody = pet;


Expand Down Expand Up @@ -356,7 +356,7 @@ public ResponseEntity<Pet> testEchoBodyPetWithHttpInfo(Pet pet) throws RestClien
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testEchoBodyPetResponseString(Pet pet) throws RestClientException {
public String testEchoBodyPetResponseString(@javax.annotation.Nullable Pet pet) throws RestClientException {
return testEchoBodyPetResponseStringWithHttpInfo(pet).getBody();
}

Expand All @@ -368,7 +368,7 @@ public String testEchoBodyPetResponseString(Pet pet) throws RestClientException
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testEchoBodyPetResponseStringWithHttpInfo(Pet pet) throws RestClientException {
public ResponseEntity<String> testEchoBodyPetResponseStringWithHttpInfo(@javax.annotation.Nullable Pet pet) throws RestClientException {
Object localVarPostBody = pet;


Expand Down Expand Up @@ -399,7 +399,7 @@ public ResponseEntity<String> testEchoBodyPetResponseStringWithHttpInfo(Pet pet)
* @return StringEnumRef
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public StringEnumRef testEchoBodyStringEnum(String body) throws RestClientException {
public StringEnumRef testEchoBodyStringEnum(@javax.annotation.Nullable String body) throws RestClientException {
return testEchoBodyStringEnumWithHttpInfo(body).getBody();
}

Expand All @@ -411,7 +411,7 @@ public StringEnumRef testEchoBodyStringEnum(String body) throws RestClientExcept
* @return ResponseEntity&lt;StringEnumRef&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<StringEnumRef> testEchoBodyStringEnumWithHttpInfo(String body) throws RestClientException {
public ResponseEntity<StringEnumRef> testEchoBodyStringEnumWithHttpInfo(@javax.annotation.Nullable String body) throws RestClientException {
Object localVarPostBody = body;


Expand Down Expand Up @@ -442,7 +442,7 @@ public ResponseEntity<StringEnumRef> testEchoBodyStringEnumWithHttpInfo(String b
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testEchoBodyTagResponseString(Tag tag) throws RestClientException {
public String testEchoBodyTagResponseString(@javax.annotation.Nullable Tag tag) throws RestClientException {
return testEchoBodyTagResponseStringWithHttpInfo(tag).getBody();
}

Expand All @@ -454,7 +454,7 @@ public String testEchoBodyTagResponseString(Tag tag) throws RestClientException
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testEchoBodyTagResponseStringWithHttpInfo(Tag tag) throws RestClientException {
public ResponseEntity<String> testEchoBodyTagResponseStringWithHttpInfo(@javax.annotation.Nullable Tag tag) throws RestClientException {
Object localVarPostBody = tag;


Expand Down
Loading
Loading