diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java index 5ae17d212c1..6d4b2e28738 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/Swift5ClientCodegen.java @@ -770,9 +770,9 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig if (p.getEnum() != null && !p.getEnum().isEmpty()) { if (p.getDefault() != null) { if (ModelUtils.isStringSchema(p)) { - return "." + toEnumVarName(escapeText((String) p.getDefault()), p.getType()); + return "." + toEnumVarName(escapeText(String.valueOf(p.getDefault())), p.getType()); } else { - return "." + toEnumVarName(escapeText(p.getDefault().toString()), p.getType()); + return "." + toEnumVarName(escapeText(String.valueOf(p.getDefault())), p.getType()); } } } @@ -786,7 +786,7 @@ public class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig long epochMicro = TimeUnit.SECONDS.toMicros(instant.getEpochSecond()) + (instant.get(ChronoField.MICRO_OF_SECOND)); return "Date(timeIntervalSince1970: " + epochMicro + ".0 / 1_000_000)"; } else if (ModelUtils.isStringSchema(p)) { - return "\"" + escapeText((String) p.getDefault()) + "\""; + return "\"" + escapeText(String.valueOf(p.getDefault())) + "\""; } // TODO: Handle more cases from `ModelUtils`, such as Date } diff --git a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml index 91aa8232ec2..27901ae0b38 100644 --- a/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +++ b/modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml @@ -1019,6 +1019,13 @@ paths: required: true schema: $ref: '#/definitions/Client' + - in: header + name: uuid_test + description: to test uuid example value + required: true + default: 1111-2222-3333-4444 + type: string + format: uuid responses: '200': description: successful operation diff --git a/samples/client/petstore/bash/_petstore-cli b/samples/client/petstore/bash/_petstore-cli index b5dfdf2084f..2503315453f 100644 --- a/samples/client/petstore/bash/_petstore-cli +++ b/samples/client/petstore/bash/_petstore-cli @@ -341,7 +341,8 @@ case $state in call123TestSpecialTags) local -a _op_arguments _op_arguments=( - ) + "uuid_test\::[HEADER] to test uuid example value" +) _describe -t actions 'operations' _op_arguments -S '' && ret=0 ;; createXmlItem) diff --git a/samples/client/petstore/bash/docs/AnotherFakeApi.md b/samples/client/petstore/bash/docs/AnotherFakeApi.md index e17a9e75d00..68fe03e4737 100644 --- a/samples/client/petstore/bash/docs/AnotherFakeApi.md +++ b/samples/client/petstore/bash/docs/AnotherFakeApi.md @@ -17,7 +17,7 @@ To test special tags and operation ID starting with number ### Example ```bash -petstore-cli call123TestSpecialTags +petstore-cli call123TestSpecialTags uuid_test:value ``` ### Parameters @@ -25,6 +25,7 @@ petstore-cli call123TestSpecialTags Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **uuidTest** | **string** | to test uuid example value | [default to null] **body** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/client/petstore/bash/petstore-cli b/samples/client/petstore/bash/petstore-cli index 802f75430c0..18097dc76cc 100755 --- a/samples/client/petstore/bash/petstore-cli +++ b/samples/client/petstore/bash/petstore-cli @@ -95,6 +95,7 @@ declare -a result_color_table=( "$WHITE" "$WHITE" "$GREEN" "$YELLOW" "$WHITE" "$ # 0 - optional # 1 - required declare -A operation_parameters_minimum_occurrences +operation_parameters_minimum_occurrences["call123TestSpecialTags:::uuid_test"]=1 operation_parameters_minimum_occurrences["call123TestSpecialTags:::body"]=1 operation_parameters_minimum_occurrences["createXmlItem:::XmlItem"]=1 operation_parameters_minimum_occurrences["fakeOuterBooleanSerialize:::body"]=0 @@ -178,6 +179,7 @@ operation_parameters_minimum_occurrences["updateUser:::body"]=1 # N - N values # 0 - unlimited declare -A operation_parameters_maximum_occurrences +operation_parameters_maximum_occurrences["call123TestSpecialTags:::uuid_test"]=0 operation_parameters_maximum_occurrences["call123TestSpecialTags:::body"]=0 operation_parameters_maximum_occurrences["createXmlItem:::XmlItem"]=0 operation_parameters_maximum_occurrences["fakeOuterBooleanSerialize:::body"]=0 @@ -258,6 +260,7 @@ operation_parameters_maximum_occurrences["updateUser:::body"]=0 # The type of collection for specifying multiple values for parameter: # - multi, csv, ssv, tsv declare -A operation_parameters_collection_type +operation_parameters_collection_type["call123TestSpecialTags:::uuid_test"]="" operation_parameters_collection_type["call123TestSpecialTags:::body"]="" operation_parameters_collection_type["createXmlItem:::XmlItem"]="" operation_parameters_collection_type["fakeOuterBooleanSerialize:::body"]="" @@ -889,6 +892,7 @@ print_call123TestSpecialTags_help() { echo -e "To test special tags and operation ID starting with number" | paste -sd' ' | fold -sw 80 echo -e "" echo -e "${BOLD}${WHITE}Parameters${OFF}" + echo -e " * ${GREEN}uuid_test${OFF} ${BLUE}[string]${OFF} ${RED}(required)${OFF} ${CYAN}(default: null)${OFF} - to test uuid example value ${YELLOW}Specify as: uuid_test:value${OFF}" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo -e " * ${GREEN}body${OFF} ${BLUE}[application/json]${OFF} ${RED}(required)${OFF}${OFF} - client model" | paste -sd' ' | fold -sw 80 | sed '2,$s/^/ /' echo -e "" echo "" diff --git a/samples/client/petstore/bash/petstore-cli.bash-completion b/samples/client/petstore/bash/petstore-cli.bash-completion index 6ca8dda0535..d6139e32d9f 100644 --- a/samples/client/petstore/bash/petstore-cli.bash-completion +++ b/samples/client/petstore/bash/petstore-cli.bash-completion @@ -109,7 +109,7 @@ _petstore-cli() # An associative array of operations to their parameters # Only include path, query and header parameters declare -A operation_parameters - operation_parameters["call123TestSpecialTags"]="" + operation_parameters["call123TestSpecialTags"]="uuid_test: " operation_parameters["createXmlItem"]="" operation_parameters["fakeOuterBooleanSerialize"]="" operation_parameters["fakeOuterCompositeSerialize"]="" diff --git a/samples/client/petstore/go/go-petstore/api/openapi.yaml b/samples/client/petstore/go/go-petstore/api/openapi.yaml index cc8ec0eb7b9..8d9c8d5ff5e 100644 --- a/samples/client/petstore/go/go-petstore/api/openapi.yaml +++ b/samples/client/petstore/go/go-petstore/api/openapi.yaml @@ -959,6 +959,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/go/go-petstore/api_another_fake.go b/samples/client/petstore/go/go-petstore/api_another_fake.go index b27bbd0a987..fb2f9d43fbc 100644 --- a/samples/client/petstore/go/go-petstore/api_another_fake.go +++ b/samples/client/petstore/go/go-petstore/api_another_fake.go @@ -42,9 +42,16 @@ type AnotherFakeAPIService service type ApiCall123TestSpecialTagsRequest struct { ctx context.Context ApiService AnotherFakeAPI + uuidTest *string body *Client } +// to test uuid example value +func (r ApiCall123TestSpecialTagsRequest) UuidTest(uuidTest string) ApiCall123TestSpecialTagsRequest { + r.uuidTest = &uuidTest + return r +} + // client model func (r ApiCall123TestSpecialTagsRequest) Body(body Client) ApiCall123TestSpecialTagsRequest { r.body = &body @@ -90,6 +97,9 @@ func (a *AnotherFakeAPIService) Call123TestSpecialTagsExecute(r ApiCall123TestSp localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.uuidTest == nil { + return localVarReturnValue, nil, reportError("uuidTest is required and must be specified") + } if r.body == nil { return localVarReturnValue, nil, reportError("body is required and must be specified") } @@ -111,6 +121,7 @@ func (a *AnotherFakeAPIService) Call123TestSpecialTagsExecute(r ApiCall123TestSp if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + parameterAddToHeaderOrQuery(localVarHeaderParams, "uuid_test", r.uuidTest, "") // body params localVarPostBody = r.body req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) diff --git a/samples/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md b/samples/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md index 28db8d45fa6..fe1788992d2 100644 --- a/samples/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/go/go-petstore/docs/AnotherFakeAPI.md @@ -10,7 +10,7 @@ Method | HTTP request | Description ## Call123TestSpecialTags -> Client Call123TestSpecialTags(ctx).Body(body).Execute() +> Client Call123TestSpecialTags(ctx).UuidTest(uuidTest).Body(body).Execute() To test special tags @@ -29,11 +29,12 @@ import ( ) func main() { + uuidTest := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | to test uuid example value body := *openapiclient.NewClient() // Client | client model configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AnotherFakeAPI.Call123TestSpecialTags(context.Background()).Body(body).Execute() + resp, r, err := apiClient.AnotherFakeAPI.Call123TestSpecialTags(context.Background()).UuidTest(uuidTest).Body(body).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `AnotherFakeAPI.Call123TestSpecialTags``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) @@ -54,6 +55,7 @@ Other parameters are passed through a pointer to a apiCall123TestSpecialTagsRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **uuidTest** | **string** | to test uuid example value | **body** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs index 0d9ed04e89f..4e5a8c520d2 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/API/AnotherFake.hs @@ -68,10 +68,12 @@ import qualified Prelude as P op123testSpecialTags :: (Consumes Op123testSpecialTags MimeJSON, MimeRender MimeJSON Client) => Client -- ^ "body" - client model + -> UuidTest -- ^ "uuidTest" - to test uuid example value -> OpenAPIPetstoreRequest Op123testSpecialTags MimeJSON Client MimeJSON -op123testSpecialTags body = +op123testSpecialTags body (UuidTest uuidTest) = _mkRequest "PATCH" ["/another-fake/dummy"] `setBodyParam` body + `addHeader` toHeader ("uuid_test", uuidTest) data Op123testSpecialTags diff --git a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs index 4749e10f4f5..38774062047 100644 --- a/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs +++ b/samples/client/petstore/haskell-http-client/lib/OpenAPIPetstore/Model.hs @@ -225,6 +225,9 @@ newtype Url = Url { unUrl :: [Text] } deriving (P.Eq, P.Show) -- ** Username newtype Username = Username { unUsername :: Text } deriving (P.Eq, P.Show) +-- ** UuidTest +newtype UuidTest = UuidTest { unUuidTest :: Text } deriving (P.Eq, P.Show) + -- * Models diff --git a/samples/client/petstore/haskell-http-client/openapi.yaml b/samples/client/petstore/haskell-http-client/openapi.yaml index cc8ec0eb7b9..8d9c8d5ff5e 100644 --- a/samples/client/petstore/haskell-http-client/openapi.yaml +++ b/samples/client/petstore/haskell-http-client/openapi.yaml @@ -959,6 +959,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md b/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md index 74b604a58f3..9fe5b25368f 100644 --- a/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md +++ b/samples/client/petstore/java-micronaut-client/docs/apis/AnotherFakeApi.md @@ -38,7 +38,7 @@ More information can be found inside [Inversion of Control guide section](https: # **call123testSpecialTags** ```java -Mono AnotherFakeApi.call123testSpecialTags(_body) +Mono AnotherFakeApi.call123testSpecialTags(uuidTest_body) ``` To test special tags @@ -48,6 +48,7 @@ To test special tags and operation ID starting with number ### Parameters | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | `UUID`| to test uuid example value | | | **_body** | [**ModelClient**](ModelClient.md)| client model | | diff --git a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java index ac74f0d91d9..1be1e9da3c4 100644 --- a/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/client/petstore/java-micronaut-client/src/main/java/org/openapitools/api/AnotherFakeApi.java @@ -18,6 +18,7 @@ import io.micronaut.http.client.annotation.Client; import io.micronaut.core.convert.format.Format; import reactor.core.publisher.Mono; import org.openapitools.model.ModelClient; +import java.util.UUID; import javax.annotation.Generated; import java.util.ArrayList; import java.util.HashMap; @@ -33,6 +34,7 @@ public interface AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number * + * @param uuidTest to test uuid example value (required) * @param _body client model (required) * @return ModelClient */ @@ -40,6 +42,7 @@ public interface AnotherFakeApi { @Consumes({"application/json"}) @Produces({"application/json"}) Mono call123testSpecialTags( + @Header(name="uuid_test") @NotNull UUID uuidTest, @Body @NotNull @Valid ModelClient _body ); diff --git a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/feign-no-nullable/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index db3647bf64d..f6b9077ea12 100644 --- a/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/feign-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -5,6 +5,7 @@ import org.openapitools.client.EncodingUtils; import org.openapitools.client.model.ApiResponse; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -19,6 +20,7 @@ public interface AnotherFakeApi extends ApiClient.Api { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client */ @@ -26,13 +28,15 @@ public interface AnotherFakeApi extends ApiClient.Api { @Headers({ "Content-Type: application/json", "Accept: application/json", + "uuid_test: {uuidTest}" }) - Client call123testSpecialTags(Client body); + Client call123testSpecialTags(@Param("uuidTest") UUID uuidTest, Client body); /** * To test special tags * Similar to call123testSpecialTags but it also returns the http response headers . * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return A ApiResponse that wraps the response boyd and the http headers. */ @@ -40,8 +44,9 @@ public interface AnotherFakeApi extends ApiClient.Api { @Headers({ "Content-Type: application/json", "Accept: application/json", + "uuid_test: {uuidTest}" }) - ApiResponse call123testSpecialTagsWithHttpInfo(Client body); + ApiResponse call123testSpecialTagsWithHttpInfo(@Param("uuidTest") UUID uuidTest, Client body); } diff --git a/samples/client/petstore/java/google-api-client/README.md b/samples/client/petstore/java/google-api-client/README.md index 107b18cd631..c0783b8b081 100644 --- a/samples/client/petstore/java/google-api-client/README.md +++ b/samples/client/petstore/java/google-api-client/README.md @@ -91,9 +91,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/google-api-client/api/openapi.yaml b/samples/client/petstore/java/google-api-client/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/google-api-client/api/openapi.yaml +++ b/samples/client/petstore/java/google-api-client/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md index f1ca8fe00b5..e2b1f04ce7f 100644 --- a/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/google-api-client/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index d9d0b8602d2..56d346dec24 100644 --- a/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/google-api-client/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -3,6 +3,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; +import java.util.UUID; import com.fasterxml.jackson.core.type.TypeReference; import com.google.api.client.http.EmptyContent; @@ -45,12 +46,13 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation + * @param uuidTest to test uuid example value * @param body client model * @return Client * @throws IOException if an error occurs while attempting to invoke the API **/ - public Client call123testSpecialTags(Client body) throws IOException { - HttpResponse response = call123testSpecialTagsForHttpResponse(body); + public Client call123testSpecialTags(UUID uuidTest, Client body) throws IOException { + HttpResponse response = call123testSpecialTagsForHttpResponse(uuidTest, body); TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } @@ -59,19 +61,23 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation + * @param uuidTest to test uuid example value * @param body client model * @param params Map of query params. A collection will be interpreted as passing in multiple instances of the same query param. * @return Client * @throws IOException if an error occurs while attempting to invoke the API **/ - public Client call123testSpecialTags(Client body, Map params) throws IOException { - HttpResponse response = call123testSpecialTagsForHttpResponse(body, params); + public Client call123testSpecialTags(UUID uuidTest, Client body, Map params) throws IOException { + HttpResponse response = call123testSpecialTagsForHttpResponse(uuidTest, body, params); TypeReference typeRef = new TypeReference() {}; return apiClient.getObjectMapper().readValue(response.getContent(), typeRef); } - public HttpResponse call123testSpecialTagsForHttpResponse(Client body) throws IOException { - // verify the required parameter 'body' is set + public HttpResponse call123testSpecialTagsForHttpResponse(UUID uuidTest, Client body) throws IOException { + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new IllegalArgumentException("Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + }// verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling call123testSpecialTags"); } @@ -84,8 +90,11 @@ public class AnotherFakeApi { return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } - public HttpResponse call123testSpecialTagsForHttpResponse(java.io.InputStream body, String mediaType) throws IOException { - // verify the required parameter 'body' is set + public HttpResponse call123testSpecialTagsForHttpResponse(UUID uuidTest, java.io.InputStream body, String mediaType) throws IOException { + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new IllegalArgumentException("Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + }// verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling call123testSpecialTags"); } @@ -100,8 +109,11 @@ public class AnotherFakeApi { return apiClient.getHttpRequestFactory().buildRequest(HttpMethods.PATCH, genericUrl, content).execute(); } - public HttpResponse call123testSpecialTagsForHttpResponse(Client body, Map params) throws IOException { - // verify the required parameter 'body' is set + public HttpResponse call123testSpecialTagsForHttpResponse(UUID uuidTest, Client body, Map params) throws IOException { + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new IllegalArgumentException("Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + }// verify the required parameter 'body' is set if (body == null) { throw new IllegalArgumentException("Missing the required parameter 'body' when calling call123testSpecialTags"); } diff --git a/samples/client/petstore/java/jersey1/README.md b/samples/client/petstore/java/jersey1/README.md index e1a7fdd7633..834f4eef0d6 100644 --- a/samples/client/petstore/java/jersey1/README.md +++ b/samples/client/petstore/java/jersey1/README.md @@ -91,9 +91,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey1/api/openapi.yaml b/samples/client/petstore/java/jersey1/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/jersey1/api/openapi.yaml +++ b/samples/client/petstore/java/jersey1/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md index f1ca8fe00b5..e2b1f04ce7f 100644 --- a/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey1/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 2cc17cbcbed..41251dc64fb 100644 --- a/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey1/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -21,6 +21,7 @@ import org.openapitools.client.model.*; import org.openapitools.client.Pair; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; @@ -51,13 +52,19 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client * @throws ApiException if fails to make API call */ - public Client call123testSpecialTags(Client body) throws ApiException { + public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException { Object localVarPostBody = body; + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); @@ -74,7 +81,9 @@ public class AnotherFakeApi { Map localVarFormParams = new HashMap(); - + if (uuidTest != null) + localVarHeaderParams.put("uuid_test", apiClient.parameterToString(uuidTest)); + final String[] localVarAccepts = { diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/README.md b/samples/client/petstore/java/jersey2-java8-localdatetime/README.md index e582668b206..d4227d72002 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/README.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/README.md @@ -116,9 +116,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md index c95eeb0b8c8..78dd3d69d40 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -19,6 +19,7 @@ To test special tags and operation ID starting with number ### Example ```java +import java.util.UUID; // Import classes: import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; @@ -32,9 +33,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +54,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 540cf2cbba3..cd4b4d2c66b 100644 --- a/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -9,6 +9,7 @@ import org.openapitools.client.Pair; import javax.ws.rs.core.GenericType; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -49,6 +50,7 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client * @throws ApiException if fails to make API call @@ -58,13 +60,14 @@ public class AnotherFakeApi { 200 successful operation - */ - public Client call123testSpecialTags(Client body) throws ApiException { - return call123testSpecialTagsWithHttpInfo(body).getData(); + public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException { + return call123testSpecialTagsWithHttpInfo(uuidTest, body).getData(); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call @@ -74,17 +77,24 @@ public class AnotherFakeApi { 200 successful operation - */ - public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { + public ApiResponse call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws ApiException { // Check required parameters + if (uuidTest == null) { + throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + } if (body == null) { throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); } + // Header parameters + Map localVarHeaderParams = new LinkedHashMap<>(); + localVarHeaderParams.put("uuid_test", apiClient.parameterToString(uuidTest)); + String localVarAccept = apiClient.selectHeaderAccept("application/json"); String localVarContentType = apiClient.selectHeaderContentType("application/json"); GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", "/another-fake/dummy", "PATCH", new ArrayList<>(), body, - new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, null, localVarReturnType, false); } } diff --git a/samples/client/petstore/java/jersey2-java8/README.md b/samples/client/petstore/java/jersey2-java8/README.md index 5b342eff3fe..09086297901 100644 --- a/samples/client/petstore/java/jersey2-java8/README.md +++ b/samples/client/petstore/java/jersey2-java8/README.md @@ -116,9 +116,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/jersey2-java8/api/openapi.yaml +++ b/samples/client/petstore/java/jersey2-java8/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md index c95eeb0b8c8..78dd3d69d40 100644 --- a/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/jersey2-java8/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -19,6 +19,7 @@ To test special tags and operation ID starting with number ### Example ```java +import java.util.UUID; // Import classes: import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; @@ -32,9 +33,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +54,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 540cf2cbba3..cd4b4d2c66b 100644 --- a/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -9,6 +9,7 @@ import org.openapitools.client.Pair; import javax.ws.rs.core.GenericType; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -49,6 +50,7 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client * @throws ApiException if fails to make API call @@ -58,13 +60,14 @@ public class AnotherFakeApi { 200 successful operation - */ - public Client call123testSpecialTags(Client body) throws ApiException { - return call123testSpecialTagsWithHttpInfo(body).getData(); + public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException { + return call123testSpecialTagsWithHttpInfo(uuidTest, body).getData(); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException if fails to make API call @@ -74,17 +77,24 @@ public class AnotherFakeApi { 200 successful operation - */ - public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { + public ApiResponse call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws ApiException { // Check required parameters + if (uuidTest == null) { + throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + } if (body == null) { throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); } + // Header parameters + Map localVarHeaderParams = new LinkedHashMap<>(); + localVarHeaderParams.put("uuid_test", apiClient.parameterToString(uuidTest)); + String localVarAccept = apiClient.selectHeaderAccept("application/json"); String localVarContentType = apiClient.selectHeaderContentType("application/json"); GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", "/another-fake/dummy", "PATCH", new ArrayList<>(), body, - new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, + localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType, null, localVarReturnType, false); } } diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md index f4d7e69f9a5..d74d54a790a 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/README.md @@ -91,9 +91,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md index 4dfb9e68e61..3b390ea25a0 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/docs/AnotherFakeApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* # **call123testSpecialTags** -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -30,9 +30,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -49,6 +50,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index d004aeadc4f..23c621ba634 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -31,6 +31,7 @@ import java.io.IOException; import org.openapitools.client.model.Client; +import java.util.UUID; import java.lang.reflect.Type; import java.util.ArrayList; @@ -77,6 +78,7 @@ public class AnotherFakeApi { /** * Build call for call123testSpecialTags + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -87,7 +89,7 @@ public class AnotherFakeApi { 200 successful operation - */ - public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call call123testSpecialTagsCall(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -111,6 +113,7 @@ public class AnotherFakeApi { Operation operation = apiOperation.getOperation(); String localVarPath = apiOperation.getPath(); Map paramMap = new HashMap<>(); + paramMap.put("uuid_test", uuidTest); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -141,19 +144,25 @@ public class AnotherFakeApi { } @SuppressWarnings("rawtypes") - private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call call123testSpecialTagsValidateBeforeCall(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new ApiException("Missing the required parameter 'uuidTest' when calling call123testSpecialTags(Async)"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling call123testSpecialTags(Async)"); } - return call123testSpecialTagsCall(body, _callback); + return call123testSpecialTagsCall(uuidTest, body, _callback); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -163,14 +172,15 @@ public class AnotherFakeApi { 200 successful operation - */ - public Client call123testSpecialTags(Client body) throws ApiException { - ApiResponse localVarResp = call123testSpecialTagsWithHttpInfo(body); + public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException { + ApiResponse localVarResp = call123testSpecialTagsWithHttpInfo(uuidTest, body); return localVarResp.getData(); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -180,8 +190,8 @@ public class AnotherFakeApi { 200 successful operation - */ - public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { - okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null); + public ApiResponse call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws ApiException { + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(uuidTest, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -189,6 +199,7 @@ public class AnotherFakeApi { /** * To test special tags (asynchronously) * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -199,9 +210,9 @@ public class AnotherFakeApi { 200 successful operation - */ - public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call call123testSpecialTagsAsync(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _callback); + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(uuidTest, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/resources/openapi/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md index ec48f311ce8..e85db387b9a 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/README.md @@ -91,9 +91,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md index 4dfb9e68e61..3b390ea25a0 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/docs/AnotherFakeApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* # **call123testSpecialTags** -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -30,9 +30,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -49,6 +50,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 35891b558b6..6c87a69c007 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -28,6 +28,7 @@ import java.io.IOException; import org.openapitools.client.model.Client; +import java.util.UUID; import java.lang.reflect.Type; import java.util.ArrayList; @@ -74,6 +75,7 @@ public class AnotherFakeApi { /** * Build call for call123testSpecialTags + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -84,7 +86,7 @@ public class AnotherFakeApi { 200 successful operation - */ - public okhttp3.Call call123testSpecialTagsCall(Client body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call call123testSpecialTagsCall(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -109,6 +111,10 @@ public class AnotherFakeApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + if (uuidTest != null) { + localVarHeaderParams.put("uuid_test", localVarApiClient.parameterToString(uuidTest)); + } + final String[] localVarAccepts = { "application/json" }; @@ -130,19 +136,25 @@ public class AnotherFakeApi { } @SuppressWarnings("rawtypes") - private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ApiCallback _callback) throws ApiException { + private okhttp3.Call call123testSpecialTagsValidateBeforeCall(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new ApiException("Missing the required parameter 'uuidTest' when calling call123testSpecialTags(Async)"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException("Missing the required parameter 'body' when calling call123testSpecialTags(Async)"); } - return call123testSpecialTagsCall(body, _callback); + return call123testSpecialTagsCall(uuidTest, body, _callback); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -152,14 +164,15 @@ public class AnotherFakeApi { 200 successful operation - */ - public Client call123testSpecialTags(Client body) throws ApiException { - ApiResponse localVarResp = call123testSpecialTagsWithHttpInfo(body); + public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException { + ApiResponse localVarResp = call123testSpecialTagsWithHttpInfo(uuidTest, body); return localVarResp.getData(); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return ApiResponse<Client> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -169,8 +182,8 @@ public class AnotherFakeApi { 200 successful operation - */ - public ApiResponse call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { - okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null); + public ApiResponse call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws ApiException { + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(uuidTest, body, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -178,6 +191,7 @@ public class AnotherFakeApi { /** * To test special tags (asynchronously) * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -188,9 +202,9 @@ public class AnotherFakeApi { 200 successful operation - */ - public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback _callback) throws ApiException { + public okhttp3.Call call123testSpecialTagsAsync(UUID uuidTest, Client body, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _callback); + okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(uuidTest, body, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured-jackson/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md b/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md index 74e48fa4496..f8551ba7253 100644 --- a/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/rest-assured-jackson/docs/AnotherFakeApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* # **call123testSpecialTags** -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -27,6 +27,7 @@ AnotherFakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSuppl .setBaseUri("http://petstore.swagger.io:80/v2"))).anotherFake(); api.call123testSpecialTags() + .uuidTestHeader(uuidTest) .body(body).execute(r -> r.prettyPeek()); ``` @@ -34,6 +35,7 @@ api.call123testSpecialTags() | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index a2d7e3d063e..4beb2b36714 100644 --- a/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/rest-assured-jackson/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -14,6 +14,7 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.Arrays; @@ -78,6 +79,7 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number * + * @see #uuidTestHeader to test uuid example value (required) * @see #body client model (required) * return Client */ @@ -126,6 +128,17 @@ public class AnotherFakeApi { return this; } + public static final String UUID_TEST_HEADER = "uuid_test"; + + /** + * @param uuidTest (UUID) to test uuid example value (required) + * @return operation + */ + public Call123testSpecialTagsOper uuidTestHeader(String uuidTest) { + reqSpec.addHeader(UUID_TEST_HEADER, uuidTest); + return this; + } + /** * Customize request specification * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder diff --git a/samples/client/petstore/java/rest-assured/api/openapi.yaml b/samples/client/petstore/java/rest-assured/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/rest-assured/api/openapi.yaml +++ b/samples/client/petstore/java/rest-assured/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md b/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md index 74e48fa4496..f8551ba7253 100644 --- a/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/rest-assured/docs/AnotherFakeApi.md @@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* # **call123testSpecialTags** -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -27,6 +27,7 @@ AnotherFakeApi api = ApiClient.api(ApiClient.Config.apiConfig().withReqSpecSuppl .setBaseUri("http://petstore.swagger.io:80/v2"))).anotherFake(); api.call123testSpecialTags() + .uuidTestHeader(uuidTest) .body(body).execute(r -> r.prettyPeek()); ``` @@ -34,6 +35,7 @@ api.call123testSpecialTags() | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 788bb9a8713..dcf36d88183 100644 --- a/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/rest-assured/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -15,6 +15,7 @@ package org.openapitools.client.api; import com.google.gson.reflect.TypeToken; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.Arrays; @@ -79,6 +80,7 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number * + * @see #uuidTestHeader to test uuid example value (required) * @see #body client model (required) * return Client */ @@ -127,6 +129,17 @@ public class AnotherFakeApi { return this; } + public static final String UUID_TEST_HEADER = "uuid_test"; + + /** + * @param uuidTest (UUID) to test uuid example value (required) + * @return operation + */ + public Call123testSpecialTagsOper uuidTestHeader(String uuidTest) { + reqSpec.addHeader(UUID_TEST_HEADER, uuidTest); + return this; + } + /** * Customize request specification * @param reqSpecCustomizer consumer to modify the RequestSpecBuilder diff --git a/samples/client/petstore/java/resteasy/README.md b/samples/client/petstore/java/resteasy/README.md index 391c3ed4eeb..6aade7f7bb2 100644 --- a/samples/client/petstore/java/resteasy/README.md +++ b/samples/client/petstore/java/resteasy/README.md @@ -91,9 +91,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/resteasy/api/openapi.yaml b/samples/client/petstore/java/resteasy/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/resteasy/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md index f1ca8fe00b5..e2b1f04ce7f 100644 --- a/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resteasy/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 64082a17167..ce5be20d947 100644 --- a/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -8,6 +8,7 @@ import org.openapitools.client.Pair; import javax.ws.rs.core.GenericType; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -37,13 +38,19 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return a {@code Client} * @throws ApiException if fails to make API call */ - public Client call123testSpecialTags(Client body) throws ApiException { + public Client call123testSpecialTags(UUID uuidTest, Client body) throws ApiException { Object localVarPostBody = body; + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new ApiException(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); @@ -59,7 +66,9 @@ public class AnotherFakeApi { Map localVarFormParams = new HashMap(); - + if (uuidTest != null) + localVarHeaderParams.put("uuid_test", apiClient.parameterToString(uuidTest)); + final String[] localVarAccepts = { diff --git a/samples/client/petstore/java/resttemplate-withXml/README.md b/samples/client/petstore/java/resttemplate-withXml/README.md index 426f315b0ba..1e94e69e786 100644 --- a/samples/client/petstore/java/resttemplate-withXml/README.md +++ b/samples/client/petstore/java/resttemplate-withXml/README.md @@ -91,9 +91,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate-withXml/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md index f1ca8fe00b5..e2b1f04ce7f 100644 --- a/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resttemplate-withXml/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 7a14617aa42..6c611d3a66e 100644 --- a/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate-withXml/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -3,6 +3,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.Collections; import java.util.HashMap; @@ -49,25 +50,32 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client call123testSpecialTags(Client body) throws RestClientException { - return call123testSpecialTagsWithHttpInfo(body).getBody(); + public Client call123testSpecialTags(UUID uuidTest, Client body) throws RestClientException { + return call123testSpecialTagsWithHttpInfo(uuidTest, body).getBody(); } /** * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity call123testSpecialTagsWithHttpInfo(Client body) throws RestClientException { + public ResponseEntity call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws RestClientException { Object localVarPostBody = body; + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + } + // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling call123testSpecialTags"); @@ -79,6 +87,9 @@ public class AnotherFakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + if (uuidTest != null) + localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest)); + final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/resttemplate/README.md b/samples/client/petstore/java/resttemplate/README.md index c2f7413a422..20ad076aeb9 100644 --- a/samples/client/petstore/java/resttemplate/README.md +++ b/samples/client/petstore/java/resttemplate/README.md @@ -91,9 +91,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/resttemplate/api/openapi.yaml b/samples/client/petstore/java/resttemplate/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/resttemplate/api/openapi.yaml +++ b/samples/client/petstore/java/resttemplate/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md b/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md index f1ca8fe00b5..e2b1f04ce7f 100644 --- a/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/resttemplate/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 7a14617aa42..6c611d3a66e 100644 --- a/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/resttemplate/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -3,6 +3,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.Collections; import java.util.HashMap; @@ -49,25 +50,32 @@ public class AnotherFakeApi { * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Client * @throws RestClientException if an error occurs while attempting to invoke the API */ - public Client call123testSpecialTags(Client body) throws RestClientException { - return call123testSpecialTagsWithHttpInfo(body).getBody(); + public Client call123testSpecialTags(UUID uuidTest, Client body) throws RestClientException { + return call123testSpecialTagsWithHttpInfo(uuidTest, body).getBody(); } /** * To test special tags * To test special tags and operation ID starting with number *

