Move the singleRequestParameter template into a separate file (#21489)

* Move the singleRequestParameter template into a separate file

* Update formatting of non-singleRequestParameter webclient and restclient samples
This commit is contained in:
Mattias Sehlstedt
2025-07-02 09:18:52 +02:00
committed by GitHub
parent e948355127
commit 050dcae3ab
54 changed files with 812 additions and 690 deletions

View File

@@ -46,7 +46,6 @@ public class AnotherFakeApi {
this.apiClient = apiClient;
}
/**
* To test special tags
* To test special tags and operation ID starting with number

View File

@@ -46,7 +46,6 @@ public class DefaultApi {
this.apiClient = apiClient;
}
/**
*
*

View File

@@ -60,7 +60,6 @@ public class FakeApi {
this.apiClient = apiClient;
}
/**
*
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
@@ -279,10 +278,10 @@ public class FakeApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec fakeHttpSignatureTestWithResponseSpec(FakeHttpSignatureTestRequest requestParameters) throws WebClientResponseException {
return this.fakeHttpSignatureTestWithResponseSpec(requestParameters.pet(), requestParameters.query1(), requestParameters.header1());
return this.fakeHttpSignatureTestWithResponseSpec(requestParameters.pet(), requestParameters.query1(), requestParameters.header1());
}
/**
* test http signature authentication
*
@@ -1012,10 +1011,10 @@ public class FakeApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec testBodyWithQueryParamsWithResponseSpec(TestBodyWithQueryParamsRequest requestParameters) throws WebClientResponseException {
return this.testBodyWithQueryParamsWithResponseSpec(requestParameters.query(), requestParameters.user());
return this.testBodyWithQueryParamsWithResponseSpec(requestParameters.query(), requestParameters.user());
}
/**
*
*
@@ -1383,10 +1382,10 @@ public class FakeApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec testEndpointParametersWithResponseSpec(TestEndpointParametersRequest requestParameters) throws WebClientResponseException {
return this.testEndpointParametersWithResponseSpec(requestParameters.number(), requestParameters._double(), requestParameters.patternWithoutDelimiter(), requestParameters._byte(), requestParameters.integer(), requestParameters.int32(), requestParameters.int64(), requestParameters._float(), requestParameters.string(), requestParameters.binary(), requestParameters.date(), requestParameters.dateTime(), requestParameters.password(), requestParameters.paramCallback());
return this.testEndpointParametersWithResponseSpec(requestParameters.number(), requestParameters._double(), requestParameters.patternWithoutDelimiter(), requestParameters._byte(), requestParameters.integer(), requestParameters.int32(), requestParameters.int64(), requestParameters._float(), requestParameters.string(), requestParameters.binary(), requestParameters.date(), requestParameters.dateTime(), requestParameters.password(), requestParameters.paramCallback());
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@@ -1711,10 +1710,10 @@ public class FakeApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec testEnumParametersWithResponseSpec(TestEnumParametersRequest requestParameters) throws WebClientResponseException {
return this.testEnumParametersWithResponseSpec(requestParameters.enumHeaderStringArray(), requestParameters.enumHeaderString(), requestParameters.enumQueryStringArray(), requestParameters.enumQueryString(), requestParameters.enumQueryInteger(), requestParameters.enumQueryDouble(), requestParameters.enumQueryModelArray(), requestParameters.enumFormStringArray(), requestParameters.enumFormString());
return this.testEnumParametersWithResponseSpec(requestParameters.enumHeaderStringArray(), requestParameters.enumHeaderString(), requestParameters.enumQueryStringArray(), requestParameters.enumQueryString(), requestParameters.enumQueryInteger(), requestParameters.enumQueryDouble(), requestParameters.enumQueryModelArray(), requestParameters.enumFormStringArray(), requestParameters.enumFormString());
}
/**
* To test enum parameters
* To test enum parameters
@@ -1954,10 +1953,10 @@ public class FakeApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec testGroupParametersWithResponseSpec(TestGroupParametersRequest requestParameters) throws WebClientResponseException {
return this.testGroupParametersWithResponseSpec(requestParameters.requiredStringGroup(), requestParameters.requiredBooleanGroup(), requestParameters.requiredInt64Group(), requestParameters.stringGroup(), requestParameters.booleanGroup(), requestParameters.int64Group());
return this.testGroupParametersWithResponseSpec(requestParameters.requiredStringGroup(), requestParameters.requiredBooleanGroup(), requestParameters.requiredInt64Group(), requestParameters.stringGroup(), requestParameters.booleanGroup(), requestParameters.int64Group());
}
/**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
@@ -2281,10 +2280,10 @@ public class FakeApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec testJsonFormDataWithResponseSpec(TestJsonFormDataRequest requestParameters) throws WebClientResponseException {
return this.testJsonFormDataWithResponseSpec(requestParameters.param(), requestParameters.param2());
return this.testJsonFormDataWithResponseSpec(requestParameters.param(), requestParameters.param2());
}
/**
* test json serialization of form data
*
@@ -2570,10 +2569,10 @@ public class FakeApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec testQueryParameterCollectionFormatWithResponseSpec(TestQueryParameterCollectionFormatRequest requestParameters) throws WebClientResponseException {
return this.testQueryParameterCollectionFormatWithResponseSpec(requestParameters.pipe(), requestParameters.ioutil(), requestParameters.http(), requestParameters.url(), requestParameters.context(), requestParameters.allowEmpty(), requestParameters.language());
return this.testQueryParameterCollectionFormatWithResponseSpec(requestParameters.pipe(), requestParameters.ioutil(), requestParameters.http(), requestParameters.url(), requestParameters.context(), requestParameters.allowEmpty(), requestParameters.language());
}
/**
*
* To test the collection format in query parameters

View File

@@ -46,7 +46,6 @@ public class FakeClassnameTags123Api {
this.apiClient = apiClient;
}
/**
* To test class name in snake case
* To test class name in snake case

View File

@@ -49,7 +49,6 @@ public class PetApi {
this.apiClient = apiClient;
}
/**
* Add a new pet to the store
*
@@ -204,10 +203,10 @@ public class PetApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec deletePetWithResponseSpec(DeletePetRequest requestParameters) throws WebClientResponseException {
return this.deletePetWithResponseSpec(requestParameters.petId(), requestParameters.apiKey());
return this.deletePetWithResponseSpec(requestParameters.petId(), requestParameters.apiKey());
}
/**
* Deletes a pet
*
@@ -705,10 +704,10 @@ public class PetApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updatePetWithFormWithResponseSpec(UpdatePetWithFormRequest requestParameters) throws WebClientResponseException {
return this.updatePetWithFormWithResponseSpec(requestParameters.petId(), requestParameters.name(), requestParameters.status());
return this.updatePetWithFormWithResponseSpec(requestParameters.petId(), requestParameters.name(), requestParameters.status());
}
/**
* Updates a pet in the store with form data
*
@@ -888,10 +887,10 @@ public class PetApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec uploadFileWithResponseSpec(UploadFileRequest requestParameters) throws WebClientResponseException {
return this.uploadFileWithResponseSpec(requestParameters.petId(), requestParameters.additionalMetadata(), requestParameters._file());
return this.uploadFileWithResponseSpec(requestParameters.petId(), requestParameters.additionalMetadata(), requestParameters._file());
}
/**
* uploads an image
*
@@ -1072,10 +1071,10 @@ public class PetApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec uploadFileWithRequiredFileWithResponseSpec(UploadFileWithRequiredFileRequest requestParameters) throws WebClientResponseException {
return this.uploadFileWithRequiredFileWithResponseSpec(requestParameters.petId(), requestParameters.requiredFile(), requestParameters.additionalMetadata());
return this.uploadFileWithRequiredFileWithResponseSpec(requestParameters.petId(), requestParameters.requiredFile(), requestParameters.additionalMetadata());
}
/**
* uploads an image (required)
*

View File

@@ -46,7 +46,6 @@ public class StoreApi {
this.apiClient = apiClient;
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

View File

@@ -47,7 +47,6 @@ public class UserApi {
this.apiClient = apiClient;
}
/**
* Create user
* This can only be done by the logged in user.
@@ -497,10 +496,10 @@ public class UserApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loginUserWithResponseSpec(LoginUserRequest requestParameters) throws WebClientResponseException {
return this.loginUserWithResponseSpec(requestParameters.username(), requestParameters.password());
return this.loginUserWithResponseSpec(requestParameters.username(), requestParameters.password());
}
/**
* Logs user into the system
*
@@ -729,10 +728,10 @@ public class UserApi {
* @throws WebClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateUserWithResponseSpec(UpdateUserRequest requestParameters) throws WebClientResponseException {
return this.updateUserWithResponseSpec(requestParameters.username(), requestParameters.user());
return this.updateUserWithResponseSpec(requestParameters.username(), requestParameters.user());
}
/**
* Updated user
* This can only be done by the logged in user.