200 - successful operation + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return ResponseEntity<Client> * @throws RestClientException if an error occurs while attempting to invoke the API */ - public ResponseEntity call123testSpecialTagsWithHttpInfo(Client body) throws RestClientException { + public ResponseEntity call123testSpecialTagsWithHttpInfo(UUID uuidTest, Client body) throws RestClientException { Object localVarPostBody = body; + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags"); + } + // verify the required parameter 'body' is set if (body == null) { throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'body' when calling call123testSpecialTags"); @@ -79,6 +87,9 @@ public class AnotherFakeApi { final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + if (uuidTest != null) + localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest)); + final String[] localVarAccepts = { "application/json" }; diff --git a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2-play26/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md index ffa2dcec928..7d304d1a188 100644 --- a/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2-play26/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 4a546e53849..e613b9b8e09 100644 --- a/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -10,6 +10,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -23,6 +24,7 @@ public interface AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Call<Client> */ @@ -31,7 +33,7 @@ public interface AnotherFakeApi { }) @PATCH("another-fake/dummy") CompletionStage> call123testSpecialTags( - @retrofit2.http.Body Client body + @retrofit2.http.Header("uuid_test") UUID uuidTest, @retrofit2.http.Body Client body ); } diff --git a/samples/client/petstore/java/retrofit2/api/openapi.yaml b/samples/client/petstore/java/retrofit2/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/retrofit2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md index ffa2dcec928..7d304d1a188 100644 --- a/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index ebfb008e72b..cde24069691 100644 --- a/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -10,6 +10,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -21,6 +22,7 @@ public interface AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Call<Client> */ @@ -29,7 +31,7 @@ public interface AnotherFakeApi { }) @PATCH("another-fake/dummy") Call call123testSpecialTags( - @retrofit2.http.Body Client body + @retrofit2.http.Header("uuid_test") UUID uuidTest, @retrofit2.http.Body Client body ); } diff --git a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx2/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md index ffa2dcec928..7d304d1a188 100644 --- a/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2rx2/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 3c2273b377c..0a0bdb6eabf 100644 --- a/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2rx2/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -11,6 +11,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -22,6 +23,7 @@ public interface AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Observable<Client> */ @@ -30,7 +32,7 @@ public interface AnotherFakeApi { }) @PATCH("another-fake/dummy") Observable call123testSpecialTags( - @retrofit2.http.Body Client body + @retrofit2.http.Header("uuid_test") UUID uuidTest, @retrofit2.http.Body Client body ); } diff --git a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml +++ b/samples/client/petstore/java/retrofit2rx3/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md b/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md index ffa2dcec928..7d304d1a188 100644 --- a/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/retrofit2rx3/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index 52a0987156f..9c9c5db11c2 100644 --- a/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/retrofit2rx3/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -11,6 +11,7 @@ import okhttp3.ResponseBody; import okhttp3.MultipartBody; import org.openapitools.client.model.Client; +import java.util.UUID; import java.util.ArrayList; import java.util.HashMap; @@ -22,6 +23,7 @@ public interface AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Observable<Client> */ @@ -30,7 +32,7 @@ public interface AnotherFakeApi { }) @PATCH("another-fake/dummy") Observable call123testSpecialTags( - @retrofit2.http.Body Client body + @retrofit2.http.Header("uuid_test") UUID uuidTest, @retrofit2.http.Body Client body ); } diff --git a/samples/client/petstore/java/vertx-no-nullable/README.md b/samples/client/petstore/java/vertx-no-nullable/README.md index 804a5937183..55f91993139 100644 --- a/samples/client/petstore/java/vertx-no-nullable/README.md +++ b/samples/client/petstore/java/vertx-no-nullable/README.md @@ -91,9 +91,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml +++ b/samples/client/petstore/java/vertx-no-nullable/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md b/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md index f1ca8fe00b5..e2b1f04ce7f 100644 --- a/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/vertx-no-nullable/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index d6abe6d9338..7b484f9c814 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -2,6 +2,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; +import java.util.UUID; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import io.vertx.core.json.JsonObject; @@ -10,8 +11,8 @@ import java.util.*; public interface AnotherFakeApi { - void call123testSpecialTags(Client body, Handler> handler); + void call123testSpecialTags(UUID uuidTest, Client body, Handler> handler); - void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler> handler); + void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> handler); } diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java index 362a4a5174f..39c9f006f92 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java @@ -1,6 +1,7 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; +import java.util.UUID; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; @@ -43,23 +44,31 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, Handler> resultHandler) { - call123testSpecialTags(body, null, resultHandler); + public void call123testSpecialTags(UUID uuidTest, Client body, Handler> resultHandler) { + call123testSpecialTags(uuidTest, body, null, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { Object localVarBody = body; + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags")); + return; + } + // verify the required parameter 'body' is set if (body == null) { resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling call123testSpecialTags")); @@ -74,7 +83,9 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); - + if (uuidTest != null) + localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest)); + // cookie params MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); diff --git a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java index c7ce2478c76..18efeb9bd35 100644 --- a/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java +++ b/samples/client/petstore/java/vertx-no-nullable/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java @@ -1,6 +1,7 @@ package org.openapitools.client.api.rxjava; import org.openapitools.client.model.Client; +import java.util.UUID; import org.openapitools.client.ApiClient; import java.util.*; @@ -25,46 +26,50 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, Handler> resultHandler) { - delegate.call123testSpecialTags(body, resultHandler); + public void call123testSpecialTags(UUID uuidTest, Client body, Handler> resultHandler) { + delegate.call123testSpecialTags(uuidTest, body, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.call123testSpecialTags(body, authInfo, resultHandler); + public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.call123testSpecialTags(uuidTest, body, authInfo, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxCall123testSpecialTags(Client body) { + public Single rxCall123testSpecialTags(UUID uuidTest, Client body) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.call123testSpecialTags(body, fut) + delegate.call123testSpecialTags(uuidTest, body, fut) )); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxCall123testSpecialTags(Client body, ApiClient.AuthInfo authInfo) { + public Single rxCall123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.call123testSpecialTags(body, authInfo, fut) + delegate.call123testSpecialTags(uuidTest, body, authInfo, fut) )); } diff --git a/samples/client/petstore/java/vertx/README.md b/samples/client/petstore/java/vertx/README.md index a29044f48a6..59bdb94a857 100644 --- a/samples/client/petstore/java/vertx/README.md +++ b/samples/client/petstore/java/vertx/README.md @@ -91,9 +91,10 @@ public class AnotherFakeApiExample { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); diff --git a/samples/client/petstore/java/vertx/api/openapi.yaml b/samples/client/petstore/java/vertx/api/openapi.yaml index dbf370f445d..933d7332521 100644 --- a/samples/client/petstore/java/vertx/api/openapi.yaml +++ b/samples/client/petstore/java/vertx/api/openapi.yaml @@ -1013,6 +1013,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md index f1ca8fe00b5..e2b1f04ce7f 100644 --- a/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md +++ b/samples/client/petstore/java/vertx/docs/AnotherFakeApi.md @@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2* ## call123testSpecialTags -> Client call123testSpecialTags(body) +> Client call123testSpecialTags(uuidTest, body) To test special tags @@ -32,9 +32,10 @@ public class Example { defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); + UUID uuidTest = UUID.randomUUID(); // UUID | to test uuid example value Client body = new Client(); // Client | client model try { - Client result = apiInstance.call123testSpecialTags(body); + Client result = apiInstance.call123testSpecialTags(uuidTest, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); @@ -52,6 +53,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| +| **uuidTest** | **UUID**| to test uuid example value | | | **body** | [**Client**](Client.md)| client model | | ### Return type diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java index d6abe6d9338..7b484f9c814 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApi.java @@ -2,6 +2,7 @@ package org.openapitools.client.api; import org.openapitools.client.ApiClient; import org.openapitools.client.model.Client; +import java.util.UUID; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; import io.vertx.core.json.JsonObject; @@ -10,8 +11,8 @@ import java.util.*; public interface AnotherFakeApi { - void call123testSpecialTags(Client body, Handler> handler); + void call123testSpecialTags(UUID uuidTest, Client body, Handler> handler); - void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler> handler); + void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> handler); } diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java index 362a4a5174f..39c9f006f92 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/AnotherFakeApiImpl.java @@ -1,6 +1,7 @@ package org.openapitools.client.api; import org.openapitools.client.model.Client; +import java.util.UUID; import io.vertx.core.AsyncResult; import io.vertx.core.Handler; @@ -43,23 +44,31 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, Handler> resultHandler) { - call123testSpecialTags(body, null, resultHandler); + public void call123testSpecialTags(UUID uuidTest, Client body, Handler> resultHandler) { + call123testSpecialTags(uuidTest, body, null, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param authInfo per call authentication override. * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { Object localVarBody = body; + // verify the required parameter 'uuidTest' is set + if (uuidTest == null) { + resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'uuidTest' when calling call123testSpecialTags")); + return; + } + // verify the required parameter 'body' is set if (body == null) { resultHandler.handle(ApiException.fail(400, "Missing the required parameter 'body' when calling call123testSpecialTags")); @@ -74,7 +83,9 @@ public class AnotherFakeApiImpl implements AnotherFakeApi { // header params MultiMap localVarHeaderParams = MultiMap.caseInsensitiveMultiMap(); - + if (uuidTest != null) + localVarHeaderParams.add("uuid_test", apiClient.parameterToString(uuidTest)); + // cookie params MultiMap localVarCookieParams = MultiMap.caseInsensitiveMultiMap(); diff --git a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java index c7ce2478c76..18efeb9bd35 100644 --- a/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java +++ b/samples/client/petstore/java/vertx/src/main/java/org/openapitools/client/api/rxjava/AnotherFakeApi.java @@ -1,6 +1,7 @@ package org.openapitools.client.api.rxjava; import org.openapitools.client.model.Client; +import java.util.UUID; import org.openapitools.client.ApiClient; import java.util.*; @@ -25,46 +26,50 @@ public class AnotherFakeApi { /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, Handler> resultHandler) { - delegate.call123testSpecialTags(body, resultHandler); + public void call123testSpecialTags(UUID uuidTest, Client body, Handler> resultHandler) { + delegate.call123testSpecialTags(uuidTest, body, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param authInfo call specific auth overrides * @param resultHandler Asynchronous result handler */ - public void call123testSpecialTags(Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { - delegate.call123testSpecialTags(body, authInfo, resultHandler); + public void call123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo, Handler> resultHandler) { + delegate.call123testSpecialTags(uuidTest, body, authInfo, resultHandler); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @return Asynchronous result handler (RxJava Single) */ - public Single rxCall123testSpecialTags(Client body) { + public Single rxCall123testSpecialTags(UUID uuidTest, Client body) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.call123testSpecialTags(body, fut) + delegate.call123testSpecialTags(uuidTest, body, fut) )); } /** * To test special tags * To test special tags and operation ID starting with number + * @param uuidTest to test uuid example value (required) * @param body client model (required) * @param authInfo call specific auth overrides * @return Asynchronous result handler (RxJava Single) */ - public Single rxCall123testSpecialTags(Client body, ApiClient.AuthInfo authInfo) { + public Single rxCall123testSpecialTags(UUID uuidTest, Client body, ApiClient.AuthInfo authInfo) { return Single.create(new io.vertx.rx.java.SingleOnSubscribeAdapter<>(fut -> - delegate.call123testSpecialTags(body, authInfo, fut) + delegate.call123testSpecialTags(uuidTest, body, authInfo, fut) )); } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 44e76f4550f..3055a9c2a84 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -15,13 +15,14 @@ open class AnotherFakeAPI { /** To test special tags + - parameter uuidTest: (header) to test uuid example value - parameter body: (body) client model - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ @discardableResult - open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) -> RequestTask { - return call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result in + open class func call123testSpecialTags(uuidTest: UUID, body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) -> RequestTask { + return call123testSpecialTagsWithRequestBuilder(uuidTest: uuidTest, body: body).execute(apiResponseQueue) { result in switch result { case let .success(response): completion(response.body, nil) @@ -35,10 +36,11 @@ open class AnotherFakeAPI { To test special tags - PATCH /another-fake/dummy - To test special tags and operation ID starting with number + - parameter uuidTest: (header) to test uuid example value - parameter body: (body) client model - returns: RequestBuilder */ - open class func call123testSpecialTagsWithRequestBuilder(body: Client) -> RequestBuilder { + open class func call123testSpecialTagsWithRequestBuilder(uuidTest: UUID, body: Client) -> RequestBuilder { let localVariablePath = "/another-fake/dummy" let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath let localVariableParameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body) @@ -46,7 +48,7 @@ open class AnotherFakeAPI { let localVariableUrlComponents = URLComponents(string: localVariableURLString) let localVariableNillableHeaders: [String: Any?] = [ - : + "uuid_test": uuidTest.encodeToJSON(), ] let localVariableHeaderParameters = APIHelper.rejectNilHeaders(localVariableNillableHeaders) diff --git a/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md index 26346e81a4c..ce8a5b9886c 100644 --- a/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/default/docs/AnotherFakeAPI.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **call123testSpecialTags** ```swift - open class func call123testSpecialTags(body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) + open class func call123testSpecialTags(uuidTest: UUID, body: Client, completion: @escaping (_ data: Client?, _ error: Error?) -> Void) ``` To test special tags @@ -21,10 +21,11 @@ To test special tags and operation ID starting with number // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient +let uuidTest = 987 // UUID | to test uuid example value let body = Client(client: "client_example") // Client | client model // To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in +AnotherFakeAPI.call123testSpecialTags(uuidTest: uuidTest, body: body) { (response, error) in guard error == nil else { print(error) return @@ -40,6 +41,7 @@ AnotherFakeAPI.call123testSpecialTags(body: body) { (response, error) in Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **uuidTest** | **UUID** | to test uuid example value | **body** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift index 85f7cf35117..7952dc85a9d 100644 --- a/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/vaporLibrary/Sources/PetstoreClient/APIs/AnotherFakeAPI.swift @@ -17,10 +17,11 @@ open class AnotherFakeAPI { To test special tags PATCH /another-fake/dummy To test special tags and operation ID starting with number + - parameter uuidTest: (header) to test uuid example value - parameter body: (body) client model - returns: `EventLoopFuture` of `ClientResponse` */ - open class func call123testSpecialTagsRaw(body: Client, headers: HTTPHeaders = PetstoreClientAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture { + open class func call123testSpecialTagsRaw(uuidTest: UUID, body: Client, headers: HTTPHeaders = PetstoreClientAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture { let localVariablePath = "/another-fake/dummy" let localVariableURLString = PetstoreClientAPI.basePath + localVariablePath @@ -31,6 +32,8 @@ open class AnotherFakeAPI { return localVariableApiClient.send(.PATCH, headers: headers, to: URI(string: localVariableURLString)) { localVariableRequest in try Configuration.apiWrapper(&localVariableRequest) + localVariableRequest.headers.add(name: "uuid_test", value: uuidTest.description) + try localVariableRequest.content.encode(body, using: Configuration.contentConfiguration.requireEncoder(for: Client.defaultContentType)) @@ -47,11 +50,12 @@ open class AnotherFakeAPI { To test special tags PATCH /another-fake/dummy To test special tags and operation ID starting with number + - parameter uuidTest: (header) to test uuid example value - parameter body: (body) client model - returns: `EventLoopFuture` of `Call123testSpecialTags` */ - open class func call123testSpecialTags(body: Client, headers: HTTPHeaders = PetstoreClientAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture { - return call123testSpecialTagsRaw(body: body, headers: headers, beforeSend: beforeSend).flatMapThrowing { response -> Call123testSpecialTags in + open class func call123testSpecialTags(uuidTest: UUID, body: Client, headers: HTTPHeaders = PetstoreClientAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture { + return call123testSpecialTagsRaw(uuidTest: uuidTest, body: body, headers: headers, beforeSend: beforeSend).flatMapThrowing { response -> Call123testSpecialTags in switch response.status.code { case 200: return .http200(value: try response.content.decode(Client.self, using: Configuration.contentConfiguration.requireDecoder(for: Client.defaultContentType)), raw: response) diff --git a/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md b/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md index 6908eefb73a..aa669f1fba6 100644 --- a/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md +++ b/samples/client/petstore/swift5/vaporLibrary/docs/AnotherFakeAPI.md @@ -9,7 +9,7 @@ Method | HTTP request | Description # **call123testSpecialTags** ```swift - open class func call123testSpecialTags(body: Client, headers: HTTPHeaders = PetstoreClientAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture + open class func call123testSpecialTags(uuidTest: UUID, body: Client, headers: HTTPHeaders = PetstoreClientAPI.customHeaders, beforeSend: (inout ClientRequest) throws -> () = { _ in }) -> EventLoopFuture ``` To test special tags @@ -21,10 +21,11 @@ To test special tags and operation ID starting with number // The following code samples are still beta. For any issue, please report via http://github.com/OpenAPITools/openapi-generator/issues/new import PetstoreClient +let uuidTest = 987 // UUID | to test uuid example value let body = Client(client: "client_example") // Client | client model // To test special tags -AnotherFakeAPI.call123testSpecialTags(body: body).whenComplete { result in +AnotherFakeAPI.call123testSpecialTags(uuidTest: uuidTest, body: body).whenComplete { result in switch result { case .failure(let error): // process error @@ -42,6 +43,7 @@ AnotherFakeAPI.call123testSpecialTags(body: body).whenComplete { result in Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **uuidTest** | **UUID** | to test uuid example value | **body** | [**Client**](Client.md) | client model | ### Return type diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApi.java index fa134a3100e..6d912854fd2 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -37,9 +38,10 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", response = Client.class, tags={ "$another-fake?", }) @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model" ,required=true) Client body + public Response call123testSpecialTags(@ApiParam(value = "to test uuid example value" ,required=true)@HeaderParam("uuid_test") UUID uuidTest +,@ApiParam(value = "client model" ,required=true) Client body ) throws NotFoundException { - return delegate.call123testSpecialTags(body); + return delegate.call123testSpecialTags(uuidTest,body); } } diff --git a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 4469a5fccd2..2273b6786e7 100644 --- a/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/java-msf4j/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -7,6 +7,7 @@ import org.wso2.msf4j.formparam.FormDataParam; import org.wso2.msf4j.formparam.FileInfo; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -18,6 +19,7 @@ import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen") public abstract class AnotherFakeApiService { - public abstract Response call123testSpecialTags(Client body + public abstract Response call123testSpecialTags(UUID uuidTest + ,Client body ) throws NotFoundException; } diff --git a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 6479b9c71d2..34eea2897b4 100644 --- a/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/java-msf4j/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -4,6 +4,7 @@ import org.openapitools.api.*; import org.openapitools.model.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -19,7 +20,8 @@ import javax.ws.rs.core.SecurityContext; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaMSF4JServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override - public Response call123testSpecialTags(Client body + public Response call123testSpecialTags(UUID uuidTest +, Client body ) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java index 1c9a2acadbd..1583cc31312 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiController.java @@ -1,6 +1,7 @@ package controllers; import apimodels.Client; +import java.util.UUID; import com.typesafe.config.Config; import play.mvc.Controller; @@ -48,7 +49,14 @@ public class AnotherFakeApiController extends Controller { } else { throw new IllegalArgumentException("'body' parameter is required"); } - return imp.call123testSpecialTagsHttp(request, body); + String valueuuidTest = request.header("uuid_test").orElse(null); + UUID uuidTest; + if (valueuuidTest != null) { + uuidTest = UUID.fromString(valueuuidTest); + } else { + throw new IllegalArgumentException("'uuid_test' parameter is required"); + } + return imp.call123testSpecialTagsHttp(request, uuidTest, body); } } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java index 5bb2130aca2..090cf0e428a 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImp.java @@ -1,6 +1,7 @@ package controllers; import apimodels.Client; +import java.util.UUID; import play.mvc.Http; import java.util.List; @@ -13,7 +14,7 @@ import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaPlayFrameworkCodegen") public class AnotherFakeApiControllerImp extends AnotherFakeApiControllerImpInterface { @Override - public Client call123testSpecialTags(Http.Request request, Client body) throws Exception { + public Client call123testSpecialTags(Http.Request request, UUID uuidTest, Client body) throws Exception { //Do your magic!!! return new Client(); } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java index b6f4261ee6d..2ab1a36b0d9 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java +++ b/samples/server/petstore/java-play-framework-fake-endpoints/app/controllers/AnotherFakeApiControllerImpInterface.java @@ -1,6 +1,7 @@ package controllers; import apimodels.Client; +import java.util.UUID; import com.google.inject.Inject; import com.typesafe.config.Config; @@ -26,8 +27,8 @@ public abstract class AnotherFakeApiControllerImpInterface { @Inject private SecurityAPIUtils securityAPIUtils; private ObjectMapper mapper = new ObjectMapper(); - public Result call123testSpecialTagsHttp(Http.Request request, Client body) throws Exception { - Client obj = call123testSpecialTags(request, body); + public Result call123testSpecialTagsHttp(Http.Request request, UUID uuidTest, Client body) throws Exception { + Client obj = call123testSpecialTags(request, uuidTest, body); if (configuration.getBoolean("useOutputBeanValidation")) { OpenAPIUtils.validate(obj); @@ -39,6 +40,6 @@ public abstract class AnotherFakeApiControllerImpInterface { } - public abstract Client call123testSpecialTags(Http.Request request, Client body) throws Exception; + public abstract Client call123testSpecialTags(Http.Request request, UUID uuidTest, Client body) throws Exception; } diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json index 7fec58decc9..605ee873533 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json +++ b/samples/server/petstore/java-play-framework-fake-endpoints/public/openapi.json @@ -1325,6 +1325,16 @@ "patch" : { "description" : "To test special tags and operation ID starting with number", "operationId" : "123_test_@#$%_special_tags", + "parameters" : [ { + "description" : "to test uuid example value", + "in" : "header", + "name" : "uuid_test", + "required" : true, + "schema" : { + "format" : "uuid", + "type" : "string" + } + } ], "requestBody" : { "content" : { "application/json" : { diff --git a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 8fabf5ac50d..a86464d9590 100644 --- a/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-cxf/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -1,6 +1,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import java.util.UUID; import java.io.InputStream; import java.io.OutputStream; @@ -42,5 +43,5 @@ public interface AnotherFakeApi { @ApiOperation(value = "To test special tags", tags={ "$another-fake?" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Client call123testSpecialTags(@Valid @NotNull Client body); + public Client call123testSpecialTags(@HeaderParam("uuid_test") @NotNull UUID uuidTest, @Valid @NotNull Client body); } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 1eb07dfd313..34ee36a015f 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.Map; import java.util.List; @@ -62,8 +63,8 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body,@Context SecurityContext securityContext) + public Response call123testSpecialTags(@ApiParam(value = "to test uuid example value" ,required=true)@HeaderParam("uuid_test") UUID uuidTest,@ApiParam(value = "client model", required = true) @NotNull @Valid Client body,@Context SecurityContext securityContext) throws NotFoundException { - return delegate.call123testSpecialTags(body, securityContext); + return delegate.call123testSpecialTags(uuidTest, body, securityContext); } } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 2ed812ff4cf..3991f29fa8a 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -5,6 +5,7 @@ import org.openapitools.api.*; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -16,5 +17,5 @@ import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { - public abstract Response call123testSpecialTags(Client body,SecurityContext securityContext) throws NotFoundException; + public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 1908572ea2c..361e57e8167 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -2,6 +2,7 @@ package org.openapitools.api.impl; import org.openapitools.api.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -16,7 +17,7 @@ import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override - public Response call123testSpecialTags(Client body, SecurityContext securityContext) throws NotFoundException { + public Response call123testSpecialTags( @NotNull UUID uuidTest, Client body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java index cac36694c7f..0907d35bbda 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -1,6 +1,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import java.util.UUID; import javax.ws.rs.*; import javax.ws.rs.core.Response; @@ -24,5 +25,5 @@ public interface AnotherFakeApi { @ApiOperation(value = "To test special tags", notes = "To test special tags and operation ID starting with number", tags={ "$another-fake?" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - Client call123testSpecialTags(@Valid @NotNull Client body); + Client call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body); } diff --git a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml index eded577e74f..c448d48c3de 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-interface/src/main/openapi/openapi.yaml @@ -1079,6 +1079,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 2b4dd0808bf..6422156d12f 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -1,6 +1,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import java.util.UUID; import jakarta.ws.rs.*; import jakarta.ws.rs.core.Response; @@ -25,7 +26,7 @@ public class AnotherFakeApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@Valid @NotNull Client body) { + public Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml index eded577e74f..c448d48c3de 100644 --- a/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-jakarta/src/main/openapi/openapi.yaml @@ -1079,6 +1079,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java index db6516e3f3b..6dd0abb3ca3 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -1,6 +1,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import java.util.UUID; import javax.ws.rs.*; import javax.ws.rs.core.Response; @@ -69,7 +70,7 @@ public class AnotherFakeApi { @org.eclipse.microprofile.openapi.annotations.media.Content(mediaType="application/json", schema = @org.eclipse.microprofile.openapi.annotations.media.Schema(implementation = Client.class)) }) }) - public Response call123testSpecialTags(@Valid @NotNull Client body) { + public Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @org.eclipse.microprofile.openapi.annotations.parameters.Parameter(description="to test uuid example value") UUID uuidTest,@Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml index eded577e74f..c448d48c3de 100644 --- a/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec-microprofile-openapi-annotations/src/main/resources/META-INF/openapi.yaml @@ -1079,6 +1079,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/AnotherFakeApi.java index fdb931b0f47..3db73f59c4c 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -1,6 +1,7 @@ package org.openapitools.api; import org.openapitools.model.Client; +import java.util.UUID; import javax.ws.rs.*; import javax.ws.rs.core.Response; @@ -25,7 +26,7 @@ public class AnotherFakeApi { @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@Valid @NotNull Client body) { + public Response call123testSpecialTags(@HeaderParam("uuid_test") @NotNull @ApiParam("to test uuid example value") UUID uuidTest,@Valid @NotNull Client body) { return Response.ok().entity("magic!").build(); } } diff --git a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml index eded577e74f..c448d48c3de 100644 --- a/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml +++ b/samples/server/petstore/jaxrs-spec/src/main/openapi/openapi.yaml @@ -1079,6 +1079,14 @@ paths: patch: description: To test special tags and operation ID starting with number operationId: 123_test_@#$%_special_tags + parameters: + - description: to test uuid example value + in: header + name: uuid_test + required: true + schema: + format: uuid + type: string requestBody: content: application/json: diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 9297f3be361..60b6f741a21 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.Map; import java.util.List; @@ -41,9 +42,10 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response call123testSpecialTags( + @ApiParam(value = "to test uuid example value" ,required=true)@HeaderParam("uuid_test") UUID uuidTest, @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { - return delegate.call123testSpecialTags(body,securityContext); + return delegate.call123testSpecialTags(uuidTest,body,securityContext); } } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 316764a22ab..370d3560252 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -6,6 +6,7 @@ import org.openapitools.model.*; import com.sun.jersey.multipart.FormDataParam; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -20,6 +21,6 @@ import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { - public abstract Response call123testSpecialTags(Client body,SecurityContext securityContext) + public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 6ba48ecea15..7604b9d2541 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -6,6 +6,7 @@ import org.openapitools.model.*; import com.sun.jersey.multipart.FormDataParam; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -21,7 +22,7 @@ import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override - public Response call123testSpecialTags(Client body, SecurityContext securityContext) + public Response call123testSpecialTags( @NotNull UUID uuidTest, Client body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 2c0575b98ed..2b843509e0f 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -8,6 +8,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.Map; import java.util.List; @@ -41,9 +42,10 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) public Response call123testSpecialTags( + @ApiParam(value = "to test uuid example value" ,required=true)@HeaderParam("uuid_test") UUID uuidTest, @ApiParam(value = "client model", required = true) @NotNull @Valid Client body, @Context SecurityContext securityContext) throws NotFoundException { - return delegate.call123testSpecialTags(body,securityContext); + return delegate.call123testSpecialTags(uuidTest,body,securityContext); } } diff --git a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 316764a22ab..370d3560252 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey1/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -6,6 +6,7 @@ import org.openapitools.model.*; import com.sun.jersey.multipart.FormDataParam; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -20,6 +21,6 @@ import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { - public abstract Response call123testSpecialTags(Client body,SecurityContext securityContext) + public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 6ba48ecea15..7604b9d2541 100644 --- a/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey1/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -6,6 +6,7 @@ import org.openapitools.model.*; import com.sun.jersey.multipart.FormDataParam; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -21,7 +22,7 @@ import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override - public Response call123testSpecialTags(Client body, SecurityContext securityContext) + public Response call123testSpecialTags( @NotNull UUID uuidTest, Client body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java index fb96b911047..222b9ee9d49 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.Map; import java.util.List; @@ -62,8 +63,8 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body,@Context SecurityContext securityContext) + public Response call123testSpecialTags(@ApiParam(value = "to test uuid example value" ,required=true)@HeaderParam("uuid_test") UUID uuidTest,@ApiParam(value = "client model", required = true) @NotNull @Valid Client body,@Context SecurityContext securityContext) throws NotFoundException { - return delegate.call123testSpecialTags(body, securityContext); + return delegate.call123testSpecialTags(uuidTest, body, securityContext); } } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 2ed812ff4cf..3991f29fa8a 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -5,6 +5,7 @@ import org.openapitools.api.*; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -16,5 +17,5 @@ import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { - public abstract Response call123testSpecialTags(Client body,SecurityContext securityContext) throws NotFoundException; + public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 1908572ea2c..361e57e8167 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2-useTags/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -2,6 +2,7 @@ package org.openapitools.api.impl; import org.openapitools.api.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -16,7 +17,7 @@ import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override - public Response call123testSpecialTags(Client body, SecurityContext securityContext) throws NotFoundException { + public Response call123testSpecialTags( @NotNull UUID uuidTest, Client body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java index 1eb07dfd313..34ee36a015f 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApi.java @@ -7,6 +7,7 @@ import io.swagger.annotations.ApiParam; import io.swagger.jaxrs.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.Map; import java.util.List; @@ -62,8 +63,8 @@ public class AnotherFakeApi { @io.swagger.annotations.ApiResponses(value = { @io.swagger.annotations.ApiResponse(code = 200, message = "successful operation", response = Client.class) }) - public Response call123testSpecialTags(@ApiParam(value = "client model", required = true) @NotNull @Valid Client body,@Context SecurityContext securityContext) + public Response call123testSpecialTags(@ApiParam(value = "to test uuid example value" ,required=true)@HeaderParam("uuid_test") UUID uuidTest,@ApiParam(value = "client model", required = true) @NotNull @Valid Client body,@Context SecurityContext securityContext) throws NotFoundException { - return delegate.call123testSpecialTags(body, securityContext); + return delegate.call123testSpecialTags(uuidTest, body, securityContext); } } diff --git a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java index 2ed812ff4cf..3991f29fa8a 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java +++ b/samples/server/petstore/jaxrs/jersey2/src/gen/java/org/openapitools/api/AnotherFakeApiService.java @@ -5,6 +5,7 @@ import org.openapitools.api.*; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -16,5 +17,5 @@ import javax.ws.rs.core.SecurityContext; import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public abstract class AnotherFakeApiService { - public abstract Response call123testSpecialTags(Client body,SecurityContext securityContext) throws NotFoundException; + public abstract Response call123testSpecialTags( @NotNull UUID uuidTest,Client body,SecurityContext securityContext) throws NotFoundException; } diff --git a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 1908572ea2c..361e57e8167 100644 --- a/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs/jersey2/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -2,6 +2,7 @@ package org.openapitools.api.impl; import org.openapitools.api.*; import org.openapitools.model.Client; +import java.util.UUID; import java.util.List; import org.openapitools.api.NotFoundException; @@ -16,7 +17,7 @@ import javax.validation.constraints.*; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaJerseyServerCodegen") public class AnotherFakeApiServiceImpl extends AnotherFakeApiService { @Override - public Response call123testSpecialTags(Client body, SecurityContext securityContext) throws NotFoundException { + public Response call123testSpecialTags( @NotNull UUID uuidTest, Client body, SecurityContext securityContext) throws NotFoundException { // do some magic! return Response.ok().entity(new ApiResponseMessage(ApiResponseMessage.OK, "magic!")).build(); }