diff --git a/bin/configs/java-resteasy-echo.yaml b/bin/configs/java-resteasy-echo.yaml index 85638b4e4d8..adca68137b0 100644 --- a/bin/configs/java-resteasy-echo.yaml +++ b/bin/configs/java-resteasy-echo.yaml @@ -1,6 +1,6 @@ generatorName: java outputDir: samples/client/petstore/java/resteasy-echo -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-echo.yaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml templateDir: modules/openapi-generator/src/main/resources/Java additionalProperties: artifactId: petstore-resteasy-echo diff --git a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml index 9a4bd9546ea..e43c37e2387 100644 --- a/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/echo_api.yaml @@ -513,6 +513,30 @@ paths: schema: type: string format: binary + # Single binary in multipart mime test + /body/application/octetstream/single_binary: + post: + tags: + - body + summary: Test single binary in multipart mime + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + my-file: + type: string + format: binary + responses: + '200': + description: Successful operation + content: + text/plain: + schema: + type: string # Array of binary in multipart mime tests /body/application/octetstream/array_of_binary: post: diff --git a/samples/client/echo_api/csharp-restsharp/README.md b/samples/client/echo_api/csharp-restsharp/README.md index 720aa1a75eb..c350eebaa41 100644 --- a/samples/client/echo_api/csharp-restsharp/README.md +++ b/samples/client/echo_api/csharp-restsharp/README.md @@ -121,6 +121,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**TestBinaryGif**](docs/BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**TestBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**TestBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testbodymultipartformdataarrayofbinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**TestBodyMultipartFormdataSingleBinary**](docs/BodyApi.md#testbodymultipartformdatasinglebinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**TestEchoBodyAllOfPet**](docs/BodyApi.md#testechobodyallofpet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**TestEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testechobodyfreeformobjectresponsestring) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**TestEchoBodyPet**](docs/BodyApi.md#testechobodypet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/csharp-restsharp/api/openapi.yaml b/samples/client/echo_api/csharp-restsharp/api/openapi.yaml index 7f02909b845..e4f825722a4 100644 --- a/samples/client/echo_api/csharp-restsharp/api/openapi.yaml +++ b/samples/client/echo_api/csharp-restsharp/api/openapi.yaml @@ -486,6 +486,25 @@ paths: summary: Test binary (gif) response body tags: - body + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body /body/application/octetstream/array_of_binary: post: description: Test array of binary in multipart mime @@ -794,6 +813,12 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: + format: binary + type: string + type: object test_body_multipart_formdata_array_of_binary_request: properties: files: diff --git a/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md index e8e87af2d76..e1e031583b6 100644 --- a/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md +++ b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:3000* | [**TestBinaryGif**](BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body | | [**TestBodyApplicationOctetstreamBinary**](BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**TestBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testbodymultipartformdataarrayofbinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**TestBodyMultipartFormdataSingleBinary**](BodyApi.md#testbodymultipartformdatasinglebinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**TestEchoBodyAllOfPet**](BodyApi.md#testechobodyallofpet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**TestEchoBodyFreeFormObjectResponseString**](BodyApi.md#testechobodyfreeformobjectresponsestring) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**TestEchoBodyPet**](BodyApi.md#testechobodypet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -274,6 +275,97 @@ No authorization required - **Accept**: text/plain +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + + +# **TestBodyMultipartFormdataSingleBinary** +> string TestBodyMultipartFormdataSingleBinary (System.IO.Stream? myFile = null) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using Org.OpenAPITools.Api; +using Org.OpenAPITools.Client; +using Org.OpenAPITools.Model; + +namespace Example +{ + public class TestBodyMultipartFormdataSingleBinaryExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "http://localhost:3000"; + var apiInstance = new BodyApi(config); + var myFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | (optional) + + try + { + // Test single binary in multipart mime + string result = apiInstance.TestBodyMultipartFormdataSingleBinary(myFile); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling BodyApi.TestBodyMultipartFormdataSingleBinary: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +#### Using the TestBodyMultipartFormdataSingleBinaryWithHttpInfo variant +This returns an ApiResponse object which contains the response data, status code and headers. + +```csharp +try +{ + // Test single binary in multipart mime + ApiResponse response = apiInstance.TestBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile); + Debug.Write("Status Code: " + response.StatusCode); + Debug.Write("Response Headers: " + response.Headers); + Debug.Write("Response Body: " + response.Data); +} +catch (ApiException e) +{ + Debug.Print("Exception when calling BodyApi.TestBodyMultipartFormdataSingleBinaryWithHttpInfo: " + e.Message); + Debug.Print("Status Code: " + e.ErrorCode); + Debug.Print(e.StackTrace); +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------|------|-------------|-------| +| **myFile** | **System.IO.Stream?****System.IO.Stream?** | | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: text/plain + + ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs index 984066576a8..11c028a2e0c 100644 --- a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs +++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs @@ -95,6 +95,29 @@ namespace Org.OpenAPITools.Api /// ApiResponse of string ApiResponse TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo(List files, int operationIndex = 0); /// + /// Test single binary in multipart mime + /// + /// + /// Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// string + string TestBodyMultipartFormdataSingleBinary(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0); + + /// + /// Test single binary in multipart mime + /// + /// + /// Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of string + ApiResponse TestBodyMultipartFormdataSingleBinaryWithHttpInfo(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0); + /// /// Test body parameter(s) /// /// @@ -292,6 +315,31 @@ namespace Org.OpenAPITools.Api /// Task of ApiResponse (string) System.Threading.Tasks.Task> TestBodyMultipartFormdataArrayOfBinaryWithHttpInfoAsync(List files, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// + /// Test single binary in multipart mime + /// + /// + /// Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + System.Threading.Tasks.Task TestBodyMultipartFormdataSingleBinaryAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Test single binary in multipart mime + /// + /// + /// Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + System.Threading.Tasks.Task> TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Test body parameter(s) /// /// @@ -948,6 +996,146 @@ namespace Org.OpenAPITools.Api return localVarResponse; } + /// + /// Test single binary in multipart mime Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// string + public string TestBodyMultipartFormdataSingleBinary(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = TestBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile); + return localVarResponse.Data; + } + + /// + /// Test single binary in multipart mime Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// ApiResponse of string + public Org.OpenAPITools.Client.ApiResponse TestBodyMultipartFormdataSingleBinaryWithHttpInfo(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0) + { + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (myFile != null) + { + localVarRequestOptions.FileParameters.Add("my-file", myFile); + } + + localVarRequestOptions.Operation = "BodyApi.TestBodyMultipartFormdataSingleBinary"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = this.Client.Post("/body/application/octetstream/single_binary", localVarRequestOptions, this.Configuration); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestBodyMultipartFormdataSingleBinary", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + + /// + /// Test single binary in multipart mime Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of string + public async System.Threading.Tasks.Task TestBodyMultipartFormdataSingleBinaryAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(myFile, operationIndex, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Test single binary in multipart mime Test single binary in multipart mime + /// + /// Thrown when fails to make API call + /// (optional) + /// Index associated with the operation. + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (string) + public async System.Threading.Tasks.Task> TestBodyMultipartFormdataSingleBinaryWithHttpInfoAsync(System.IO.Stream? myFile = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + "multipart/form-data" + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "text/plain" + }; + + var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) + { + localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + } + + var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) + { + localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + } + + if (myFile != null) + { + localVarRequestOptions.FileParameters.Add("my-file", myFile); + } + + localVarRequestOptions.Operation = "BodyApi.TestBodyMultipartFormdataSingleBinary"; + localVarRequestOptions.OperationIndex = operationIndex; + + + // make the HTTP request + var localVarResponse = await this.AsynchronousClient.PostAsync("/body/application/octetstream/single_binary", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("TestBodyMultipartFormdataSingleBinary", localVarResponse); + if (_exception != null) + { + throw _exception; + } + } + + return localVarResponse; + } + /// /// Test body parameter(s) Test body parameter(s) /// diff --git a/samples/client/echo_api/go/README.md b/samples/client/echo_api/go/README.md index 08c67610c6e..2f5df82beb0 100644 --- a/samples/client/echo_api/go/README.md +++ b/samples/client/echo_api/go/README.md @@ -82,6 +82,7 @@ Class | Method | HTTP request | Description *BodyAPI* | [**TestBinaryGif**](docs/BodyAPI.md#testbinarygif) | **Post** /binary/gif | Test binary (gif) response body *BodyAPI* | [**TestBodyApplicationOctetstreamBinary**](docs/BodyAPI.md#testbodyapplicationoctetstreambinary) | **Post** /body/application/octetstream/binary | Test body parameter(s) *BodyAPI* | [**TestBodyMultipartFormdataArrayOfBinary**](docs/BodyAPI.md#testbodymultipartformdataarrayofbinary) | **Post** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyAPI* | [**TestBodyMultipartFormdataSingleBinary**](docs/BodyAPI.md#testbodymultipartformdatasinglebinary) | **Post** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyAPI* | [**TestEchoBodyAllOfPet**](docs/BodyAPI.md#testechobodyallofpet) | **Post** /echo/body/allOf/Pet | Test body parameter(s) *BodyAPI* | [**TestEchoBodyFreeFormObjectResponseString**](docs/BodyAPI.md#testechobodyfreeformobjectresponsestring) | **Post** /echo/body/FreeFormObject/response_string | Test free form object *BodyAPI* | [**TestEchoBodyPet**](docs/BodyAPI.md#testechobodypet) | **Post** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/go/api/openapi.yaml b/samples/client/echo_api/go/api/openapi.yaml index abd591ef543..bb31f3770bb 100644 --- a/samples/client/echo_api/go/api/openapi.yaml +++ b/samples/client/echo_api/go/api/openapi.yaml @@ -486,6 +486,25 @@ paths: summary: Test binary (gif) response body tags: - body + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body /body/application/octetstream/array_of_binary: post: description: Test array of binary in multipart mime @@ -794,6 +813,12 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: + format: binary + type: string + type: object test_body_multipart_formdata_array_of_binary_request: properties: files: diff --git a/samples/client/echo_api/go/api_body.go b/samples/client/echo_api/go/api_body.go index 8700b5b4229..7c4f82522d7 100644 --- a/samples/client/echo_api/go/api_body.go +++ b/samples/client/echo_api/go/api_body.go @@ -356,6 +356,126 @@ func (a *BodyAPIService) TestBodyMultipartFormdataArrayOfBinaryExecute(r ApiTest return localVarReturnValue, localVarHTTPResponse, nil } +type ApiTestBodyMultipartFormdataSingleBinaryRequest struct { + ctx context.Context + ApiService *BodyAPIService + myFile *os.File +} + +func (r ApiTestBodyMultipartFormdataSingleBinaryRequest) MyFile(myFile *os.File) ApiTestBodyMultipartFormdataSingleBinaryRequest { + r.myFile = myFile + return r +} + +func (r ApiTestBodyMultipartFormdataSingleBinaryRequest) Execute() (string, *http.Response, error) { + return r.ApiService.TestBodyMultipartFormdataSingleBinaryExecute(r) +} + +/* +TestBodyMultipartFormdataSingleBinary Test single binary in multipart mime + +Test single binary in multipart mime + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiTestBodyMultipartFormdataSingleBinaryRequest +*/ +func (a *BodyAPIService) TestBodyMultipartFormdataSingleBinary(ctx context.Context) ApiTestBodyMultipartFormdataSingleBinaryRequest { + return ApiTestBodyMultipartFormdataSingleBinaryRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return string +func (a *BodyAPIService) TestBodyMultipartFormdataSingleBinaryExecute(r ApiTestBodyMultipartFormdataSingleBinaryRequest) (string, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue string + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BodyAPIService.TestBodyMultipartFormdataSingleBinary") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/body/application/octetstream/single_binary" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + var myFileLocalVarFormFileName string + var myFileLocalVarFileName string + var myFileLocalVarFileBytes []byte + + myFileLocalVarFormFileName = "my-file" + myFileLocalVarFile := r.myFile + + if myFileLocalVarFile != nil { + fbs, _ := io.ReadAll(myFileLocalVarFile) + + myFileLocalVarFileBytes = fbs + myFileLocalVarFileName = myFileLocalVarFile.Name() + myFileLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: myFileLocalVarFileBytes, fileName: myFileLocalVarFileName, formFileName: myFileLocalVarFormFileName}) + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type ApiTestEchoBodyAllOfPetRequest struct { ctx context.Context ApiService *BodyAPIService diff --git a/samples/client/echo_api/go/docs/BodyAPI.md b/samples/client/echo_api/go/docs/BodyAPI.md index d54fb227891..7fafe50f258 100644 --- a/samples/client/echo_api/go/docs/BodyAPI.md +++ b/samples/client/echo_api/go/docs/BodyAPI.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**TestBinaryGif**](BodyAPI.md#TestBinaryGif) | **Post** /binary/gif | Test binary (gif) response body [**TestBodyApplicationOctetstreamBinary**](BodyAPI.md#TestBodyApplicationOctetstreamBinary) | **Post** /body/application/octetstream/binary | Test body parameter(s) [**TestBodyMultipartFormdataArrayOfBinary**](BodyAPI.md#TestBodyMultipartFormdataArrayOfBinary) | **Post** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +[**TestBodyMultipartFormdataSingleBinary**](BodyAPI.md#TestBodyMultipartFormdataSingleBinary) | **Post** /body/application/octetstream/single_binary | Test single binary in multipart mime [**TestEchoBodyAllOfPet**](BodyAPI.md#TestEchoBodyAllOfPet) | **Post** /echo/body/allOf/Pet | Test body parameter(s) [**TestEchoBodyFreeFormObjectResponseString**](BodyAPI.md#TestEchoBodyFreeFormObjectResponseString) | **Post** /echo/body/FreeFormObject/response_string | Test free form object [**TestEchoBodyPet**](BodyAPI.md#TestEchoBodyPet) | **Post** /echo/body/Pet | Test body parameter(s) @@ -208,6 +209,72 @@ No authorization required [[Back to README]](../README.md) +## TestBodyMultipartFormdataSingleBinary + +> string TestBodyMultipartFormdataSingleBinary(ctx).MyFile(myFile).Execute() + +Test single binary in multipart mime + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID" +) + +func main() { + myFile := os.NewFile(1234, "some_file") // *os.File | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.BodyAPI.TestBodyMultipartFormdataSingleBinary(context.Background()).MyFile(myFile).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `BodyAPI.TestBodyMultipartFormdataSingleBinary``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `TestBodyMultipartFormdataSingleBinary`: string + fmt.Fprintf(os.Stdout, "Response from `BodyAPI.TestBodyMultipartFormdataSingleBinary`: %v\n", resp) +} +``` + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiTestBodyMultipartFormdataSingleBinaryRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **myFile** | ***os.File** | | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## TestEchoBodyAllOfPet > Pet TestEchoBodyAllOfPet(ctx).Pet(pet).Execute() diff --git a/samples/client/echo_api/java/apache-httpclient/README.md b/samples/client/echo_api/java/apache-httpclient/README.md index 691bf9a0052..ed181eb376c 100644 --- a/samples/client/echo_api/java/apache-httpclient/README.md +++ b/samples/client/echo_api/java/apache-httpclient/README.md @@ -115,6 +115,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testBodyMultipartFormdataSingleBinary**](docs/BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**testEchoBodyAllOfPet**](docs/BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml index 65ed116bef0..f5d4fc9abbd 100644 --- a/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml +++ b/samples/client/echo_api/java/apache-httpclient/api/openapi.yaml @@ -513,6 +513,27 @@ paths: tags: - body x-accepts: image/gif + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain /body/application/octetstream/array_of_binary: post: description: Test array of binary in multipart mime @@ -825,6 +846,12 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: + format: binary + type: string + type: object test_body_multipart_formdata_array_of_binary_request: properties: files: diff --git a/samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md b/samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md index d8393232100..3cf2014e31f 100644 --- a/samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md +++ b/samples/client/echo_api/java/apache-httpclient/docs/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:3000* | [**testBinaryGif**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body | | [**testBodyApplicationOctetstreamBinary**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**testBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testBodyMultipartFormdataSingleBinary**](BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**testEchoBodyAllOfPet**](BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**testEchoBodyFreeFormObjectResponseString**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -209,6 +210,72 @@ No authorization required | **200** | Successful operation | - | +## testBodyMultipartFormdataSingleBinary + +> String testBodyMultipartFormdataSingleBinary(myFile) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + File myFile = new File("/path/to/file"); // File | + try { + String result = apiInstance.testBodyMultipartFormdataSingleBinary(myFile); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataSingleBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **myFile** | **File**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + ## testEchoBodyAllOfPet > Pet testEchoBodyAllOfPet(pet) diff --git a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java index 0b62e882472..272b2b2ddfc 100644 --- a/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java +++ b/samples/client/echo_api/java/apache-httpclient/src/main/java/org/openapitools/client/api/BodyApi.java @@ -265,6 +265,77 @@ public class BodyApi { ); } + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testBodyMultipartFormdataSingleBinary(File myFile) throws ApiException { + return this.testBodyMultipartFormdataSingleBinary(myFile, Collections.emptyMap()); + } + + + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @param additionalHeaders additionalHeaders for this call + * @return String + * @throws ApiException if fails to make API call + */ + public String testBodyMultipartFormdataSingleBinary(File myFile, Map additionalHeaders) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/body/application/octetstream/single_binary"; + + StringJoiner localVarQueryStringJoiner = new StringJoiner("&"); + String localVarQueryParameterBaseName; + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + localVarHeaderParams.putAll(additionalHeaders); + + + if (myFile != null) + localVarFormParams.put("my-file", myFile); + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + TypeReference localVarReturnType = new TypeReference() {}; + return apiClient.invokeAPI( + localVarPath, + "POST", + localVarQueryParams, + localVarCollectionQueryParams, + localVarQueryStringJoiner.toString(), + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAccept, + localVarContentType, + localVarAuthNames, + localVarReturnType + ); + } + /** * Test body parameter(s) * Test body parameter(s) diff --git a/samples/client/echo_api/java/feign-gson/api/openapi.yaml b/samples/client/echo_api/java/feign-gson/api/openapi.yaml index 65ed116bef0..f5d4fc9abbd 100644 --- a/samples/client/echo_api/java/feign-gson/api/openapi.yaml +++ b/samples/client/echo_api/java/feign-gson/api/openapi.yaml @@ -513,6 +513,27 @@ paths: tags: - body x-accepts: image/gif + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain /body/application/octetstream/array_of_binary: post: description: Test array of binary in multipart mime @@ -825,6 +846,12 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: + format: binary + type: string + type: object test_body_multipart_formdata_array_of_binary_request: properties: files: diff --git a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java index fe1c9f92756..2b9bb7c413c 100644 --- a/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java +++ b/samples/client/echo_api/java/feign-gson/src/main/java/org/openapitools/client/api/BodyApi.java @@ -101,6 +101,35 @@ public interface BodyApi extends ApiClient.Api { + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @return String + */ + @RequestLine("POST /body/application/octetstream/single_binary") + @Headers({ + "Content-Type: multipart/form-data", + "Accept: text/plain", + }) + String testBodyMultipartFormdataSingleBinary(@Param("my-file") File myFile); + + /** + * Test single binary in multipart mime + * Similar to testBodyMultipartFormdataSingleBinary but it also returns the http response headers . + * Test single binary in multipart mime + * @param myFile (optional) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("POST /body/application/octetstream/single_binary") + @Headers({ + "Content-Type: multipart/form-data", + "Accept: text/plain", + }) + ApiResponse testBodyMultipartFormdataSingleBinaryWithHttpInfo(@Param("my-file") File myFile); + + + /** * Test body parameter(s) * Test body parameter(s) diff --git a/samples/client/echo_api/java/native/README.md b/samples/client/echo_api/java/native/README.md index c16a1e63343..4c8dec19ee2 100644 --- a/samples/client/echo_api/java/native/README.md +++ b/samples/client/echo_api/java/native/README.md @@ -114,6 +114,8 @@ Class | Method | HTTP request | Description *BodyApi* | [**testBodyApplicationOctetstreamBinaryWithHttpInfo**](docs/BodyApi.md#testBodyApplicationOctetstreamBinaryWithHttpInfo) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime *BodyApi* | [**testBodyMultipartFormdataArrayOfBinaryWithHttpInfo**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinaryWithHttpInfo) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testBodyMultipartFormdataSingleBinary**](docs/BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime +*BodyApi* | [**testBodyMultipartFormdataSingleBinaryWithHttpInfo**](docs/BodyApi.md#testBodyMultipartFormdataSingleBinaryWithHttpInfo) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**testEchoBodyAllOfPet**](docs/BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**testEchoBodyAllOfPetWithHttpInfo**](docs/BodyApi.md#testEchoBodyAllOfPetWithHttpInfo) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object diff --git a/samples/client/echo_api/java/native/api/openapi.yaml b/samples/client/echo_api/java/native/api/openapi.yaml index 65ed116bef0..f5d4fc9abbd 100644 --- a/samples/client/echo_api/java/native/api/openapi.yaml +++ b/samples/client/echo_api/java/native/api/openapi.yaml @@ -513,6 +513,27 @@ paths: tags: - body x-accepts: image/gif + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain /body/application/octetstream/array_of_binary: post: description: Test array of binary in multipart mime @@ -825,6 +846,12 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: + format: binary + type: string + type: object test_body_multipart_formdata_array_of_binary_request: properties: files: diff --git a/samples/client/echo_api/java/native/docs/BodyApi.md b/samples/client/echo_api/java/native/docs/BodyApi.md index 1b680eb3918..8e5f878bac0 100644 --- a/samples/client/echo_api/java/native/docs/BodyApi.md +++ b/samples/client/echo_api/java/native/docs/BodyApi.md @@ -10,6 +10,8 @@ All URIs are relative to *http://localhost:3000* | [**testBodyApplicationOctetstreamBinaryWithHttpInfo**](BodyApi.md#testBodyApplicationOctetstreamBinaryWithHttpInfo) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**testBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | | [**testBodyMultipartFormdataArrayOfBinaryWithHttpInfo**](BodyApi.md#testBodyMultipartFormdataArrayOfBinaryWithHttpInfo) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testBodyMultipartFormdataSingleBinary**](BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | +| [**testBodyMultipartFormdataSingleBinaryWithHttpInfo**](BodyApi.md#testBodyMultipartFormdataSingleBinaryWithHttpInfo) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**testEchoBodyAllOfPet**](BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**testEchoBodyAllOfPetWithHttpInfo**](BodyApi.md#testEchoBodyAllOfPetWithHttpInfo) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**testEchoBodyFreeFormObjectResponseString**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | @@ -417,6 +419,140 @@ No authorization required | **200** | Successful operation | - | +## testBodyMultipartFormdataSingleBinary + +> String testBodyMultipartFormdataSingleBinary(myFile) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + File myFile = new File("/path/to/file"); // File | + try { + String result = apiInstance.testBodyMultipartFormdataSingleBinary(myFile); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataSingleBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **myFile** | **File**| | [optional] | + +### Return type + +**String** + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + +## testBodyMultipartFormdataSingleBinaryWithHttpInfo + +> ApiResponse testBodyMultipartFormdataSingleBinary testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiResponse; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + File myFile = new File("/path/to/file"); // File | + try { + ApiResponse response = apiInstance.testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile); + System.out.println("Status code: " + response.getStatusCode()); + System.out.println("Response headers: " + response.getHeaders()); + System.out.println("Response body: " + response.getData()); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataSingleBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Response headers: " + e.getResponseHeaders()); + System.err.println("Reason: " + e.getResponseBody()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **myFile** | **File**| | [optional] | + +### Return type + +ApiResponse<**String**> + + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + ## testEchoBodyAllOfPet > Pet testEchoBodyAllOfPet(pet) diff --git a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java index f075423ce95..4807d5adb29 100644 --- a/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java +++ b/samples/client/echo_api/java/native/src/main/java/org/openapitools/client/api/BodyApi.java @@ -349,6 +349,114 @@ public class BodyApi { } return localVarRequestBuilder; } + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @return String + * @throws ApiException if fails to make API call + */ + public String testBodyMultipartFormdataSingleBinary(File myFile) throws ApiException { + ApiResponse localVarResponse = testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile); + return localVarResponse.getData(); + } + + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @return ApiResponse<String> + * @throws ApiException if fails to make API call + */ + public ApiResponse testBodyMultipartFormdataSingleBinaryWithHttpInfo(File myFile) throws ApiException { + HttpRequest.Builder localVarRequestBuilder = testBodyMultipartFormdataSingleBinaryRequestBuilder(myFile); + try { + HttpResponse localVarResponse = memberVarHttpClient.send( + localVarRequestBuilder.build(), + HttpResponse.BodyHandlers.ofInputStream()); + if (memberVarResponseInterceptor != null) { + memberVarResponseInterceptor.accept(localVarResponse); + } + try { + if (localVarResponse.statusCode()/ 100 != 2) { + throw getApiException("testBodyMultipartFormdataSingleBinary", localVarResponse); + } + // for plain text response + if (localVarResponse.headers().map().containsKey("Content-Type") && + "text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0).split(";")[0].trim())) { + java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A"); + String responseBodyText = s.hasNext() ? s.next() : ""; + return new ApiResponse( + localVarResponse.statusCode(), + localVarResponse.headers().map(), + responseBodyText + ); + } else { + throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse); + } + } finally { + } + } catch (IOException e) { + throw new ApiException(e); + } + catch (InterruptedException e) { + Thread.currentThread().interrupt(); + throw new ApiException(e); + } + } + + private HttpRequest.Builder testBodyMultipartFormdataSingleBinaryRequestBuilder(File myFile) throws ApiException { + + HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder(); + + String localVarPath = "/body/application/octetstream/single_binary"; + + localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath)); + + localVarRequestBuilder.header("Accept", "text/plain"); + + MultipartEntityBuilder multiPartBuilder = MultipartEntityBuilder.create(); + boolean hasFiles = false; + multiPartBuilder.addBinaryBody("my-file", myFile); + hasFiles = true; + HttpEntity entity = multiPartBuilder.build(); + HttpRequest.BodyPublisher formDataPublisher; + if (hasFiles) { + Pipe pipe; + try { + pipe = Pipe.open(); + } catch (IOException e) { + throw new RuntimeException(e); + } + new Thread(() -> { + try (OutputStream outputStream = Channels.newOutputStream(pipe.sink())) { + entity.writeTo(outputStream); + } catch (IOException e) { + e.printStackTrace(); + } + }).start(); + formDataPublisher = HttpRequest.BodyPublishers.ofInputStream(() -> Channels.newInputStream(pipe.source())); + } else { + ByteArrayOutputStream formOutputStream = new ByteArrayOutputStream(); + try { + entity.writeTo(formOutputStream); + } catch (IOException e) { + throw new RuntimeException(e); + } + formDataPublisher = HttpRequest.BodyPublishers + .ofInputStream(() -> new ByteArrayInputStream(formOutputStream.toByteArray())); + } + localVarRequestBuilder + .header("Content-Type", entity.getContentType().getValue()) + .method("POST", formDataPublisher); + if (memberVarReadTimeout != null) { + localVarRequestBuilder.timeout(memberVarReadTimeout); + } + if (memberVarInterceptor != null) { + memberVarInterceptor.accept(localVarRequestBuilder); + } + return localVarRequestBuilder; + } /** * Test body parameter(s) * Test body parameter(s) diff --git a/samples/client/echo_api/java/okhttp-gson/README.md b/samples/client/echo_api/java/okhttp-gson/README.md index 91a6d95c017..3f0a774aff8 100644 --- a/samples/client/echo_api/java/okhttp-gson/README.md +++ b/samples/client/echo_api/java/okhttp-gson/README.md @@ -123,6 +123,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testBodyMultipartFormdataSingleBinary**](docs/BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**testEchoBodyAllOfPet**](docs/BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml b/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml index 65ed116bef0..f5d4fc9abbd 100644 --- a/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml +++ b/samples/client/echo_api/java/okhttp-gson/api/openapi.yaml @@ -513,6 +513,27 @@ paths: tags: - body x-accepts: image/gif + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain /body/application/octetstream/array_of_binary: post: description: Test array of binary in multipart mime @@ -825,6 +846,12 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: + format: binary + type: string + type: object test_body_multipart_formdata_array_of_binary_request: properties: files: diff --git a/samples/client/echo_api/java/okhttp-gson/docs/BodyApi.md b/samples/client/echo_api/java/okhttp-gson/docs/BodyApi.md index 265f46bb01d..c5694eaaf2b 100644 --- a/samples/client/echo_api/java/okhttp-gson/docs/BodyApi.md +++ b/samples/client/echo_api/java/okhttp-gson/docs/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:3000* | [**testBinaryGif**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body | | [**testBodyApplicationOctetstreamBinary**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**testBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testBodyMultipartFormdataSingleBinary**](BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**testEchoBodyAllOfPet**](BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**testEchoBodyFreeFormObjectResponseString**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -196,6 +197,68 @@ No authorization required |-------------|-------------|------------------| | **200** | Successful operation | - | + +# **testBodyMultipartFormdataSingleBinary** +> String testBodyMultipartFormdataSingleBinary(myFile) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + File myFile = new File("/path/to/file"); // File | + try { + String result = apiInstance.testBodyMultipartFormdataSingleBinary(myFile); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataSingleBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **myFile** | **File**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + # **testEchoBodyAllOfPet** > Pet testEchoBodyAllOfPet(pet) diff --git a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/BodyApi.java index f0e04903aa6..e344d508d10 100644 --- a/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/BodyApi.java +++ b/samples/client/echo_api/java/okhttp-gson/src/main/java/org/openapitools/client/api/BodyApi.java @@ -432,6 +432,128 @@ public class BodyApi { localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for testBodyMultipartFormdataSingleBinary + * @param myFile (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public okhttp3.Call testBodyMultipartFormdataSingleBinaryCall(File myFile, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/body/application/octetstream/single_binary"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (myFile != null) { + localVarFormParams.put("my-file", myFile); + } + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { }; + return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call testBodyMultipartFormdataSingleBinaryValidateBeforeCall(File myFile, final ApiCallback _callback) throws ApiException { + return testBodyMultipartFormdataSingleBinaryCall(myFile, _callback); + + } + + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public String testBodyMultipartFormdataSingleBinary(File myFile) throws ApiException { + ApiResponse localVarResp = testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile); + return localVarResp.getData(); + } + + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public ApiResponse testBodyMultipartFormdataSingleBinaryWithHttpInfo(File myFile) throws ApiException { + okhttp3.Call localVarCall = testBodyMultipartFormdataSingleBinaryValidateBeforeCall(myFile, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Test single binary in multipart mime (asynchronously) + * Test single binary in multipart mime + * @param myFile (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + +
Status Code Description Response Headers
200 Successful operation -
+ */ + public okhttp3.Call testBodyMultipartFormdataSingleBinaryAsync(File myFile, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = testBodyMultipartFormdataSingleBinaryValidateBeforeCall(myFile, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for testEchoBodyAllOfPet * @param pet Pet object that needs to be added to the store (optional) diff --git a/samples/client/echo_api/java/resttemplate/README.md b/samples/client/echo_api/java/resttemplate/README.md index 63c5a2b38f8..3950c9c3273 100644 --- a/samples/client/echo_api/java/resttemplate/README.md +++ b/samples/client/echo_api/java/resttemplate/README.md @@ -122,6 +122,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testBodyMultipartFormdataSingleBinary**](docs/BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**testEchoBodyAllOfPet**](docs/BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/java/resttemplate/api/openapi.yaml b/samples/client/echo_api/java/resttemplate/api/openapi.yaml index 65ed116bef0..f5d4fc9abbd 100644 --- a/samples/client/echo_api/java/resttemplate/api/openapi.yaml +++ b/samples/client/echo_api/java/resttemplate/api/openapi.yaml @@ -513,6 +513,27 @@ paths: tags: - body x-accepts: image/gif + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain /body/application/octetstream/array_of_binary: post: description: Test array of binary in multipart mime @@ -825,6 +846,12 @@ components: allOf: - $ref: '#/components/schemas/Bird' - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: + format: binary + type: string + type: object test_body_multipart_formdata_array_of_binary_request: properties: files: diff --git a/samples/client/echo_api/java/resttemplate/docs/BodyApi.md b/samples/client/echo_api/java/resttemplate/docs/BodyApi.md index d8393232100..3cf2014e31f 100644 --- a/samples/client/echo_api/java/resttemplate/docs/BodyApi.md +++ b/samples/client/echo_api/java/resttemplate/docs/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:3000* | [**testBinaryGif**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body | | [**testBodyApplicationOctetstreamBinary**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**testBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testBodyMultipartFormdataSingleBinary**](BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**testEchoBodyAllOfPet**](BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**testEchoBodyFreeFormObjectResponseString**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -209,6 +210,72 @@ No authorization required | **200** | Successful operation | - | +## testBodyMultipartFormdataSingleBinary + +> String testBodyMultipartFormdataSingleBinary(myFile) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + File myFile = new File("/path/to/file"); // File | + try { + String result = apiInstance.testBodyMultipartFormdataSingleBinary(myFile); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataSingleBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **myFile** | **File**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + ## testEchoBodyAllOfPet > Pet testEchoBodyAllOfPet(pet) diff --git a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java index 65bf836b78c..572f8586b5c 100644 --- a/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java +++ b/samples/client/echo_api/java/resttemplate/src/main/java/org/openapitools/client/api/BodyApi.java @@ -180,6 +180,52 @@ public class BodyApi { ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; return apiClient.invokeAPI("/body/application/octetstream/array_of_binary", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); } + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + *

200 - Successful operation + * @param myFile (optional) + * @return String + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public String testBodyMultipartFormdataSingleBinary(File myFile) throws RestClientException { + return testBodyMultipartFormdataSingleBinaryWithHttpInfo(myFile).getBody(); + } + + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + *

200 - Successful operation + * @param myFile (optional) + * @return ResponseEntity<String> + * @throws RestClientException if an error occurs while attempting to invoke the API + */ + public ResponseEntity testBodyMultipartFormdataSingleBinaryWithHttpInfo(File myFile) throws RestClientException { + Object localVarPostBody = null; + + + final MultiValueMap localVarQueryParams = new LinkedMultiValueMap(); + final HttpHeaders localVarHeaderParams = new HttpHeaders(); + final MultiValueMap localVarCookieParams = new LinkedMultiValueMap(); + final MultiValueMap localVarFormParams = new LinkedMultiValueMap(); + + if (myFile != null) + localVarFormParams.add("my-file", new FileSystemResource(myFile)); + + final String[] localVarAccepts = { + "text/plain" + }; + final List localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + ParameterizedTypeReference localReturnType = new ParameterizedTypeReference() {}; + return apiClient.invokeAPI("/body/application/octetstream/single_binary", HttpMethod.POST, Collections.emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType); + } /** * Test body parameter(s) * Test body parameter(s) diff --git a/samples/client/echo_api/php-nextgen/README.md b/samples/client/echo_api/php-nextgen/README.md index 702a20f599f..cf811c24b44 100644 --- a/samples/client/echo_api/php-nextgen/README.md +++ b/samples/client/echo_api/php-nextgen/README.md @@ -81,6 +81,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**testBinaryGif**](docs/Api/BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/Api/BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/Api/BodyApi.md#testbodymultipartformdataarrayofbinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testBodyMultipartFormdataSingleBinary**](docs/Api/BodyApi.md#testbodymultipartformdatasinglebinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**testEchoBodyAllOfPet**](docs/Api/BodyApi.md#testechobodyallofpet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/Api/BodyApi.md#testechobodyfreeformobjectresponsestring) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**testEchoBodyPet**](docs/Api/BodyApi.md#testechobodypet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md b/samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md index 7b185c725c4..cb2845fd730 100644 --- a/samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md +++ b/samples/client/echo_api/php-nextgen/docs/Api/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to http://localhost:3000, except if the operation defines | [**testBinaryGif()**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body | | [**testBodyApplicationOctetstreamBinary()**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**testBodyMultipartFormdataArrayOfBinary()**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testBodyMultipartFormdataSingleBinary()**](BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**testEchoBodyAllOfPet()**](BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**testEchoBodyFreeFormObjectResponseString()**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**testEchoBodyPet()**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -179,6 +180,62 @@ No authorization required [[Back to Model list]](../../README.md#models) [[Back to README]](../../README.md) +## `testBodyMultipartFormdataSingleBinary()` + +```php +testBodyMultipartFormdataSingleBinary($my_file): string +``` + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + +```php +testBodyMultipartFormdataSingleBinary($my_file); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling BodyApi->testBodyMultipartFormdataSingleBinary: ', $e->getMessage(), PHP_EOL; +} +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------- | ------------- | ------------- | ------------- | +| **my_file** | **\SplFileObject****\SplFileObject**| | [optional] | + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `text/plain` + +[[Back to top]](#) [[Back to API list]](../../README.md#endpoints) +[[Back to Model list]](../../README.md#models) +[[Back to README]](../../README.md) + ## `testEchoBodyAllOfPet()` ```php diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 45b4daa9ea1..e7ec741d331 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -81,6 +81,9 @@ class BodyApi 'testBodyMultipartFormdataArrayOfBinary' => [ 'multipart/form-data', ], + 'testBodyMultipartFormdataSingleBinary' => [ + 'multipart/form-data', + ], 'testEchoBodyAllOfPet' => [ 'application/json', ], @@ -1082,6 +1085,326 @@ class BodyApi ); } + /** + * Operation testBodyMultipartFormdataSingleBinary + * + * Test single binary in multipart mime + * + * @param \SplFileObject|null $my_file my_file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataSingleBinary'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return string + */ + public function testBodyMultipartFormdataSingleBinary( + ?\SplFileObject $my_file = null, + string $contentType = self::contentTypes['testBodyMultipartFormdataSingleBinary'][0] + ): string + { + list($response) = $this->testBodyMultipartFormdataSingleBinaryWithHttpInfo($my_file, $contentType); + return $response; + } + + /** + * Operation testBodyMultipartFormdataSingleBinaryWithHttpInfo + * + * Test single binary in multipart mime + * + * @param \SplFileObject|null $my_file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataSingleBinary'] to see the possible values for this operation + * + * @throws ApiException on non-2xx response or if the response body is not in the expected format + * @throws InvalidArgumentException + * @return array of string, HTTP status code, HTTP response headers (array of strings) + */ + public function testBodyMultipartFormdataSingleBinaryWithHttpInfo( + ?\SplFileObject $my_file = null, + string $contentType = self::contentTypes['testBodyMultipartFormdataSingleBinary'][0] + ): array + { + $request = $this->testBodyMultipartFormdataSingleBinaryRequest($my_file, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('string' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('string' !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = 'string'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + try { + $content = json_decode($content, false, 512, JSON_THROW_ON_ERROR); + } catch (\JsonException $exception) { + throw new ApiException( + sprintf( + 'Error JSON decoding server response (%s)', + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $content + ); + } + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation testBodyMultipartFormdataSingleBinaryAsync + * + * Test single binary in multipart mime + * + * @param \SplFileObject|null $my_file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataSingleBinary'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function testBodyMultipartFormdataSingleBinaryAsync( + ?\SplFileObject $my_file = null, + string $contentType = self::contentTypes['testBodyMultipartFormdataSingleBinary'][0] + ): PromiseInterface + { + return $this->testBodyMultipartFormdataSingleBinaryAsyncWithHttpInfo($my_file, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation testBodyMultipartFormdataSingleBinaryAsyncWithHttpInfo + * + * Test single binary in multipart mime + * + * @param \SplFileObject|null $my_file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataSingleBinary'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return PromiseInterface + */ + public function testBodyMultipartFormdataSingleBinaryAsyncWithHttpInfo( + $my_file = null, + string $contentType = self::contentTypes['testBodyMultipartFormdataSingleBinary'][0] + ): PromiseInterface + { + $returnType = 'string'; + $request = $this->testBodyMultipartFormdataSingleBinaryRequest($my_file, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'testBodyMultipartFormdataSingleBinary' + * + * @param \SplFileObject|null $my_file (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['testBodyMultipartFormdataSingleBinary'] to see the possible values for this operation + * + * @throws InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function testBodyMultipartFormdataSingleBinaryRequest( + $my_file = null, + string $contentType = self::contentTypes['testBodyMultipartFormdataSingleBinary'][0] + ): Request + { + + + + $resourcePath = '/body/application/octetstream/single_binary'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + // form params + if ($my_file !== null) { + $multipart = true; + $formParams['my-file'] = []; + $paramFiles = is_array($my_file) ? $my_file : [$my_file]; + foreach ($paramFiles as $paramFile) { + $formParams['my-file'][] = \GuzzleHttp\Psr7\Utils::tryFopen( + ObjectSerializer::toFormValue($paramFile), + 'rb' + ); + } + } + + $headers = $this->headerSelector->selectHeaders( + ['text/plain', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation testEchoBodyAllOfPet * diff --git a/samples/client/echo_api/powershell/README.md b/samples/client/echo_api/powershell/README.md index f4aab75b220..163717284ad 100644 --- a/samples/client/echo_api/powershell/README.md +++ b/samples/client/echo_api/powershell/README.md @@ -56,6 +56,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**Test-BinaryGif**](docs/BodyApi.md#Test-BinaryGif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**Test-BodyApplicationOctetstreamBinary**](docs/BodyApi.md#Test-BodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**Test-BodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#Test-BodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**Test-BodyMultipartFormdataSingleBinary**](docs/BodyApi.md#Test-BodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**Test-EchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#Test-EchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**Test-EchoBodyPet**](docs/BodyApi.md#Test-EchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) *BodyApi* | [**Test-EchoBodyPetResponseString**](docs/BodyApi.md#Test-EchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body diff --git a/samples/client/echo_api/powershell/docs/BodyApi.md b/samples/client/echo_api/powershell/docs/BodyApi.md index b2c52e663ed..9302de3186f 100644 --- a/samples/client/echo_api/powershell/docs/BodyApi.md +++ b/samples/client/echo_api/powershell/docs/BodyApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**Test-BinaryGif**](BodyApi.md#Test-BinaryGif) | **POST** /binary/gif | Test binary (gif) response body [**Test-BodyApplicationOctetstreamBinary**](BodyApi.md#Test-BodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) [**Test-BodyMultipartFormdataArrayOfBinary**](BodyApi.md#Test-BodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +[**Test-BodyMultipartFormdataSingleBinary**](BodyApi.md#Test-BodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime [**Test-EchoBodyFreeFormObjectResponseString**](BodyApi.md#Test-EchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object [**Test-EchoBodyPet**](BodyApi.md#Test-EchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) [**Test-EchoBodyPetResponseString**](BodyApi.md#Test-EchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body @@ -138,6 +139,49 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **Test-BodyMultipartFormdataSingleBinary** +> String Test-BodyMultipartFormdataSingleBinary
+>         [-MyFile]
+ +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example +```powershell +$MyFile = # System.IO.FileInfo | (optional) + +# Test single binary in multipart mime +try { + $Result = Test-BodyMultipartFormdataSingleBinary -MyFile $MyFile +} catch { + Write-Host ("Exception occurred when calling Test-BodyMultipartFormdataSingleBinary: {0}" -f ($_.ErrorDetails | ConvertFrom-Json)) + Write-Host ("Response headers: {0}" -f ($_.Exception.Response.Headers | ConvertTo-Json)) +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **MyFile** | **System.IO.FileInfo****System.IO.FileInfo**| | [optional] + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: text/plain + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **Test-EchoBodyFreeFormObjectResponseString** > String Test-EchoBodyFreeFormObjectResponseString
diff --git a/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/BodyApi.ps1 b/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/BodyApi.ps1 index 4ddf81d7948..dbd9ab87992 100644 --- a/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/BodyApi.ps1 +++ b/samples/client/echo_api/powershell/src/PSOpenAPITools/Api/BodyApi.ps1 @@ -223,6 +223,82 @@ function Test-BodyMultipartFormdataArrayOfBinary { <# .SYNOPSIS +Test single binary in multipart mime + +.DESCRIPTION + +No description available. + +.PARAMETER MyFile +No description available. + +.PARAMETER WithHttpInfo + +A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response + +.OUTPUTS + +String +#> +function Test-BodyMultipartFormdataSingleBinary { + [CmdletBinding()] + Param ( + [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] + [System.IO.FileInfo] + ${MyFile}, + [Switch] + $WithHttpInfo + ) + + Process { + 'Calling method: Test-BodyMultipartFormdataSingleBinary' | Write-Debug + $PSBoundParameters | Out-DebugParameter | Write-Debug + + $LocalVarAccepts = @() + $LocalVarContentTypes = @() + $LocalVarQueryParameters = @{} + $LocalVarHeaderParameters = @{} + $LocalVarFormParameters = @{} + $LocalVarPathParameters = @{} + $LocalVarCookieParameters = @{} + $LocalVarBodyParameter = $null + + $Configuration = Get-Configuration + # HTTP header 'Accept' (if needed) + $LocalVarAccepts = @('text/plain') + + # HTTP header 'Content-Type' + $LocalVarContentTypes = @('multipart/form-data') + + $LocalVarUri = '/body/application/octetstream/single_binary' + + if ($MyFile) { + $LocalVarFormParameters['my-file'] = $MyFile + } + + $LocalVarResult = Invoke-ApiClient -Method 'POST' ` + -Uri $LocalVarUri ` + -Accepts $LocalVarAccepts ` + -ContentTypes $LocalVarContentTypes ` + -Body $LocalVarBodyParameter ` + -HeaderParameters $LocalVarHeaderParameters ` + -QueryParameters $LocalVarQueryParameters ` + -FormParameters $LocalVarFormParameters ` + -CookieParameters $LocalVarCookieParameters ` + -ReturnType "String" ` + -IsBodyNullable $false + + if ($WithHttpInfo.IsPresent) { + return $LocalVarResult + } else { + return $LocalVarResult["Response"] + } + } +} + +<# +.SYNOPSIS + Test free form object .DESCRIPTION diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md index 3e277b6d69e..628ec87c9a0 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/README.md @@ -99,6 +99,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**test_body_multipart_formdata_single_binary**](docs/BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**test_echo_body_all_of_pet**](docs/BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**test_echo_body_free_form_object_response_string**](docs/BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**test_echo_body_pet**](docs/BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/BodyApi.md b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/BodyApi.md index 5db17c9b977..a0f96e88f98 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/BodyApi.md +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/docs/BodyApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**test_binary_gif**](BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body [**test_body_application_octetstream_binary**](BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) [**test_body_multipart_formdata_array_of_binary**](BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +[**test_body_multipart_formdata_single_binary**](BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime [**test_echo_body_all_of_pet**](BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) [**test_echo_body_free_form_object_response_string**](BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object [**test_echo_body_pet**](BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) @@ -217,6 +218,75 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_body_multipart_formdata_single_binary** +> str test_body_multipart_formdata_single_binary(my_file=my_file) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + + +```python +import time +import os +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost:3000 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "http://localhost:3000" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BodyApi(api_client) + my_file = None # bytearray | (optional) + + try: + # Test single binary in multipart mime + api_response = api_instance.test_body_multipart_formdata_single_binary(my_file=my_file) + print("The response of BodyApi->test_body_multipart_formdata_single_binary:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BodyApi->test_body_multipart_formdata_single_binary: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **my_file** | **bytearray**| | [optional] + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: text/plain + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_echo_body_all_of_pet** > Pet test_echo_body_all_of_pet(pet=pet) diff --git a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py index bba3d473009..77bd5615092 100644 --- a/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python-disallowAdditionalPropertiesIfNotPresent-true/openapi_client/api/body_api.py @@ -839,6 +839,276 @@ class BodyApi: + @validate_call + def test_body_multipart_formdata_single_binary( + self, + my_file: Optional[Union[StrictBytes, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Test single binary in multipart mime + + Test single binary in multipart mime + + :param my_file: + :type my_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_body_multipart_formdata_single_binary_serialize( + my_file=my_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def test_body_multipart_formdata_single_binary_with_http_info( + self, + my_file: Optional[Union[StrictBytes, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Test single binary in multipart mime + + Test single binary in multipart mime + + :param my_file: + :type my_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_body_multipart_formdata_single_binary_serialize( + my_file=my_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def test_body_multipart_formdata_single_binary_without_preload_content( + self, + my_file: Optional[Union[StrictBytes, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Test single binary in multipart mime + + Test single binary in multipart mime + + :param my_file: + :type my_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_body_multipart_formdata_single_binary_serialize( + my_file=my_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_body_multipart_formdata_single_binary_serialize( + self, + my_file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if my_file is not None: + _files['my-file'] = my_file + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/body/application/octetstream/single_binary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def test_echo_body_all_of_pet( self, diff --git a/samples/client/echo_api/python-pydantic-v1/README.md b/samples/client/echo_api/python-pydantic-v1/README.md index 1edeb3fd50d..fd797996cf6 100644 --- a/samples/client/echo_api/python-pydantic-v1/README.md +++ b/samples/client/echo_api/python-pydantic-v1/README.md @@ -99,6 +99,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**test_body_multipart_formdata_single_binary**](docs/BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**test_echo_body_all_of_pet**](docs/BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**test_echo_body_free_form_object_response_string**](docs/BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**test_echo_body_pet**](docs/BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/python-pydantic-v1/docs/BodyApi.md b/samples/client/echo_api/python-pydantic-v1/docs/BodyApi.md index cd65141a98f..228fcafd1d2 100644 --- a/samples/client/echo_api/python-pydantic-v1/docs/BodyApi.md +++ b/samples/client/echo_api/python-pydantic-v1/docs/BodyApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**test_binary_gif**](BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body [**test_body_application_octetstream_binary**](BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) [**test_body_multipart_formdata_array_of_binary**](BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +[**test_body_multipart_formdata_single_binary**](BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime [**test_echo_body_all_of_pet**](BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) [**test_echo_body_free_form_object_response_string**](BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object [**test_echo_body_pet**](BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) @@ -208,6 +209,72 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_body_multipart_formdata_single_binary** +> str test_body_multipart_formdata_single_binary(my_file=my_file) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + +```python +import time +import os +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost:3000 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "http://localhost:3000" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BodyApi(api_client) + my_file = None # bytearray | (optional) + + try: + # Test single binary in multipart mime + api_response = api_instance.test_body_multipart_formdata_single_binary(my_file=my_file) + print("The response of BodyApi->test_body_multipart_formdata_single_binary:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BodyApi->test_body_multipart_formdata_single_binary: %s\n" % e) +``` + + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **my_file** | **bytearray**| | [optional] + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: text/plain + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_echo_body_all_of_pet** > Pet test_echo_body_all_of_pet(pet=pet) diff --git a/samples/client/echo_api/python-pydantic-v1/openapi_client/api/body_api.py b/samples/client/echo_api/python-pydantic-v1/openapi_client/api/body_api.py index 925f1ae6de2..62db8707477 100644 --- a/samples/client/echo_api/python-pydantic-v1/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python-pydantic-v1/openapi_client/api/body_api.py @@ -479,6 +479,153 @@ class BodyApi: collection_formats=_collection_formats, _request_auth=_params.get('_request_auth')) + @validate_arguments + def test_body_multipart_formdata_single_binary(self, my_file : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> str: # noqa: E501 + """Test single binary in multipart mime # noqa: E501 + + Test single binary in multipart mime # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_body_multipart_formdata_single_binary(my_file, async_req=True) + >>> result = thread.get() + + :param my_file: + :type my_file: bytearray + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _request_timeout: timeout setting for this request. + If one number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: str + """ + kwargs['_return_http_data_only'] = True + if '_preload_content' in kwargs: + message = "Error! Please call the test_body_multipart_formdata_single_binary_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501 + raise ValueError(message) + return self.test_body_multipart_formdata_single_binary_with_http_info(my_file, **kwargs) # noqa: E501 + + @validate_arguments + def test_body_multipart_formdata_single_binary_with_http_info(self, my_file : Optional[Union[StrictBytes, StrictStr]] = None, **kwargs) -> ApiResponse: # noqa: E501 + """Test single binary in multipart mime # noqa: E501 + + Test single binary in multipart mime # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.test_body_multipart_formdata_single_binary_with_http_info(my_file, async_req=True) + >>> result = thread.get() + + :param my_file: + :type my_file: bytearray + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(str, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'my_file' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method test_body_multipart_formdata_single_binary" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + if _params['my_file'] is not None: + _files['my-file'] = _params['my_file'] + + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['text/plain']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "str", + } + + return self.api_client.call_api( + '/body/application/octetstream/single_binary', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + @validate_arguments def test_echo_body_all_of_pet(self, pet : Annotated[Optional[Pet], Field(description="Pet object that needs to be added to the store")] = None, **kwargs) -> Pet: # noqa: E501 """Test body parameter(s) # noqa: E501 diff --git a/samples/client/echo_api/python/README.md b/samples/client/echo_api/python/README.md index 3e277b6d69e..628ec87c9a0 100644 --- a/samples/client/echo_api/python/README.md +++ b/samples/client/echo_api/python/README.md @@ -99,6 +99,7 @@ Class | Method | HTTP request | Description *BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**test_body_multipart_formdata_single_binary**](docs/BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *BodyApi* | [**test_echo_body_all_of_pet**](docs/BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *BodyApi* | [**test_echo_body_free_form_object_response_string**](docs/BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *BodyApi* | [**test_echo_body_pet**](docs/BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/python/docs/BodyApi.md b/samples/client/echo_api/python/docs/BodyApi.md index 5db17c9b977..a0f96e88f98 100644 --- a/samples/client/echo_api/python/docs/BodyApi.md +++ b/samples/client/echo_api/python/docs/BodyApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**test_binary_gif**](BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body [**test_body_application_octetstream_binary**](BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) [**test_body_multipart_formdata_array_of_binary**](BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +[**test_body_multipart_formdata_single_binary**](BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime [**test_echo_body_all_of_pet**](BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) [**test_echo_body_free_form_object_response_string**](BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object [**test_echo_body_pet**](BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) @@ -217,6 +218,75 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **test_body_multipart_formdata_single_binary** +> str test_body_multipart_formdata_single_binary(my_file=my_file) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Example + + +```python +import time +import os +import openapi_client +from openapi_client.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to http://localhost:3000 +# See configuration.py for a list of all supported configuration parameters. +configuration = openapi_client.Configuration( + host = "http://localhost:3000" +) + + +# Enter a context with an instance of the API client +with openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = openapi_client.BodyApi(api_client) + my_file = None # bytearray | (optional) + + try: + # Test single binary in multipart mime + api_response = api_instance.test_body_multipart_formdata_single_binary(my_file=my_file) + print("The response of BodyApi->test_body_multipart_formdata_single_binary:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling BodyApi->test_body_multipart_formdata_single_binary: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **my_file** | **bytearray**| | [optional] + +### Return type + +**str** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: text/plain + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful operation | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **test_echo_body_all_of_pet** > Pet test_echo_body_all_of_pet(pet=pet) diff --git a/samples/client/echo_api/python/openapi_client/api/body_api.py b/samples/client/echo_api/python/openapi_client/api/body_api.py index bba3d473009..77bd5615092 100644 --- a/samples/client/echo_api/python/openapi_client/api/body_api.py +++ b/samples/client/echo_api/python/openapi_client/api/body_api.py @@ -839,6 +839,276 @@ class BodyApi: + @validate_call + def test_body_multipart_formdata_single_binary( + self, + my_file: Optional[Union[StrictBytes, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> str: + """Test single binary in multipart mime + + Test single binary in multipart mime + + :param my_file: + :type my_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_body_multipart_formdata_single_binary_serialize( + my_file=my_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def test_body_multipart_formdata_single_binary_with_http_info( + self, + my_file: Optional[Union[StrictBytes, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[str]: + """Test single binary in multipart mime + + Test single binary in multipart mime + + :param my_file: + :type my_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_body_multipart_formdata_single_binary_serialize( + my_file=my_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def test_body_multipart_formdata_single_binary_without_preload_content( + self, + my_file: Optional[Union[StrictBytes, StrictStr]] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Test single binary in multipart mime + + Test single binary in multipart mime + + :param my_file: + :type my_file: bytearray + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._test_body_multipart_formdata_single_binary_serialize( + my_file=my_file, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "str", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _test_body_multipart_formdata_single_binary_serialize( + self, + my_file, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> Tuple: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, str] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + if my_file is not None: + _files['my-file'] = my_file + # process the body parameter + + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'text/plain' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/body/application/octetstream/single_binary', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + @validate_call def test_echo_body_all_of_pet( self, diff --git a/samples/client/echo_api/ruby-faraday/README.md b/samples/client/echo_api/ruby-faraday/README.md index 88e3fc32459..0c10000333e 100644 --- a/samples/client/echo_api/ruby-faraday/README.md +++ b/samples/client/echo_api/ruby-faraday/README.md @@ -88,6 +88,7 @@ Class | Method | HTTP request | Description *OpenapiClient::BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *OpenapiClient::BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *OpenapiClient::BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*OpenapiClient::BodyApi* | [**test_body_multipart_formdata_single_binary**](docs/BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *OpenapiClient::BodyApi* | [**test_echo_body_all_of_pet**](docs/BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *OpenapiClient::BodyApi* | [**test_echo_body_free_form_object_response_string**](docs/BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *OpenapiClient::BodyApi* | [**test_echo_body_pet**](docs/BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/ruby-faraday/docs/BodyApi.md b/samples/client/echo_api/ruby-faraday/docs/BodyApi.md index e8b37e1fd54..f5d6d57479e 100644 --- a/samples/client/echo_api/ruby-faraday/docs/BodyApi.md +++ b/samples/client/echo_api/ruby-faraday/docs/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:3000* | [**test_binary_gif**](BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body | | [**test_body_application_octetstream_binary**](BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**test_body_multipart_formdata_array_of_binary**](BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**test_body_multipart_formdata_single_binary**](BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**test_echo_body_all_of_pet**](BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**test_echo_body_free_form_object_response_string**](BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**test_echo_body_pet**](BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -205,6 +206,72 @@ No authorization required - **Accept**: text/plain +## test_body_multipart_formdata_single_binary + +> String test_body_multipart_formdata_single_binary(opts) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::BodyApi.new +opts = { + my_file: File.new('/path/to/some/file') # File | +} + +begin + # Test single binary in multipart mime + result = api_instance.test_body_multipart_formdata_single_binary(opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling BodyApi->test_body_multipart_formdata_single_binary: #{e}" +end +``` + +#### Using the test_body_multipart_formdata_single_binary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> test_body_multipart_formdata_single_binary_with_http_info(opts) + +```ruby +begin + # Test single binary in multipart mime + data, status_code, headers = api_instance.test_body_multipart_formdata_single_binary_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => String +rescue OpenapiClient::ApiError => e + puts "Error when calling BodyApi->test_body_multipart_formdata_single_binary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **my_file** | **File** | | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + + ## test_echo_body_all_of_pet > test_echo_body_all_of_pet(opts) diff --git a/samples/client/echo_api/ruby-faraday/lib/openapi_client/api/body_api.rb b/samples/client/echo_api/ruby-faraday/lib/openapi_client/api/body_api.rb index f9e4b67a922..16dc16b730b 100644 --- a/samples/client/echo_api/ruby-faraday/lib/openapi_client/api/body_api.rb +++ b/samples/client/echo_api/ruby-faraday/lib/openapi_client/api/body_api.rb @@ -209,6 +209,71 @@ module OpenapiClient return data, status_code, headers end + # Test single binary in multipart mime + # Test single binary in multipart mime + # @param [Hash] opts the optional parameters + # @option opts [File] :my_file + # @return [String] + def test_body_multipart_formdata_single_binary(opts = {}) + data, _status_code, _headers = test_body_multipart_formdata_single_binary_with_http_info(opts) + data + end + + # Test single binary in multipart mime + # Test single binary in multipart mime + # @param [Hash] opts the optional parameters + # @option opts [File] :my_file + # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers + def test_body_multipart_formdata_single_binary_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BodyApi.test_body_multipart_formdata_single_binary ...' + end + # resource path + local_var_path = '/body/application/octetstream/single_binary' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['text/plain']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['my-file'] = opts[:'my_file'] if !opts[:'my_file'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'String' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"BodyApi.test_body_multipart_formdata_single_binary", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BodyApi#test_body_multipart_formdata_single_binary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Test body parameter(s) # Test body parameter(s) # @param [Hash] opts the optional parameters diff --git a/samples/client/echo_api/ruby-httpx/README.md b/samples/client/echo_api/ruby-httpx/README.md index eddc0da80fb..d389064972b 100644 --- a/samples/client/echo_api/ruby-httpx/README.md +++ b/samples/client/echo_api/ruby-httpx/README.md @@ -88,6 +88,7 @@ Class | Method | HTTP request | Description *OpenapiClient::BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *OpenapiClient::BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *OpenapiClient::BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*OpenapiClient::BodyApi* | [**test_body_multipart_formdata_single_binary**](docs/BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *OpenapiClient::BodyApi* | [**test_echo_body_all_of_pet**](docs/BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *OpenapiClient::BodyApi* | [**test_echo_body_free_form_object_response_string**](docs/BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *OpenapiClient::BodyApi* | [**test_echo_body_pet**](docs/BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/ruby-httpx/docs/BodyApi.md b/samples/client/echo_api/ruby-httpx/docs/BodyApi.md index e8b37e1fd54..f5d6d57479e 100644 --- a/samples/client/echo_api/ruby-httpx/docs/BodyApi.md +++ b/samples/client/echo_api/ruby-httpx/docs/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:3000* | [**test_binary_gif**](BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body | | [**test_body_application_octetstream_binary**](BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**test_body_multipart_formdata_array_of_binary**](BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**test_body_multipart_formdata_single_binary**](BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**test_echo_body_all_of_pet**](BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**test_echo_body_free_form_object_response_string**](BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**test_echo_body_pet**](BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -205,6 +206,72 @@ No authorization required - **Accept**: text/plain +## test_body_multipart_formdata_single_binary + +> String test_body_multipart_formdata_single_binary(opts) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::BodyApi.new +opts = { + my_file: File.new('/path/to/some/file') # File | +} + +begin + # Test single binary in multipart mime + result = api_instance.test_body_multipart_formdata_single_binary(opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling BodyApi->test_body_multipart_formdata_single_binary: #{e}" +end +``` + +#### Using the test_body_multipart_formdata_single_binary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> test_body_multipart_formdata_single_binary_with_http_info(opts) + +```ruby +begin + # Test single binary in multipart mime + data, status_code, headers = api_instance.test_body_multipart_formdata_single_binary_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => String +rescue OpenapiClient::ApiError => e + puts "Error when calling BodyApi->test_body_multipart_formdata_single_binary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **my_file** | **File** | | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + + ## test_echo_body_all_of_pet > test_echo_body_all_of_pet(opts) diff --git a/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/body_api.rb b/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/body_api.rb index f9e4b67a922..16dc16b730b 100644 --- a/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/body_api.rb +++ b/samples/client/echo_api/ruby-httpx/lib/openapi_client/api/body_api.rb @@ -209,6 +209,71 @@ module OpenapiClient return data, status_code, headers end + # Test single binary in multipart mime + # Test single binary in multipart mime + # @param [Hash] opts the optional parameters + # @option opts [File] :my_file + # @return [String] + def test_body_multipart_formdata_single_binary(opts = {}) + data, _status_code, _headers = test_body_multipart_formdata_single_binary_with_http_info(opts) + data + end + + # Test single binary in multipart mime + # Test single binary in multipart mime + # @param [Hash] opts the optional parameters + # @option opts [File] :my_file + # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers + def test_body_multipart_formdata_single_binary_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BodyApi.test_body_multipart_formdata_single_binary ...' + end + # resource path + local_var_path = '/body/application/octetstream/single_binary' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['text/plain']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['my-file'] = opts[:'my_file'] if !opts[:'my_file'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'String' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"BodyApi.test_body_multipart_formdata_single_binary", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BodyApi#test_body_multipart_formdata_single_binary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Test body parameter(s) # Test body parameter(s) # @param [Hash] opts the optional parameters diff --git a/samples/client/echo_api/ruby-typhoeus/README.md b/samples/client/echo_api/ruby-typhoeus/README.md index 5ef55a4b87e..cdaea764c1b 100644 --- a/samples/client/echo_api/ruby-typhoeus/README.md +++ b/samples/client/echo_api/ruby-typhoeus/README.md @@ -86,6 +86,7 @@ Class | Method | HTTP request | Description *OpenapiClient::BodyApi* | [**test_binary_gif**](docs/BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body *OpenapiClient::BodyApi* | [**test_body_application_octetstream_binary**](docs/BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) *OpenapiClient::BodyApi* | [**test_body_multipart_formdata_array_of_binary**](docs/BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*OpenapiClient::BodyApi* | [**test_body_multipart_formdata_single_binary**](docs/BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime *OpenapiClient::BodyApi* | [**test_echo_body_all_of_pet**](docs/BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) *OpenapiClient::BodyApi* | [**test_echo_body_free_form_object_response_string**](docs/BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object *OpenapiClient::BodyApi* | [**test_echo_body_pet**](docs/BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) diff --git a/samples/client/echo_api/ruby-typhoeus/docs/BodyApi.md b/samples/client/echo_api/ruby-typhoeus/docs/BodyApi.md index e8b37e1fd54..f5d6d57479e 100644 --- a/samples/client/echo_api/ruby-typhoeus/docs/BodyApi.md +++ b/samples/client/echo_api/ruby-typhoeus/docs/BodyApi.md @@ -7,6 +7,7 @@ All URIs are relative to *http://localhost:3000* | [**test_binary_gif**](BodyApi.md#test_binary_gif) | **POST** /binary/gif | Test binary (gif) response body | | [**test_body_application_octetstream_binary**](BodyApi.md#test_body_application_octetstream_binary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | | [**test_body_multipart_formdata_array_of_binary**](BodyApi.md#test_body_multipart_formdata_array_of_binary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**test_body_multipart_formdata_single_binary**](BodyApi.md#test_body_multipart_formdata_single_binary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | | [**test_echo_body_all_of_pet**](BodyApi.md#test_echo_body_all_of_pet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | | [**test_echo_body_free_form_object_response_string**](BodyApi.md#test_echo_body_free_form_object_response_string) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | | [**test_echo_body_pet**](BodyApi.md#test_echo_body_pet) | **POST** /echo/body/Pet | Test body parameter(s) | @@ -205,6 +206,72 @@ No authorization required - **Accept**: text/plain +## test_body_multipart_formdata_single_binary + +> String test_body_multipart_formdata_single_binary(opts) + +Test single binary in multipart mime + +Test single binary in multipart mime + +### Examples + +```ruby +require 'time' +require 'openapi_client' + +api_instance = OpenapiClient::BodyApi.new +opts = { + my_file: File.new('/path/to/some/file') # File | +} + +begin + # Test single binary in multipart mime + result = api_instance.test_body_multipart_formdata_single_binary(opts) + p result +rescue OpenapiClient::ApiError => e + puts "Error when calling BodyApi->test_body_multipart_formdata_single_binary: #{e}" +end +``` + +#### Using the test_body_multipart_formdata_single_binary_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> test_body_multipart_formdata_single_binary_with_http_info(opts) + +```ruby +begin + # Test single binary in multipart mime + data, status_code, headers = api_instance.test_body_multipart_formdata_single_binary_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => String +rescue OpenapiClient::ApiError => e + puts "Error when calling BodyApi->test_body_multipart_formdata_single_binary_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **my_file** | **File** | | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: text/plain + + ## test_echo_body_all_of_pet > test_echo_body_all_of_pet(opts) diff --git a/samples/client/echo_api/ruby-typhoeus/lib/openapi_client/api/body_api.rb b/samples/client/echo_api/ruby-typhoeus/lib/openapi_client/api/body_api.rb index f9e4b67a922..16dc16b730b 100644 --- a/samples/client/echo_api/ruby-typhoeus/lib/openapi_client/api/body_api.rb +++ b/samples/client/echo_api/ruby-typhoeus/lib/openapi_client/api/body_api.rb @@ -209,6 +209,71 @@ module OpenapiClient return data, status_code, headers end + # Test single binary in multipart mime + # Test single binary in multipart mime + # @param [Hash] opts the optional parameters + # @option opts [File] :my_file + # @return [String] + def test_body_multipart_formdata_single_binary(opts = {}) + data, _status_code, _headers = test_body_multipart_formdata_single_binary_with_http_info(opts) + data + end + + # Test single binary in multipart mime + # Test single binary in multipart mime + # @param [Hash] opts the optional parameters + # @option opts [File] :my_file + # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers + def test_body_multipart_formdata_single_binary_with_http_info(opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: BodyApi.test_body_multipart_formdata_single_binary ...' + end + # resource path + local_var_path = '/body/application/octetstream/single_binary' + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['text/plain']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['multipart/form-data']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + form_params['my-file'] = opts[:'my_file'] if !opts[:'my_file'].nil? + + # http body (model) + post_body = opts[:debug_body] + + # return_type + return_type = opts[:debug_return_type] || 'String' + + # auth_names + auth_names = opts[:debug_auth_names] || [] + + new_options = opts.merge( + :operation => :"BodyApi.test_body_multipart_formdata_single_binary", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: BodyApi#test_body_multipart_formdata_single_binary\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end + # Test body parameter(s) # Test body parameter(s) # @param [Hash] opts the optional parameters diff --git a/samples/client/echo_api/typescript-axios/build/api.ts b/samples/client/echo_api/typescript-axios/build/api.ts index 5716d787bcf..df7ff828239 100644 --- a/samples/client/echo_api/typescript-axios/build/api.ts +++ b/samples/client/echo_api/typescript-axios/build/api.ts @@ -608,6 +608,45 @@ export const BodyApiAxiosParamCreator = function (configuration?: Configuration) + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = localVarFormParams; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Test single binary in multipart mime + * @summary Test single binary in multipart mime + * @param {File} [myFile] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testBodyMultipartFormdataSingleBinary: async (myFile?: File, options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/body/application/octetstream/single_binary`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); + + + if (myFile !== undefined) { + localVarFormParams.append('my-file', myFile as any); + } + + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -838,6 +877,19 @@ export const BodyApiFp = function(configuration?: Configuration) { const operationBasePath = operationServerMap['BodyApi.testBodyMultipartFormdataArrayOfBinary']?.[index]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); }, + /** + * Test single binary in multipart mime + * @summary Test single binary in multipart mime + * @param {File} [myFile] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async testBodyMultipartFormdataSingleBinary(myFile?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.testBodyMultipartFormdataSingleBinary(myFile, options); + const index = configuration?.serverIndex ?? 0; + const operationBasePath = operationServerMap['BodyApi.testBodyMultipartFormdataSingleBinary']?.[index]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, operationBasePath || basePath); + }, /** * Test body parameter(s) * @summary Test body parameter(s) @@ -942,6 +994,16 @@ export const BodyApiFactory = function (configuration?: Configuration, basePath? testBodyMultipartFormdataArrayOfBinary(files: Array, options?: any): AxiosPromise { return localVarFp.testBodyMultipartFormdataArrayOfBinary(files, options).then((request) => request(axios, basePath)); }, + /** + * Test single binary in multipart mime + * @summary Test single binary in multipart mime + * @param {File} [myFile] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + testBodyMultipartFormdataSingleBinary(myFile?: File, options?: any): AxiosPromise { + return localVarFp.testBodyMultipartFormdataSingleBinary(myFile, options).then((request) => request(axios, basePath)); + }, /** * Test body parameter(s) * @summary Test body parameter(s) @@ -1037,6 +1099,18 @@ export class BodyApi extends BaseAPI { return BodyApiFp(this.configuration).testBodyMultipartFormdataArrayOfBinary(files, options).then((request) => request(this.axios, this.basePath)); } + /** + * Test single binary in multipart mime + * @summary Test single binary in multipart mime + * @param {File} [myFile] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof BodyApi + */ + public testBodyMultipartFormdataSingleBinary(myFile?: File, options?: RawAxiosRequestConfig) { + return BodyApiFp(this.configuration).testBodyMultipartFormdataSingleBinary(myFile, options).then((request) => request(this.axios, this.basePath)); + } + /** * Test body parameter(s) * @summary Test body parameter(s) diff --git a/samples/client/petstore/java/resteasy-echo/.github/workflows/maven.yml b/samples/client/petstore/java/resteasy-echo/.github/workflows/maven.yml index 89fbd4999bc..aa75c116424 100644 --- a/samples/client/petstore/java/resteasy-echo/.github/workflows/maven.yml +++ b/samples/client/petstore/java/resteasy-echo/.github/workflows/maven.yml @@ -13,7 +13,7 @@ on: jobs: build: - name: Build OpenAPI Petstore + name: Build Echo Server API runs-on: ubuntu-latest strategy: matrix: diff --git a/samples/client/petstore/java/resteasy-echo/.openapi-generator/FILES b/samples/client/petstore/java/resteasy-echo/.openapi-generator/FILES index 89d81862bef..2ff641b20af 100644 --- a/samples/client/petstore/java/resteasy-echo/.openapi-generator/FILES +++ b/samples/client/petstore/java/resteasy-echo/.openapi-generator/FILES @@ -5,63 +5,23 @@ README.md api/openapi.yaml build.gradle build.sbt -docs/AdditionalPropertiesClass.md -docs/AllOfWithSingleRef.md -docs/Animal.md -docs/AnotherFakeApi.md -docs/ArrayOfArrayOfNumberOnly.md -docs/ArrayOfNumberOnly.md -docs/ArrayTest.md -docs/Capitalization.md -docs/Cat.md +docs/AuthApi.md +docs/Bird.md +docs/BodyApi.md docs/Category.md -docs/ChildWithNullable.md -docs/ClassModel.md -docs/Client.md -docs/DefaultApi.md -docs/DeprecatedObject.md -docs/Dog.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeBigDecimalMap200Response.md -docs/FakeClassnameTags123Api.md -docs/FileSchemaTestClass.md -docs/Foo.md -docs/FooGetDefaultResponse.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/HealthCheckResult.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelApiResponse.md -docs/ModelFile.md -docs/ModelList.md -docs/ModelReturn.md -docs/Name.md -docs/NullableClass.md -docs/NumberOnly.md -docs/ObjectWithDeprecatedFields.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/OuterEnumDefaultValue.md -docs/OuterEnumInteger.md -docs/OuterEnumIntegerDefaultValue.md -docs/OuterObjectWithEnumProperty.md -docs/ParentWithNullable.md +docs/DataQuery.md +docs/DefaultValue.md +docs/FormApi.md +docs/HeaderApi.md +docs/NumberPropertiesOnly.md +docs/PathApi.md docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.md -docs/SingleRefType.md -docs/SpecialModelName.md -docs/StoreApi.md +docs/Query.md +docs/QueryApi.md +docs/StringEnumRef.md docs/Tag.md -docs/TestInlineFreeformAdditionalPropertiesRequest.md -docs/User.md -docs/UserApi.md +docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md +docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md git_push.sh gradle.properties gradle/wrapper/gradle-wrapper.jar @@ -81,66 +41,24 @@ src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerVariable.java src/main/java/org/openapitools/client/StringUtil.java -src/main/java/org/openapitools/client/api/AnotherFakeApi.java -src/main/java/org/openapitools/client/api/DefaultApi.java -src/main/java/org/openapitools/client/api/FakeApi.java -src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java -src/main/java/org/openapitools/client/api/PetApi.java -src/main/java/org/openapitools/client/api/StoreApi.java -src/main/java/org/openapitools/client/api/UserApi.java +src/main/java/org/openapitools/client/api/AuthApi.java +src/main/java/org/openapitools/client/api/BodyApi.java +src/main/java/org/openapitools/client/api/FormApi.java +src/main/java/org/openapitools/client/api/HeaderApi.java +src/main/java/org/openapitools/client/api/PathApi.java +src/main/java/org/openapitools/client/api/QueryApi.java src/main/java/org/openapitools/client/auth/ApiKeyAuth.java src/main/java/org/openapitools/client/auth/Authentication.java src/main/java/org/openapitools/client/auth/HttpBasicAuth.java src/main/java/org/openapitools/client/auth/HttpBearerAuth.java -src/main/java/org/openapitools/client/auth/OAuth.java -src/main/java/org/openapitools/client/auth/OAuthFlow.java -src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java -src/main/java/org/openapitools/client/model/Animal.java -src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java -src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java -src/main/java/org/openapitools/client/model/ArrayTest.java -src/main/java/org/openapitools/client/model/Capitalization.java -src/main/java/org/openapitools/client/model/Cat.java +src/main/java/org/openapitools/client/model/Bird.java src/main/java/org/openapitools/client/model/Category.java -src/main/java/org/openapitools/client/model/ChildWithNullable.java -src/main/java/org/openapitools/client/model/ClassModel.java -src/main/java/org/openapitools/client/model/Client.java -src/main/java/org/openapitools/client/model/DeprecatedObject.java -src/main/java/org/openapitools/client/model/Dog.java -src/main/java/org/openapitools/client/model/EnumArrays.java -src/main/java/org/openapitools/client/model/EnumClass.java -src/main/java/org/openapitools/client/model/EnumTest.java -src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java -src/main/java/org/openapitools/client/model/FileSchemaTestClass.java -src/main/java/org/openapitools/client/model/Foo.java -src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java -src/main/java/org/openapitools/client/model/FormatTest.java -src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java -src/main/java/org/openapitools/client/model/HealthCheckResult.java -src/main/java/org/openapitools/client/model/MapTest.java -src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java -src/main/java/org/openapitools/client/model/Model200Response.java -src/main/java/org/openapitools/client/model/ModelApiResponse.java -src/main/java/org/openapitools/client/model/ModelFile.java -src/main/java/org/openapitools/client/model/ModelList.java -src/main/java/org/openapitools/client/model/ModelReturn.java -src/main/java/org/openapitools/client/model/Name.java -src/main/java/org/openapitools/client/model/NullableClass.java -src/main/java/org/openapitools/client/model/NumberOnly.java -src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java -src/main/java/org/openapitools/client/model/Order.java -src/main/java/org/openapitools/client/model/OuterComposite.java -src/main/java/org/openapitools/client/model/OuterEnum.java -src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java -src/main/java/org/openapitools/client/model/OuterEnumInteger.java -src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java -src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java -src/main/java/org/openapitools/client/model/ParentWithNullable.java +src/main/java/org/openapitools/client/model/DataQuery.java +src/main/java/org/openapitools/client/model/DefaultValue.java +src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java src/main/java/org/openapitools/client/model/Pet.java -src/main/java/org/openapitools/client/model/ReadOnlyFirst.java -src/main/java/org/openapitools/client/model/SingleRefType.java -src/main/java/org/openapitools/client/model/SpecialModelName.java +src/main/java/org/openapitools/client/model/Query.java +src/main/java/org/openapitools/client/model/StringEnumRef.java src/main/java/org/openapitools/client/model/Tag.java -src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java -src/main/java/org/openapitools/client/model/User.java +src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java +src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java diff --git a/samples/client/petstore/java/resteasy-echo/README.md b/samples/client/petstore/java/resteasy-echo/README.md index 20283d76cfd..2c53ad7593f 100644 --- a/samples/client/petstore/java/resteasy-echo/README.md +++ b/samples/client/petstore/java/resteasy-echo/README.md @@ -1,10 +1,10 @@ # petstore-resteasy-echo -OpenAPI Petstore +Echo Server API -- API version: 1.0.0 +- API version: 0.1.0 -This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ +Echo Server API *Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* @@ -40,7 +40,7 @@ Add this dependency to your project's POM: org.openapitools petstore-resteasy-echo - 1.0.0 + 0.1.0 compile ``` @@ -56,7 +56,7 @@ Add this dependency to your project's build file: } dependencies { - implementation "org.openapitools:petstore-resteasy-echo:1.0.0" + implementation "org.openapitools:petstore-resteasy-echo:0.1.0" } ``` @@ -70,7 +70,7 @@ mvn clean package Then manually install the following JARs: -- `target/petstore-resteasy-echo-1.0.0.jar` +- `target/petstore-resteasy-echo-0.1.0.jar` - `target/lib/*.jar` ## Getting Started @@ -82,21 +82,25 @@ Please follow the [installation](#installation) instruction and execute the foll import org.openapitools.client.*; import org.openapitools.client.auth.*; import org.openapitools.client.model.*; -import org.openapitools.client.api.AnotherFakeApi; +import org.openapitools.client.api.AuthApi; -public class AnotherFakeApiExample { +public class AuthApiExample { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost:3000"); - AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client client = new Client(); // Client | client model + // Configure HTTP basic authorization: http_auth + HttpBasicAuth http_auth = (HttpBasicAuth) defaultClient.getAuthentication("http_auth"); + http_auth.setUsername("YOUR USERNAME"); + http_auth.setPassword("YOUR PASSWORD"); + + AuthApi apiInstance = new AuthApi(defaultClient); try { - Client result = apiInstance.call123testSpecialTags(client); + String result = apiInstance.testAuthHttpBasic(); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); + System.err.println("Exception when calling AuthApi#testAuthHttpBasic"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -113,104 +117,44 @@ All URIs are relative to *http://localhost:3000* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags -*DefaultApi* | [**fooGet**](docs/DefaultApi.md#fooGet) | **GET** /foo | -*FakeApi* | [**fakeBigDecimalMap**](docs/FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | -*FakeApi* | [**fakeHealthGet**](docs/FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint -*FakeApi* | [**fakeHttpSignatureTest**](docs/FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication -*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | -*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | -*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | -*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | -*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | -*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**testInlineFreeformAdditionalProperties**](docs/FakeApi.md#testInlineFreeformAdditionalProperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties -*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**testNullable**](docs/FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property -*FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet -*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user -*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name -*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system -*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user +*AuthApi* | [**testAuthHttpBasic**](docs/AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication +*AuthApi* | [**testAuthHttpBearer**](docs/AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication +*BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body +*BodyApi* | [**testBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) +*BodyApi* | [**testBodyMultipartFormdataArrayOfBinary**](docs/BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime +*BodyApi* | [**testBodyMultipartFormdataSingleBinary**](docs/BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime +*BodyApi* | [**testEchoBodyAllOfPet**](docs/BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) +*BodyApi* | [**testEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object +*BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) +*BodyApi* | [**testEchoBodyPetResponseString**](docs/BodyApi.md#testEchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body +*BodyApi* | [**testEchoBodyTagResponseString**](docs/BodyApi.md#testEchoBodyTagResponseString) | **POST** /echo/body/Tag/response_string | Test empty json (request body) +*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s) +*FormApi* | [**testFormOneof**](docs/FormApi.md#testFormOneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema +*HeaderApi* | [**testHeaderIntegerBooleanStringEnums**](docs/HeaderApi.md#testHeaderIntegerBooleanStringEnums) | **GET** /header/integer/boolean/string/enums | Test header parameter(s) +*PathApi* | [**testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath**](docs/PathApi.md#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath) | **GET** /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path} | Test path parameter(s) +*QueryApi* | [**testEnumRefString**](docs/QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) +*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) +*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) +*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) +*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObjectAllOf) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) +*QueryApi* | [**testQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) ## Documentation for Models - - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - - [Animal](docs/Animal.md) - - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [ArrayTest](docs/ArrayTest.md) - - [Capitalization](docs/Capitalization.md) - - [Cat](docs/Cat.md) + - [Bird](docs/Bird.md) - [Category](docs/Category.md) - - [ChildWithNullable](docs/ChildWithNullable.md) - - [ClassModel](docs/ClassModel.md) - - [Client](docs/Client.md) - - [DeprecatedObject](docs/DeprecatedObject.md) - - [Dog](docs/Dog.md) - - [EnumArrays](docs/EnumArrays.md) - - [EnumClass](docs/EnumClass.md) - - [EnumTest](docs/EnumTest.md) - - [FakeBigDecimalMap200Response](docs/FakeBigDecimalMap200Response.md) - - [FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [Foo](docs/Foo.md) - - [FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - - [FormatTest](docs/FormatTest.md) - - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [HealthCheckResult](docs/HealthCheckResult.md) - - [MapTest](docs/MapTest.md) - - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model200Response](docs/Model200Response.md) - - [ModelApiResponse](docs/ModelApiResponse.md) - - [ModelFile](docs/ModelFile.md) - - [ModelList](docs/ModelList.md) - - [ModelReturn](docs/ModelReturn.md) - - [Name](docs/Name.md) - - [NullableClass](docs/NullableClass.md) - - [NumberOnly](docs/NumberOnly.md) - - [ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - - [Order](docs/Order.md) - - [OuterComposite](docs/OuterComposite.md) - - [OuterEnum](docs/OuterEnum.md) - - [OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) - - [OuterEnumInteger](docs/OuterEnumInteger.md) - - [OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - - [OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - - [ParentWithNullable](docs/ParentWithNullable.md) + - [DataQuery](docs/DataQuery.md) + - [DefaultValue](docs/DefaultValue.md) + - [NumberPropertiesOnly](docs/NumberPropertiesOnly.md) - [Pet](docs/Pet.md) - - [ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [SingleRefType](docs/SingleRefType.md) - - [SpecialModelName](docs/SpecialModelName.md) + - [Query](docs/Query.md) + - [StringEnumRef](docs/StringEnumRef.md) - [Tag](docs/Tag.md) - - [TestInlineFreeformAdditionalPropertiesRequest](docs/TestInlineFreeformAdditionalPropertiesRequest.md) - - [User](docs/User.md) + - [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md) + - [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md) @@ -218,50 +162,17 @@ Class | Method | HTTP request | Description Authentication schemes defined for the API: - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - - -### api_key - - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test + +### http_auth - **Type**: HTTP basic authentication - -### bearer_test + +### http_bearer_auth -- **Type**: HTTP Bearer Token authentication (JWT) - - -### http_signature_test - - -- **Type**: HTTP signature authentication +- **Type**: HTTP Bearer Token authentication ## Recommendation @@ -270,5 +181,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea ## Author - +team@openapitools.org diff --git a/samples/client/petstore/java/resteasy-echo/api/openapi.yaml b/samples/client/petstore/java/resteasy-echo/api/openapi.yaml index 1a1bd6596b5..f5d4fc9abbd 100644 --- a/samples/client/petstore/java/resteasy-echo/api/openapi.yaml +++ b/samples/client/petstore/java/resteasy-echo/api/openapi.yaml @@ -1,280 +1,564 @@ -openapi: 3.0.0 +openapi: 3.0.3 info: - description: "This spec is mainly for testing Petstore server and contains fake\ - \ endpoints, models. Please do not use this for any other purpose. Special characters:\ - \ \" \\" + contact: + email: team@openapitools.org + description: Echo Server API license: - name: Apache-2.0 - url: https://www.apache.org/licenses/LICENSE-2.0.html - title: OpenAPI Petstore - version: 1.0.0 + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Echo Server API + version: 0.1.0 servers: - url: http://localhost:3000/ paths: - /foo: + /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}: get: - responses: - default: - content: - application/json: - schema: - $ref: '#/components/schemas/_foo_get_default_response' - description: response - x-accepts: application/json - /pet: - post: - description: "" - operationId: addPet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - "200": - description: Successful operation - "405": - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Add a new pet to the store - tags: - - pet - x-content-type: application/json - x-accepts: application/json - put: - description: "" - operationId: updatePet - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - "200": - description: Successful operation - "400": - description: Invalid ID supplied - "404": - description: Pet not found - "405": - description: Validation exception - security: - - petstore_auth: - - write:pets - - read:pets - summary: Update an existing pet - tags: - - pet - x-webclient-blocking: true - x-content-type: application/json - x-accepts: application/json - /pet/findByStatus: - get: - description: Multiple status values can be provided with comma separated strings - operationId: findPetsByStatus - parameters: - - deprecated: true - description: Status values that need to be considered for filter - explode: false - in: query - name: status - required: true - schema: - items: - default: available - enum: - - available - - pending - - sold - type: string - type: array - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - description: successful operation - "400": - description: Invalid status value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by status - tags: - - pet - x-webclient-blocking: true - x-accepts: application/json - /pet/findByTags: - get: - deprecated: true - description: "Multiple tags can be provided with comma separated strings. Use\ - \ tag1, tag2, tag3 for testing." - operationId: findPetsByTags - parameters: - - description: Tags to filter by - explode: false - in: query - name: tags - required: true - schema: - items: - type: string - type: array - uniqueItems: true - style: form - responses: - "200": - content: - application/xml: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - application/json: - schema: - items: - $ref: '#/components/schemas/Pet' - type: array - uniqueItems: true - description: successful operation - "400": - description: Invalid tag value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Finds Pets by tags - tags: - - pet - x-webclient-blocking: true - x-accepts: application/json - /pet/{petId}: - delete: - description: "" - operationId: deletePet + description: Test path parameter(s) + operationId: "tests/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}" parameters: - explode: false - in: header - name: api_key - required: false + in: path + name: path_string + required: true schema: type: string style: simple - - description: Pet id to delete - explode: false + - explode: false in: path - name: petId + name: path_integer required: true schema: - format: int64 type: integer style: simple - responses: - "200": - description: Successful operation - "400": - description: Invalid pet value - security: - - petstore_auth: - - write:pets - - read:pets - summary: Deletes a pet - tags: - - pet - x-accepts: application/json - get: - description: Returns a single pet - operationId: getPetById - parameters: - - description: ID of pet to return - explode: false + - explode: false in: path - name: petId + name: enum_nonref_string_path required: true schema: - format: int64 - type: integer + enum: + - success + - failure + - unclassified + type: string + style: simple + - explode: false + in: path + name: enum_ref_string_path + required: true + schema: + $ref: '#/components/schemas/StringEnumRef' style: simple responses: "200": content: - application/xml: + text/plain: schema: - $ref: '#/components/schemas/Pet' - application/json: - schema: - $ref: '#/components/schemas/Pet' - description: successful operation - "400": - description: Invalid ID supplied - "404": - description: Pet not found - security: - - api_key: [] - summary: Find pet by ID + type: string + description: Successful operation + summary: Test path parameter(s) tags: - - pet - x-webclient-blocking: true - x-accepts: application/json + - path + x-accepts: text/plain + /form/integer/boolean/string: post: - description: "" - operationId: updatePetWithForm - parameters: - - description: ID of pet that needs to be updated - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple + description: Test form parameter(s) + operationId: test/form/integer/boolean/string requestBody: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/updatePetWithForm_request' + $ref: '#/components/schemas/test_form_integer_boolean_string_request' responses: "200": + content: + text/plain: + schema: + type: string description: Successful operation - "405": - description: Invalid input - security: - - petstore_auth: - - write:pets - - read:pets - summary: Updates a pet in the store with form data + summary: Test form parameter(s) tags: - - pet + - form x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /pet/{petId}/uploadImage: + x-accepts: text/plain + /form/oneof: post: - description: "" - operationId: uploadFile + description: Test form parameter(s) for oneOf schema + operationId: test/form/oneof + requestBody: + content: + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/test_form_oneof_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test form parameter(s) for oneOf schema + tags: + - form + x-content-type: application/x-www-form-urlencoded + x-accepts: text/plain + /header/integer/boolean/string/enums: + get: + description: Test header parameter(s) + operationId: test/header/integer/boolean/string/enums parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true + - explode: true + in: header + name: integer_header + required: false schema: - format: int64 type: integer - style: simple + style: form + - explode: true + in: header + name: boolean_header + required: false + schema: + type: boolean + style: form + - explode: true + in: header + name: string_header + required: false + schema: + type: string + style: form + - explode: true + in: header + name: enum_nonref_string_header + required: false + schema: + enum: + - success + - failure + - unclassified + type: string + style: form + - explode: true + in: header + name: enum_ref_string_header + required: false + schema: + $ref: '#/components/schemas/StringEnumRef' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test header parameter(s) + tags: + - header + x-accepts: text/plain + /query/enum_ref_string: + get: + description: Test query parameter(s) + operationId: test/enum_ref_string + parameters: + - explode: true + in: query + name: enum_nonref_string_query + required: false + schema: + enum: + - success + - failure + - unclassified + type: string + style: form + - explode: true + in: query + name: enum_ref_string_query + required: false + schema: + $ref: '#/components/schemas/StringEnumRef' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/datetime/date/string: + get: + description: Test query parameter(s) + operationId: test/query/datetime/date/string + parameters: + - explode: true + in: query + name: datetime_query + required: false + schema: + format: date-time + type: string + style: form + - explode: true + in: query + name: date_query + required: false + schema: + format: date + type: string + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/integer/boolean/string: + get: + description: Test query parameter(s) + operationId: test/query/integer/boolean/string + parameters: + - explode: true + in: query + name: integer_query + required: false + schema: + type: integer + style: form + - explode: true + in: query + name: boolean_query + required: false + schema: + type: boolean + style: form + - explode: true + in: query + name: string_query + required: false + schema: + type: string + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/array_string: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/array_string + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_form/explode_true/object/allOf: + get: + description: Test query parameter(s) + operationId: test/query/style_form/explode_true/object/allOf + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/DataQuery' + style: form + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_deepObject/explode_true/object: + get: + description: Test query parameter(s) + operationId: test/query/style_deepObject/explode_true/object + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/Pet' + style: deepObject + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /query/style_deepObject/explode_true/object/allOf: + get: + description: Test query parameter(s) + operationId: test/query/style_deepObject/explode_true/object/allOf + parameters: + - explode: true + in: query + name: query_object + required: false + schema: + $ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter' + style: deepObject + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test query parameter(s) + tags: + - query + x-accepts: text/plain + /body/application/octetstream/binary: + post: + description: Test body parameter(s) + operationId: test/body/application/octetstream/binary + requestBody: + content: + application/octet-stream: + schema: + format: binary + type: string + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/octet-stream + x-accepts: text/plain + /echo/body/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/Pet + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/json + x-accepts: application/json + /echo/body/allOf/Pet: + post: + description: Test body parameter(s) + operationId: test/echo/body/allOf/Pet + requestBody: + $ref: '#/components/requestBodies/AllOfPet' + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + description: Successful operation + summary: Test body parameter(s) + tags: + - body + x-content-type: application/json + x-accepts: application/json + /echo/body/Pet/response_string: + post: + description: Test empty response body + operationId: test/echo/body/Pet/response_string + requestBody: + $ref: '#/components/requestBodies/Pet' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test empty response body + tags: + - body + x-content-type: application/json + x-accepts: text/plain + /echo/body/Tag/response_string: + post: + description: Test empty json (request body) + operationId: test/echo/body/Tag/response_string + requestBody: + $ref: '#/components/requestBodies/Tag' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test empty json (request body) + tags: + - body + x-content-type: application/json + x-accepts: text/plain + /echo/body/FreeFormObject/response_string: + post: + description: Test free form object + operationId: test/echo/body/FreeFormObject/response_string + requestBody: + content: + application/json: + schema: + type: object + description: Free form object + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test free form object + tags: + - body + x-content-type: application/json + x-accepts: text/plain + /binary/gif: + post: + description: Test binary (gif) response body + operationId: test/binary/gif + responses: + "200": + content: + image/gif: + schema: + format: binary + type: string + description: Successful operation + summary: Test binary (gif) response body + tags: + - body + x-accepts: image/gif + /body/application/octetstream/single_binary: + post: + description: Test single binary in multipart mime + operationId: test/body/multipart/formdata/single_binary requestBody: content: multipart/form-data: schema: - $ref: '#/components/schemas/uploadFile_request' + $ref: '#/components/schemas/test_body_multipart_formdata_single_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test single binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain + /body/application/octetstream/array_of_binary: + post: + description: Test array of binary in multipart mime + operationId: test/body/multipart/formdata/array_of_binary + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/test_body_multipart_formdata_array_of_binary_request' + responses: + "200": + content: + text/plain: + schema: + type: string + description: Successful operation + summary: Test array of binary in multipart mime + tags: + - body + x-content-type: multipart/form-data + x-accepts: text/plain + /auth/http/basic: + post: + description: To test HTTP basic authentication + operationId: test/auth/http/basic responses: "200": content: @@ -283,1106 +567,69 @@ paths: type: string description: Successful operation security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image + - http_auth: [] + summary: To test HTTP basic authentication tags: - - pet - x-content-type: multipart/form-data + - auth x-accepts: text/plain - /store/inventory: - get: - description: Returns a map of status codes to quantities - operationId: getInventory + /auth/http/bearer: + post: + description: To test HTTP bearer authentication + operationId: test/auth/http/bearer responses: "200": content: - application/json: - schema: - additionalProperties: - format: int32 - type: integer - type: object - description: successful operation - security: - - api_key: [] - summary: Returns pet inventories by status - tags: - - store - x-webclient-blocking: false - x-accepts: application/json - /store/order: - post: - description: "" - operationId: placeOrder - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Order' - description: order placed for purchasing the pet - required: true - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - description: Invalid Order - summary: Place an order for a pet - tags: - - store - x-content-type: application/json - x-accepts: application/json - /store/order/{order_id}: - delete: - description: For valid response try integer IDs with value < 1000. Anything - above 1000 or nonintegers will generate API errors - operationId: deleteOrder - parameters: - - description: ID of the order that needs to be deleted - explode: false - in: path - name: order_id - required: true - schema: - type: string - style: simple - responses: - "400": - description: Invalid ID supplied - "404": - description: Order not found - summary: Delete purchase order by ID - tags: - - store - x-accepts: application/json - get: - description: For valid response try integer IDs with value <= 5 or > 10. Other - values will generate exceptions - operationId: getOrderById - parameters: - - description: ID of pet that needs to be fetched - explode: false - in: path - name: order_id - required: true - schema: - format: int64 - maximum: 5 - minimum: 1 - type: integer - style: simple - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/Order' - application/json: - schema: - $ref: '#/components/schemas/Order' - description: successful operation - "400": - description: Invalid ID supplied - "404": - description: Order not found - summary: Find purchase order by ID - tags: - - store - x-accepts: application/json - /user: - post: - description: This can only be done by the logged in user. - operationId: createUser - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Created user object - required: true - responses: - default: - description: successful operation - summary: Create user - tags: - - user - x-content-type: application/json - x-accepts: application/json - /user/createWithArray: - post: - description: "" - operationId: createUsersWithArrayInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-content-type: application/json - x-accepts: application/json - /user/createWithList: - post: - description: "" - operationId: createUsersWithListInput - requestBody: - $ref: '#/components/requestBodies/UserArray' - responses: - default: - description: successful operation - summary: Creates list of users with given input array - tags: - - user - x-content-type: application/json - x-accepts: application/json - /user/login: - get: - description: "" - operationId: loginUser - parameters: - - description: The user name for login - explode: true - in: query - name: username - required: true - schema: - type: string - style: form - - description: The password for login in clear text - explode: true - in: query - name: password - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/xml: + text/plain: schema: type: string - application/json: - schema: - type: string - description: successful operation - headers: - X-Rate-Limit: - description: calls per hour allowed by the user - explode: false - schema: - format: int32 - type: integer - style: simple - X-Expires-After: - description: date in UTC when token expires - explode: false - schema: - format: date-time - type: string - style: simple - "400": - description: Invalid username/password supplied - summary: Logs user into the system - tags: - - user - x-accepts: application/json - /user/logout: - get: - description: "" - operationId: logoutUser - responses: - default: - description: successful operation - summary: Logs out current logged in user session - tags: - - user - x-accepts: application/json - /user/{username}: - delete: - description: This can only be done by the logged in user. - operationId: deleteUser - parameters: - - description: The name that needs to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - "400": - description: Invalid username supplied - "404": - description: User not found - summary: Delete user - tags: - - user - x-accepts: application/json - get: - description: "" - operationId: getUserByName - parameters: - - description: The name that needs to be fetched. Use user1 for testing. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/xml: - schema: - $ref: '#/components/schemas/User' - application/json: - schema: - $ref: '#/components/schemas/User' - description: successful operation - "400": - description: Invalid username supplied - "404": - description: User not found - summary: Get user by user name - tags: - - user - x-accepts: application/json - put: - description: This can only be done by the logged in user. - operationId: updateUser - parameters: - - description: name that need to be deleted - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: Updated user object - required: true - responses: - "400": - description: Invalid user supplied - "404": - description: User not found - summary: Updated user - tags: - - user - x-content-type: application/json - x-accepts: application/json - /fake_classname_test: - patch: - description: To test class name in snake case - operationId: testClassname - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation + description: Successful operation security: - - api_key_query: [] - summary: To test class name in snake case + - http_bearer_auth: [] + summary: To test HTTP bearer authentication tags: - - fake_classname_tags 123#$%^ - x-content-type: application/json - x-accepts: application/json - /fake: - delete: - description: Fake endpoint to test group parameters (optional) - operationId: testGroupParameters - parameters: - - description: Required String in group parameters - explode: true - in: query - name: required_string_group - required: true - schema: - type: integer - style: form - - description: Required Boolean in group parameters - explode: false - in: header - name: required_boolean_group - required: true - schema: - type: boolean - style: simple - - description: Required Integer in group parameters - explode: true - in: query - name: required_int64_group - required: true - schema: - format: int64 - type: integer - style: form - - description: String in group parameters - explode: true - in: query - name: string_group - required: false - schema: - type: integer - style: form - - description: Boolean in group parameters - explode: false - in: header - name: boolean_group - required: false - schema: - type: boolean - style: simple - - description: Integer in group parameters - explode: true - in: query - name: int64_group - required: false - schema: - format: int64 - type: integer - style: form - responses: - "400": - description: Something wrong - security: - - bearer_test: [] - summary: Fake endpoint to test group parameters (optional) - tags: - - fake - x-group-parameters: true - x-accepts: application/json - get: - description: To test enum parameters - operationId: testEnumParameters - parameters: - - description: Header parameter enum test (string array) - explode: false - in: header - name: enum_header_string_array - required: false - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: simple - - description: Header parameter enum test (string) - explode: false - in: header - name: enum_header_string - required: false - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - style: simple - - description: Query parameter enum test (string array) - explode: true - in: query - name: enum_query_string_array - required: false - schema: - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - style: form - - description: Query parameter enum test (string) - explode: true - in: query - name: enum_query_string - required: false - schema: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - style: form - - description: Query parameter enum test (double) - explode: true - in: query - name: enum_query_integer - required: false - schema: - enum: - - 1 - - -2 - format: int32 - type: integer - style: form - - description: Query parameter enum test (double) - explode: true - in: query - name: enum_query_double - required: false - schema: - enum: - - 1.1 - - -1.2 - format: double - type: number - style: form - - explode: true - in: query - name: enum_query_model_array - required: false - schema: - items: - $ref: '#/components/schemas/EnumClass' - type: array - style: form - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/testEnumParameters_request' - responses: - "400": - description: Invalid request - "404": - description: Not found - summary: To test enum parameters - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - patch: - description: To test "client" model - operationId: testClientModel - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test "client" model - tags: - - fake - x-content-type: application/json - x-accepts: application/json - post: - description: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - operationId: testEndpointParameters - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/testEndpointParameters_request' - responses: - "400": - description: Invalid username supplied - "404": - description: User not found - security: - - http_basic_test: [] - summary: | - Fake endpoint for testing various parameters - 假端點 - 偽のエンドポイント - 가짜 엔드 포인트 - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /fake/outer/number: - post: - description: Test serialization of outer number types - operationId: fakeOuterNumberSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterNumber' - description: Input number as post body - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterNumber' - description: Output number - tags: - - fake - x-content-type: application/json - x-accepts: '*/*' - /fake/property/enum-int: - post: - description: Test serialization of enum (int) properties with examples - operationId: fakePropertyEnumIntegerSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterObjectWithEnumProperty' - description: Input enum (int) as post body - required: true - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterObjectWithEnumProperty' - description: Output enum (int) - tags: - - fake - x-content-type: application/json - x-accepts: '*/*' - /fake/outer/string: - post: - description: Test serialization of outer string types - operationId: fakeOuterStringSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterString' - description: Input string as post body - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterString' - description: Output string - tags: - - fake - x-content-type: application/json - x-accepts: '*/*' - /fake/outer/boolean: - post: - description: Test serialization of outer boolean types - operationId: fakeOuterBooleanSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Input boolean as post body - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterBoolean' - description: Output boolean - tags: - - fake - x-content-type: application/json - x-accepts: '*/*' - /fake/outer/composite: - post: - description: Test serialization of object with outer number type - operationId: fakeOuterCompositeSerialize - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OuterComposite' - description: Input composite as post body - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/OuterComposite' - description: Output composite - tags: - - fake - x-content-type: application/json - x-accepts: '*/*' - /fake/BigDecimalMap: - get: - description: "for Java apache and Java native, test toUrlQueryString for maps\ - \ with BegDecimal keys" - operationId: fakeBigDecimalMap - responses: - "200": - content: - '*/*': - schema: - $ref: '#/components/schemas/fakeBigDecimalMap_200_response' - description: successful operation - tags: - - fake - x-accepts: '*/*' - /fake/jsonFormData: - get: - description: "" - operationId: testJsonFormData - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/testJsonFormData_request' - responses: - "200": - description: successful operation - summary: test json serialization of form data - tags: - - fake - x-content-type: application/x-www-form-urlencoded - x-accepts: application/json - /fake/inline-additionalProperties: - post: - description: "" - operationId: testInlineAdditionalProperties - requestBody: - content: - application/json: - schema: - additionalProperties: - type: string - type: object - description: request body - required: true - responses: - "200": - description: successful operation - summary: test inline additionalProperties - tags: - - fake - x-content-type: application/json - x-accepts: application/json - /fake/inline-freeform-additionalProperties: - post: - description: "" - operationId: testInlineFreeformAdditionalProperties - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/testInlineFreeformAdditionalProperties_request' - description: request body - required: true - responses: - "200": - description: successful operation - summary: test inline free-form additionalProperties - tags: - - fake - x-content-type: application/json - x-accepts: application/json - /fake/nullable: - post: - description: "" - operationId: testNullable - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ChildWithNullable' - description: request body - required: true - responses: - "200": - description: successful operation - summary: test nullable parent property - tags: - - fake - x-content-type: application/json - x-accepts: application/json - /fake/body-with-query-params: - put: - operationId: testBodyWithQueryParams - parameters: - - explode: true - in: query - name: query - required: true - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - required: true - responses: - "200": - description: Success - tags: - - fake - x-content-type: application/json - x-accepts: application/json - /another-fake/dummy: - patch: - description: To test special tags and operation ID starting with number - operationId: 123_test_@#$%_special_tags - requestBody: - $ref: '#/components/requestBodies/Client' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: successful operation - summary: To test special tags - tags: - - $another-fake? - x-content-type: application/json - x-accepts: application/json - /fake/body-with-file-schema: - put: - description: "For this test, the body for this request must reference a schema\ - \ named `File`." - operationId: testBodyWithFileSchema - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/FileSchemaTestClass' - required: true - responses: - "200": - description: Success - tags: - - fake - x-content-type: application/json - x-accepts: application/json - /fake/body-with-binary: - put: - description: "For this test, the body has to be a binary file." - operationId: testBodyWithBinary - requestBody: - content: - image/png: - schema: - format: binary - nullable: true - type: string - description: image to upload - required: true - responses: - "200": - description: Success - tags: - - fake - x-content-type: image/png - x-accepts: application/json - /fake/test-query-parameters: - put: - description: To test the collection format in query parameters - operationId: testQueryParameterCollectionFormat - parameters: - - explode: false - in: query - name: pipe - required: true - schema: - items: - type: string - type: array - style: pipeDelimited - - explode: false - in: query - name: ioutil - required: true - schema: - items: - type: string - type: array - style: form - - explode: false - in: query - name: http - required: true - schema: - items: - type: string - type: array - style: spaceDelimited - - explode: false - in: query - name: url - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: context - required: true - schema: - items: - type: string - type: array - style: form - - explode: true - in: query - name: language - required: false - schema: - additionalProperties: - format: string - type: string - type: object - style: form - - allowEmptyValue: true - explode: true - in: query - name: allowEmpty - required: true - schema: - type: string - style: form - responses: - "200": - description: Success - tags: - - fake - x-accepts: application/json - /fake/{petId}/uploadImageWithRequiredFile: - post: - description: "" - operationId: uploadFileWithRequiredFile - parameters: - - description: ID of pet to update - explode: false - in: path - name: petId - required: true - schema: - format: int64 - type: integer - style: simple - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/uploadFileWithRequiredFile_request' - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ApiResponse' - description: successful operation - security: - - petstore_auth: - - write:pets - - read:pets - summary: uploads an image (required) - tags: - - pet - x-content-type: multipart/form-data - x-accepts: application/json - /fake/health: - get: - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/HealthCheckResult' - description: The instance started successfully - summary: Health check endpoint - tags: - - fake - x-accepts: application/json - /fake/http-signature-test: - get: - operationId: fake-http-signature-test - parameters: - - description: query parameter - explode: true - in: query - name: query_1 - required: false - schema: - type: string - style: form - - description: header parameter - explode: false - in: header - name: header_1 - required: false - schema: - type: string - style: simple - requestBody: - $ref: '#/components/requestBodies/Pet' - responses: - "200": - description: The instance started successfully - security: - - http_signature_test: [] - summary: test http signature authentication - tags: - - fake - x-content-type: application/json - x-accepts: application/json + - auth + x-accepts: text/plain components: requestBodies: - UserArray: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/User' - type: array - description: List of user object - required: true - Client: - content: - application/json: - schema: - $ref: '#/components/schemas/Client' - description: client model - required: true Pet: content: application/json: schema: $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' description: Pet object that needs to be added to the store - required: true + AllOfPet: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/Pet' + description: Pet object that needs to be added to the store + Tag: + content: + application/json: + schema: + $ref: '#/components/schemas/Tag' + description: Tag object schemas: - Foo: - example: - bar: bar - properties: - bar: - default: bar - type: string - type: object - Bar: - default: bar - type: string - Order: - example: - petId: 6 - quantity: 1 - id: 0 - shipDate: 2000-01-23T04:56:07.000+00:00 - complete: false - status: placed - properties: - id: - format: int64 - type: integer - petId: - format: int64 - type: integer - quantity: - format: int32 - type: integer - shipDate: - format: date-time - type: string - status: - description: Order Status - enum: - - placed - - approved - - delivered - type: string - complete: - default: false - type: boolean - type: object - xml: - name: Order Category: example: - name: default-name - id: 6 - properties: - id: - format: int64 - type: integer - name: - default: default-name - type: string - required: - - name - type: object - xml: - name: Category - User: - example: - firstName: firstName - lastName: lastName - password: password - userStatus: 6 - phone: phone - id: 0 - email: email - username: username - properties: - id: - format: int64 - type: integer - x-is-unique: true - username: - type: string - firstName: - type: string - lastName: - type: string - email: - type: string - password: - type: string - phone: - type: string - userStatus: - description: User Status - format: int32 - type: integer - type: object - xml: - name: User - Tag: - example: - name: name + name: Dogs id: 1 + properties: + id: + example: 1 + format: int64 + type: integer + name: + example: Dogs + type: string + type: object + xml: + name: category + Tag: + example: + name: name + id: 0 properties: id: format: int64 @@ -1391,47 +638,46 @@ components: type: string type: object xml: - name: Tag + name: tag Pet: example: photoUrls: - photoUrls - photoUrls name: doggie - id: 0 + id: 10 category: - name: default-name - id: 6 + name: Dogs + id: 1 tags: - name: name - id: 1 + id: 0 - name: name - id: 1 + id: 0 status: available properties: id: + example: 10 format: int64 type: integer - x-is-unique: true - category: - $ref: '#/components/schemas/Category' name: example: doggie type: string + category: + $ref: '#/components/schemas/Category' photoUrls: items: type: string + xml: + name: photoUrl type: array - uniqueItems: true xml: - name: photoUrl wrapped: true tags: items: $ref: '#/components/schemas/Tag' type: array xml: - name: tag wrapped: true status: description: pet status in the store @@ -1445,766 +691,182 @@ components: - photoUrls type: object xml: - name: Pet - ApiResponse: - example: - code: 0 - type: type - message: message + name: pet + StringEnumRef: + enum: + - success + - failure + - unclassified + type: string + DefaultValue: + description: to test the default value of properties properties: - code: - format: int32 - type: integer - type: - type: string - message: + array_string_enum_ref_default: + default: + - success + - failure + items: + $ref: '#/components/schemas/StringEnumRef' + type: array + array_string_enum_default: + default: + - success + - failure + items: + enum: + - success + - failure + - unclassified + type: string + type: array + array_string_default: + default: + - failure + - skipped + items: + type: string + type: array + array_integer_default: + default: + - 1 + - 3 + items: + type: integer + type: array + array_string: + items: + type: string + type: array + array_string_nullable: + items: + type: string + nullable: true + type: array + array_string_extension_nullable: + items: + type: string + type: array + x-nullable: true + string_nullable: + nullable: true type: string type: object - Return: - description: Model for testing reserved words + Bird: properties: - return: - format: int32 - type: integer - xml: - name: Return - Name: - description: Model for testing model name same as property name - properties: - name: - format: int32 - type: integer - snake_case: - format: int32 - readOnly: true - type: integer - property: - type: string - "123Number": - readOnly: true - type: integer - required: - - name - xml: - name: Name - "200_response": - description: Model for testing model name starting with number - properties: - name: - format: int32 - type: integer - class: - type: string - xml: - name: Name - ClassModel: - description: Model for testing model with "_class" property - properties: - _class: - type: string - Dog: - allOf: - - $ref: '#/components/schemas/Animal' - - properties: - breed: - type: string - type: object - Cat: - allOf: - - $ref: '#/components/schemas/Animal' - - properties: - declawed: - type: boolean - type: object - Animal: - discriminator: - mapping: - DOG: '#/components/schemas/Dog' - CAT: '#/components/schemas/Cat' - propertyName: className - properties: - className: + size: type: string color: - default: red - type: string - required: - - className - type: object - AnimalFarm: - items: - $ref: '#/components/schemas/Animal' - type: array - format_test: - properties: - integer: - maximum: 100 - minimum: 10 - type: integer - int32: - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - format: int64 - type: integer - number: - maximum: 543.2 - minimum: 32.1 - type: number - float: - format: float - maximum: 987.6 - minimum: 54.3 - type: number - double: - format: double - maximum: 123.4 - minimum: 67.8 - type: number - decimal: - format: number - type: string - string: - pattern: "/[a-z]/i" - type: string - byte: - format: byte - type: string - binary: - format: binary - type: string - date: - format: date - type: string - dateTime: - format: date-time - type: string - uuid: - example: 72f98069-206d-4f12-9f12-3d1e525a8e84 - format: uuid - type: string - password: - format: password - maxLength: 64 - minLength: 10 - type: string - pattern_with_digits: - description: A string that is a 10 digit number. Can have leading zeros. - pattern: "^\\d{10}$" - type: string - pattern_with_digits_and_delimiter: - description: A string starting with 'image_' (case insensitive) and one - to three digits following i.e. Image_01. - pattern: "/^image_\\d{1,3}$/i" - type: string - required: - - byte - - date - - number - - password - type: object - EnumClass: - default: -efg - enum: - - _abc - - -efg - - (xyz) - type: string - Enum_Test: - properties: - enum_string: - enum: - - UPPER - - lower - - "" - type: string - enum_string_required: - enum: - - UPPER - - lower - - "" - type: string - enum_integer: - enum: - - 1 - - -1 - format: int32 - type: integer - enum_number: - enum: - - 1.1 - - -1.2 - format: double - type: number - outerEnum: - $ref: '#/components/schemas/OuterEnum' - outerEnumInteger: - $ref: '#/components/schemas/OuterEnumInteger' - outerEnumDefaultValue: - $ref: '#/components/schemas/OuterEnumDefaultValue' - outerEnumIntegerDefaultValue: - $ref: '#/components/schemas/OuterEnumIntegerDefaultValue' - required: - - enum_string_required - type: object - AdditionalPropertiesClass: - properties: - map_property: - additionalProperties: - type: string - type: object - map_of_map_property: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - type: object - MixedPropertiesAndAdditionalPropertiesClass: - properties: - uuid: - format: uuid - type: string - dateTime: - format: date-time - type: string - map: - additionalProperties: - $ref: '#/components/schemas/Animal' - type: object - type: object - List: - properties: - "123-list": type: string type: object - Client: - example: - client: client + Query: properties: - client: - type: string - type: object - ReadOnlyFirst: - properties: - bar: - readOnly: true - type: string - baz: - type: string - type: object - hasOnlyReadOnly: - properties: - bar: - readOnly: true - type: string - foo: - readOnly: true - type: string - type: object - Capitalization: - properties: - smallCamel: - type: string - CapitalCamel: - type: string - small_Snake: - type: string - Capital_Snake: - type: string - SCA_ETH_Flow_Points: - type: string - ATT_NAME: - description: | - Name of the pet - type: string - type: object - MapTest: - properties: - map_map_of_string: - additionalProperties: - additionalProperties: - type: string - type: object - type: object - map_of_enum_string: - additionalProperties: - enum: - - UPPER - - lower - type: string - type: object - direct_map: - additionalProperties: - type: boolean - type: object - indirect_map: - additionalProperties: - type: boolean - type: object - type: object - ArrayTest: - properties: - array_of_string: - items: - type: string - maxItems: 3 - minItems: 0 - type: array - array_array_of_integer: - items: - items: - format: int64 - type: integer - type: array - type: array - array_array_of_model: - items: - items: - $ref: '#/components/schemas/ReadOnlyFirst' - type: array - type: array - type: object - NumberOnly: - properties: - JustNumber: - type: number - type: object - ArrayOfNumberOnly: - properties: - ArrayNumber: - items: - type: number - type: array - type: object - ArrayOfArrayOfNumberOnly: - properties: - ArrayArrayNumber: - items: - items: - type: number - type: array - type: array - type: object - EnumArrays: - properties: - just_symbol: - enum: - - '>=' - - $ - type: string - array_enum: - items: - enum: - - fish - - crab - type: string - type: array - type: object - OuterEnum: - enum: - - placed - - approved - - delivered - nullable: true - type: string - OuterEnumInteger: - enum: - - 0 - - 1 - - 2 - example: 2 - type: integer - OuterEnumDefaultValue: - default: placed - enum: - - placed - - approved - - delivered - type: string - OuterEnumIntegerDefaultValue: - default: 0 - enum: - - 0 - - 1 - - 2 - type: integer - OuterComposite: - example: - my_string: my_string - my_number: 0.8008281904610115 - my_boolean: true - properties: - my_number: - type: number - my_string: - type: string - my_boolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - type: object - OuterNumber: - type: number - OuterString: - type: string - OuterBoolean: - type: boolean - x-codegen-body-parameter-name: boolean_post_body - ParentWithNullable: - discriminator: - propertyName: type - properties: - type: - enum: - - ChildWithNullable - type: string - nullableProperty: - nullable: true - type: string - type: object - ChildWithNullable: - allOf: - - $ref: '#/components/schemas/ParentWithNullable' - - properties: - otherProperty: - type: string - type: object - StringBooleanMap: - additionalProperties: - type: boolean - type: object - FileSchemaTestClass: - example: - file: - sourceURI: sourceURI - files: - - sourceURI: sourceURI - - sourceURI: sourceURI - properties: - file: - $ref: '#/components/schemas/File' - files: - items: - $ref: '#/components/schemas/File' - type: array - type: object - File: - description: Must be named `File` for test. - example: - sourceURI: sourceURI - properties: - sourceURI: - description: Test capitalization - type: string - type: object - _special_model.name_: - properties: - $special[property.name]: - format: int64 - type: integer - xml: - name: "$special[model.name]" - HealthCheckResult: - description: Just a string to inform instance is up and running. Make it nullable - in hope to get it as pointer in generated model. - example: - NullableMessage: NullableMessage - properties: - NullableMessage: - nullable: true - type: string - type: object - NullableClass: - additionalProperties: - nullable: true - type: object - properties: - integer_prop: - nullable: true - type: integer - number_prop: - nullable: true - type: number - boolean_prop: - nullable: true - type: boolean - string_prop: - nullable: true - type: string - date_prop: - format: date - nullable: true - type: string - datetime_prop: - format: date-time - nullable: true - type: string - array_nullable_prop: - items: - type: object - nullable: true - type: array - array_and_items_nullable_prop: - items: - nullable: true - type: object - nullable: true - type: array - array_items_nullable: - items: - nullable: true - type: object - type: array - object_nullable_prop: - additionalProperties: - type: object - nullable: true - type: object - object_and_items_nullable_prop: - additionalProperties: - nullable: true - type: object - nullable: true - type: object - object_items_nullable: - additionalProperties: - nullable: true - type: object - type: object - type: object - OuterObjectWithEnumProperty: - example: - value: 2 - properties: - value: - $ref: '#/components/schemas/OuterEnumInteger' - required: - - value - type: object - DeprecatedObject: - deprecated: true - properties: - name: - type: string - type: object - ObjectWithDeprecatedFields: - properties: - uuid: - type: string id: - deprecated: true - type: number - deprecatedRef: - $ref: '#/components/schemas/DeprecatedObject' - bars: - deprecated: true - items: - $ref: '#/components/schemas/Bar' - type: array - type: object - AllOfWithSingleRef: - properties: - username: - type: string - SingleRefType: - allOf: - - $ref: '#/components/schemas/SingleRefType' - type: object - SingleRefType: - enum: - - admin - - user - title: SingleRefType - type: string - _foo_get_default_response: - example: - string: - bar: bar - properties: - string: - $ref: '#/components/schemas/Foo' - type: object - updatePetWithForm_request: - properties: - name: - description: Updated name of the pet - type: string - status: - description: Updated status of the pet - type: string - type: object - uploadFile_request: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - file: - description: file to upload - format: binary - type: string - type: object - testEnumParameters_request: - properties: - enum_form_string_array: - description: Form parameter enum test (string array) - items: - default: $ - enum: - - '>' - - $ - type: string - type: array - enum_form_string: - default: -efg - description: Form parameter enum test (string) - enum: - - _abc - - -efg - - (xyz) - type: string - type: object - testEndpointParameters_request: - properties: - integer: - description: None - maximum: 100 - minimum: 10 - type: integer - int32: - description: None - format: int32 - maximum: 200 - minimum: 20 - type: integer - int64: - description: None + description: Query format: int64 type: integer + outcomes: + default: + - SUCCESS + - FAILURE + items: + enum: + - SUCCESS + - FAILURE + - SKIPPED + type: string + type: array + type: object + x-parent: true + DataQuery: + allOf: + - properties: + suffix: + description: test suffix + type: string + text: + description: Some text containing white spaces + example: Some text + type: string + date: + description: A date + format: date-time + type: string + type: object + - $ref: '#/components/schemas/Query' + NumberPropertiesOnly: + properties: number: - description: None - maximum: 543.2 - minimum: 32.1 type: number float: - description: None format: float - maximum: 987.6 type: number double: - description: None format: double - maximum: 123.4 - minimum: 67.8 + maximum: 50.2 + minimum: 0.8 type: number - string: - description: None - pattern: "/[a-z]/i" + type: object + test_form_integer_boolean_string_request: + properties: + integer_form: + type: integer + boolean_form: + type: boolean + string_form: type: string - pattern_without_delimiter: - description: None - pattern: "^[A-Z].*" + type: object + test_form_oneof_request_oneOf: + properties: + form1: type: string - byte: - description: None - format: byte + form2: + type: integer + type: object + test_form_oneof_request_oneOf_1: + properties: + form3: type: string - binary: - description: None + form4: + type: boolean + type: object + test_form_oneof_request: + oneOf: + - $ref: '#/components/schemas/test_form_oneof_request_oneOf' + - $ref: '#/components/schemas/test_form_oneof_request_oneOf_1' + - $ref: '#/components/schemas/Tag' + type: object + test_query_style_form_explode_true_array_string_query_object_parameter: + properties: + values: + items: + type: string + type: array + type: object + test_query_style_deepObject_explode_true_object_allOf_query_object_parameter: + allOf: + - $ref: '#/components/schemas/Bird' + - $ref: '#/components/schemas/Category' + test_body_multipart_formdata_single_binary_request: + properties: + my-file: format: binary type: string - date: - description: None - format: date - type: string - dateTime: - description: None - format: date-time - type: string - password: - description: None - format: password - maxLength: 64 - minLength: 10 - type: string - callback: - description: None - type: string + type: object + test_body_multipart_formdata_array_of_binary_request: + properties: + files: + items: + format: binary + type: string + type: array required: - - byte - - double - - number - - pattern_without_delimiter - type: object - fakeBigDecimalMap_200_response: - example: - someId: 0.8008281904610115 - someMap: - key: 6.027456183070403 - properties: - someId: - type: number - someMap: - additionalProperties: - type: number - type: object - type: object - testJsonFormData_request: - properties: - param: - description: field1 - type: string - param2: - description: field2 - type: string - required: - - param - - param2 - type: object - testInlineFreeformAdditionalProperties_request: - additionalProperties: true - properties: - someProperty: - type: string - type: object - uploadFileWithRequiredFile_request: - properties: - additionalMetadata: - description: Additional data to pass to server - type: string - requiredFile: - description: file to upload - format: binary - type: string - required: - - requiredFile + - files type: object securitySchemes: - petstore_auth: - flows: - implicit: - authorizationUrl: http://petstore.swagger.io/api/oauth/dialog - scopes: - write:pets: modify pets in your account - read:pets: read your pets - type: oauth2 - api_key: - in: header - name: api_key - type: apiKey - api_key_query: - in: query - name: api_key_query - type: apiKey - http_basic_test: + http_auth: scheme: basic type: http - bearer_test: - bearerFormat: JWT + http_bearer_auth: scheme: bearer type: http - http_signature_test: - scheme: signature - type: http diff --git a/samples/client/petstore/java/resteasy-echo/build.gradle b/samples/client/petstore/java/resteasy-echo/build.gradle index 464088b0b6d..62d43afabd0 100644 --- a/samples/client/petstore/java/resteasy-echo/build.gradle +++ b/samples/client/petstore/java/resteasy-echo/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'idea' apply plugin: 'eclipse' group = 'org.openapitools' -version = '1.0.0' +version = '0.1.0' buildscript { repositories { diff --git a/samples/client/petstore/java/resteasy-echo/build.sbt b/samples/client/petstore/java/resteasy-echo/build.sbt index a018921d92e..0c31d90292c 100644 --- a/samples/client/petstore/java/resteasy-echo/build.sbt +++ b/samples/client/petstore/java/resteasy-echo/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "org.openapitools", name := "petstore-resteasy-echo", - version := "1.0.0", + version := "0.1.0", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/samples/client/petstore/java/resteasy-echo/docs/AdditionalPropertiesClass.md b/samples/client/petstore/java/resteasy-echo/docs/AdditionalPropertiesClass.md deleted file mode 100644 index fe69a56eebf..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AdditionalPropertiesClass - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**mapProperty** | **Map<String, String>** | | [optional] | -|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/AllOfWithSingleRef.md b/samples/client/petstore/java/resteasy-echo/docs/AllOfWithSingleRef.md deleted file mode 100644 index 4146d56a372..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/AllOfWithSingleRef.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# AllOfWithSingleRef - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**username** | **String** | | [optional] | -|**singleRefType** | **SingleRefType** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/AnotherFakeApi.md b/samples/client/petstore/java/resteasy-echo/docs/AnotherFakeApi.md deleted file mode 100644 index c07f9fce1be..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/AnotherFakeApi.md +++ /dev/null @@ -1,75 +0,0 @@ -# AnotherFakeApi - -All URIs are relative to *http://localhost:3000* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags | - - - -## call123testSpecialTags - -> Client call123testSpecialTags(client) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AnotherFakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); - Client client = new Client(); // Client | client model - try { - Client result = apiInstance.call123testSpecialTags(client); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **client** | [**Client**](Client.md)| client model | | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/java/resteasy-echo/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index 0188db3eb13..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ArrayOfArrayOfNumberOnly - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**arrayArrayNumber** | **List<List<BigDecimal>>** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ArrayTest.md b/samples/client/petstore/java/resteasy-echo/docs/ArrayTest.md deleted file mode 100644 index 36077c9df30..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ArrayTest.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ArrayTest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**arrayOfString** | **List<String>** | | [optional] | -|**arrayArrayOfInteger** | **List<List<Long>>** | | [optional] | -|**arrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/AuthApi.md b/samples/client/petstore/java/resteasy-echo/docs/AuthApi.md new file mode 100644 index 00000000000..de3353d43a2 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/AuthApi.md @@ -0,0 +1,145 @@ +# AuthApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testAuthHttpBasic**](AuthApi.md#testAuthHttpBasic) | **POST** /auth/http/basic | To test HTTP basic authentication | +| [**testAuthHttpBearer**](AuthApi.md#testAuthHttpBearer) | **POST** /auth/http/bearer | To test HTTP bearer authentication | + + + +## testAuthHttpBasic + +> String testAuthHttpBasic() + +To test HTTP basic authentication + +To test HTTP basic authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP basic authorization: http_auth + HttpBasicAuth http_auth = (HttpBasicAuth) defaultClient.getAuthentication("http_auth"); + http_auth.setUsername("YOUR USERNAME"); + http_auth.setPassword("YOUR PASSWORD"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBasic(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBasic"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_auth](../README.md#http_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testAuthHttpBearer + +> String testAuthHttpBearer() + +To test HTTP bearer authentication + +To test HTTP bearer authentication + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.auth.*; +import org.openapitools.client.models.*; +import org.openapitools.client.api.AuthApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + // Configure HTTP bearer authorization: http_bearer_auth + HttpBearerAuth http_bearer_auth = (HttpBearerAuth) defaultClient.getAuthentication("http_bearer_auth"); + http_bearer_auth.setBearerToken("BEARER TOKEN"); + + AuthApi apiInstance = new AuthApi(defaultClient); + try { + String result = apiInstance.testAuthHttpBearer(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AuthApi#testAuthHttpBearer"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**String** + +### Authorization + +[http_bearer_auth](../README.md#http_bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/petstore/java/resteasy-echo/docs/Animal.md b/samples/client/petstore/java/resteasy-echo/docs/Bird.md similarity index 77% rename from samples/client/petstore/java/resteasy-echo/docs/Animal.md rename to samples/client/petstore/java/resteasy-echo/docs/Bird.md index d9b32f14c88..2a6f8a660d6 100644 --- a/samples/client/petstore/java/resteasy-echo/docs/Animal.md +++ b/samples/client/petstore/java/resteasy-echo/docs/Bird.md @@ -1,13 +1,13 @@ -# Animal +# Bird ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**className** | **String** | | | +|**size** | **String** | | [optional] | |**color** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy-echo/docs/PetApi.md b/samples/client/petstore/java/resteasy-echo/docs/BodyApi.md similarity index 50% rename from samples/client/petstore/java/resteasy-echo/docs/PetApi.md rename to samples/client/petstore/java/resteasy-echo/docs/BodyApi.md index 471e3947816..3cf2014e31f 100644 --- a/samples/client/petstore/java/resteasy-echo/docs/PetApi.md +++ b/samples/client/petstore/java/resteasy-echo/docs/BodyApi.md @@ -1,28 +1,28 @@ -# PetApi +# BodyApi All URIs are relative to *http://localhost:3000* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store | -| [**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet | -| [**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status | -| [**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags | -| [**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID | -| [**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet | -| [**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data | -| [**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image | -| [**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) | +| [**testBinaryGif**](BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body | +| [**testBodyApplicationOctetstreamBinary**](BodyApi.md#testBodyApplicationOctetstreamBinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) | +| [**testBodyMultipartFormdataArrayOfBinary**](BodyApi.md#testBodyMultipartFormdataArrayOfBinary) | **POST** /body/application/octetstream/array_of_binary | Test array of binary in multipart mime | +| [**testBodyMultipartFormdataSingleBinary**](BodyApi.md#testBodyMultipartFormdataSingleBinary) | **POST** /body/application/octetstream/single_binary | Test single binary in multipart mime | +| [**testEchoBodyAllOfPet**](BodyApi.md#testEchoBodyAllOfPet) | **POST** /echo/body/allOf/Pet | Test body parameter(s) | +| [**testEchoBodyFreeFormObjectResponseString**](BodyApi.md#testEchoBodyFreeFormObjectResponseString) | **POST** /echo/body/FreeFormObject/response_string | Test free form object | +| [**testEchoBodyPet**](BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s) | +| [**testEchoBodyPetResponseString**](BodyApi.md#testEchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body | +| [**testEchoBodyTagResponseString**](BodyApi.md#testEchoBodyTagResponseString) | **POST** /echo/body/Tag/response_string | Test empty json (request body) | -## addPet +## testBinaryGif -> addPet(pet) - -Add a new pet to the store +> File testBinaryGif() +Test binary (gif) response body +Test binary (gif) response body ### Example @@ -31,25 +31,20 @@ Add a new pet to the store import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; +import org.openapitools.client.api.BodyApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - PetApi apiInstance = new PetApi(defaultClient); - Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + BodyApi apiInstance = new BodyApi(defaultClient); try { - apiInstance.addPet(pet); + File result = apiInstance.testBinaryGif(); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PetApi#addPet"); + System.err.println("Exception when calling BodyApi#testBinaryGif"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -61,39 +56,35 @@ public class Example { ### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | +This endpoint does not need any parameter. ### Return type -null (empty response body) +[**File**](File.md) ### Authorization -[petstore_auth](../README.md#petstore_auth) +No authorization required ### HTTP request headers -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: image/gif ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Successful operation | - | -| **405** | Invalid input | - | -## deletePet +## testBodyApplicationOctetstreamBinary -> deletePet(petId, apiKey) - -Deletes a pet +> String testBodyApplicationOctetstreamBinary(body) +Test body parameter(s) +Test body parameter(s) ### Example @@ -102,99 +93,21 @@ Deletes a pet import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; +import org.openapitools.client.api.BodyApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | Pet id to delete - String apiKey = "apiKey_example"; // String | + BodyApi apiInstance = new BodyApi(defaultClient); + File body = new File("/path/to/file"); // File | try { - apiInstance.deletePet(petId, apiKey); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#deletePet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| Pet id to delete | | -| **apiKey** | **String**| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **400** | Invalid pet value | - | - - -## findPetsByStatus - -> List<Pet> findPetsByStatus(status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - List status = Arrays.asList("available"); // List | Status values that need to be considered for filter - try { - List result = apiInstance.findPetsByStatus(status); + String result = apiInstance.testBodyApplicationOctetstreamBinary(body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByStatus"); + System.err.println("Exception when calling BodyApi#testBodyApplicationOctetstreamBinary"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -209,378 +122,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold] | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - - -## findPetsByTags - -> Set<Pet> findPetsByTags(tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Set tags = Arrays.asList(); // Set | Tags to filter by - try { - Set result = apiInstance.findPetsByTags(tags); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#findPetsByTags"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **tags** | [**Set<String>**](String.md)| Tags to filter by | | - -### Return type - -[**Set<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - - -## getPetById - -> Pet getPetById(petId) - -Find pet by ID - -Returns a single pet - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | ID of pet to return - try { - Pet result = apiInstance.getPetById(petId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#getPetById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| ID of pet to return | | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - - -## updatePet - -> updatePet(pet) - -Update an existing pet - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store - try { - apiInstance.updatePet(pet); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | - -### Return type - -null (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - - -## updatePetWithForm - -> updatePetWithForm(petId, name, status) - -Updates a pet in the store with form data - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | ID of pet that needs to be updated - String name = "name_example"; // String | Updated name of the pet - String status = "status_example"; // String | Updated status of the pet - try { - apiInstance.updatePetWithForm(petId, name, status); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#updatePetWithForm"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| ID of pet that needs to be updated | | -| **name** | **String**| Updated name of the pet | [optional] | -| **status** | **String**| Updated status of the pet | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **405** | Invalid input | - | - - -## uploadFile - -> String uploadFile(petId, additionalMetadata, _file) - -uploads an image - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | ID of pet to update - String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server - File _file = new File("/path/to/file"); // File | file to upload - try { - String result = apiInstance.uploadFile(petId, additionalMetadata, _file); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFile"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| ID of pet to update | | -| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | -| **_file** | **File**| file to upload | [optional] | +| **body** | **File**| | [optional] | ### Return type @@ -588,7 +130,73 @@ public class Example { ### Authorization -[petstore_auth](../README.md#petstore_auth) +No authorization required + +### HTTP request headers + +- **Content-Type**: application/octet-stream +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testBodyMultipartFormdataArrayOfBinary + +> String testBodyMultipartFormdataArrayOfBinary(files) + +Test array of binary in multipart mime + +Test array of binary in multipart mime + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + List files = Arrays.asList(); // List | + try { + String result = apiInstance.testBodyMultipartFormdataArrayOfBinary(files); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataArrayOfBinary"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **files** | **List<File>**| | | + +### Return type + +**String** + +### Authorization + +No authorization required ### HTTP request headers @@ -602,13 +210,13 @@ public class Example { | **200** | Successful operation | - | -## uploadFileWithRequiredFile +## testBodyMultipartFormdataSingleBinary -> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata) - -uploads an image (required) +> String testBodyMultipartFormdataSingleBinary(myFile) +Test single binary in multipart mime +Test single binary in multipart mime ### Example @@ -617,28 +225,21 @@ uploads an image (required) import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; import org.openapitools.client.models.*; -import org.openapitools.client.api.PetApi; +import org.openapitools.client.api.BodyApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost:3000"); - - // Configure OAuth2 access token for authorization: petstore_auth - OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth"); - petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); - PetApi apiInstance = new PetApi(defaultClient); - Long petId = 56L; // Long | ID of pet to update - File requiredFile = new File("/path/to/file"); // File | file to upload - String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server + BodyApi apiInstance = new BodyApi(defaultClient); + File myFile = new File("/path/to/file"); // File | try { - ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); + String result = apiInstance.testBodyMultipartFormdataSingleBinary(myFile); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile"); + System.err.println("Exception when calling BodyApi#testBodyMultipartFormdataSingleBinary"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -653,26 +254,354 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **petId** | **Long**| ID of pet to update | | -| **requiredFile** | **File**| file to upload | | -| **additionalMetadata** | **String**| Additional data to pass to server | [optional] | +| **myFile** | **File**| | [optional] | ### Return type -[**ModelApiResponse**](ModelApiResponse.md) +**String** ### Authorization -[petstore_auth](../README.md#petstore_auth) +No authorization required ### HTTP request headers - **Content-Type**: multipart/form-data +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyAllOfPet + +> Pet testEchoBodyAllOfPet(pet) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.testEchoBodyAllOfPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyAllOfPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | - | +| **200** | Successful operation | - | + + +## testEchoBodyFreeFormObjectResponseString + +> String testEchoBodyFreeFormObjectResponseString(body) + +Test free form object + +Test free form object + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Object body = null; // Object | Free form object + try { + String result = apiInstance.testEchoBodyFreeFormObjectResponseString(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyFreeFormObjectResponseString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **body** | **Object**| Free form object | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyPet + +> Pet testEchoBodyPet(pet) + +Test body parameter(s) + +Test body parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + Pet result = apiInstance.testEchoBodyPet(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyPet"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +[**Pet**](Pet.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyPetResponseString + +> String testEchoBodyPetResponseString(pet) + +Test empty response body + +Test empty response body + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store + try { + String result = apiInstance.testEchoBodyPetResponseString(pet); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyPetResponseString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testEchoBodyTagResponseString + +> String testEchoBodyTagResponseString(tag) + +Test empty json (request body) + +Test empty json (request body) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.BodyApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + BodyApi apiInstance = new BodyApi(defaultClient); + Tag tag = new Tag(); // Tag | Tag object + try { + String result = apiInstance.testEchoBodyTagResponseString(tag); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling BodyApi#testEchoBodyTagResponseString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **tag** | [**Tag**](Tag.md)| Tag object | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | diff --git a/samples/client/petstore/java/resteasy-echo/docs/Capitalization.md b/samples/client/petstore/java/resteasy-echo/docs/Capitalization.md deleted file mode 100644 index 82a812711de..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Capitalization.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# Capitalization - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**smallCamel** | **String** | | [optional] | -|**capitalCamel** | **String** | | [optional] | -|**smallSnake** | **String** | | [optional] | -|**capitalSnake** | **String** | | [optional] | -|**scAETHFlowPoints** | **String** | | [optional] | -|**ATT_NAME** | **String** | Name of the pet | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Cat.md b/samples/client/petstore/java/resteasy-echo/docs/Cat.md deleted file mode 100644 index 390dd519c8c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Cat.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Cat - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**declawed** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Category.md b/samples/client/petstore/java/resteasy-echo/docs/Category.md index ab6d1ec334d..7289ebf585b 100644 --- a/samples/client/petstore/java/resteasy-echo/docs/Category.md +++ b/samples/client/petstore/java/resteasy-echo/docs/Category.md @@ -8,7 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **Long** | | [optional] | -|**name** | **String** | | | +|**name** | **String** | | [optional] | diff --git a/samples/client/petstore/java/resteasy-echo/docs/ChildWithNullable.md b/samples/client/petstore/java/resteasy-echo/docs/ChildWithNullable.md deleted file mode 100644 index 73c0dd6d473..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ChildWithNullable.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ChildWithNullable - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**otherProperty** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ClassModel.md b/samples/client/petstore/java/resteasy-echo/docs/ClassModel.md deleted file mode 100644 index af46dea1f6c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ClassModel.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ClassModel - -Model for testing model with \"_class\" property - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**propertyClass** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Client.md b/samples/client/petstore/java/resteasy-echo/docs/Client.md deleted file mode 100644 index ef07b4ab8b9..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Client.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Client - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**client** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/DataQuery.md b/samples/client/petstore/java/resteasy-echo/docs/DataQuery.md new file mode 100644 index 00000000000..338c467b2d5 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/DataQuery.md @@ -0,0 +1,15 @@ + + +# DataQuery + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**suffix** | **String** | test suffix | [optional] | +|**text** | **String** | Some text containing white spaces | [optional] | +|**date** | **OffsetDateTime** | A date | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy-echo/docs/DefaultApi.md b/samples/client/petstore/java/resteasy-echo/docs/DefaultApi.md deleted file mode 100644 index 52373dc3685..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/DefaultApi.md +++ /dev/null @@ -1,69 +0,0 @@ -# DefaultApi - -All URIs are relative to *http://localhost:3000* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | | - - - -## fooGet - -> FooGetDefaultResponse fooGet() - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.DefaultApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - DefaultApi apiInstance = new DefaultApi(defaultClient); - try { - FooGetDefaultResponse result = apiInstance.fooGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling DefaultApi#fooGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**FooGetDefaultResponse**](FooGetDefaultResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | response | - | - diff --git a/samples/client/petstore/java/resteasy-echo/docs/DefaultValue.md b/samples/client/petstore/java/resteasy-echo/docs/DefaultValue.md new file mode 100644 index 00000000000..20a9b8ee250 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/DefaultValue.md @@ -0,0 +1,31 @@ + + +# DefaultValue + +to test the default value of properties + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**arrayStringEnumRefDefault** | **List<StringEnumRef>** | | [optional] | +|**arrayStringEnumDefault** | [**List<ArrayStringEnumDefaultEnum>**](#List<ArrayStringEnumDefaultEnum>) | | [optional] | +|**arrayStringDefault** | **List<String>** | | [optional] | +|**arrayIntegerDefault** | **List<Integer>** | | [optional] | +|**arrayString** | **List<String>** | | [optional] | +|**arrayStringNullable** | **List<String>** | | [optional] | +|**arrayStringExtensionNullable** | **List<String>** | | [optional] | +|**stringNullable** | **String** | | [optional] | + + + +## Enum: List<ArrayStringEnumDefaultEnum> + +| Name | Value | +|---- | -----| +| SUCCESS | "success" | +| FAILURE | "failure" | +| UNCLASSIFIED | "unclassified" | + + + diff --git a/samples/client/petstore/java/resteasy-echo/docs/DeprecatedObject.md b/samples/client/petstore/java/resteasy-echo/docs/DeprecatedObject.md deleted file mode 100644 index 48de1d62442..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/DeprecatedObject.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# DeprecatedObject - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Dog.md b/samples/client/petstore/java/resteasy-echo/docs/Dog.md deleted file mode 100644 index 972c981c0d0..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Dog.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Dog - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**breed** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/EnumArrays.md b/samples/client/petstore/java/resteasy-echo/docs/EnumArrays.md deleted file mode 100644 index b2222d5beb2..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/EnumArrays.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# EnumArrays - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**justSymbol** | [**JustSymbolEnum**](#JustSymbolEnum) | | [optional] | -|**arrayEnum** | [**List<ArrayEnumEnum>**](#List<ArrayEnumEnum>) | | [optional] | - - - -## Enum: JustSymbolEnum - -| Name | Value | -|---- | -----| -| GREATER_THAN_OR_EQUAL_TO | ">=" | -| DOLLAR | "$" | - - - -## Enum: List<ArrayEnumEnum> - -| Name | Value | -|---- | -----| -| FISH | "fish" | -| CRAB | "crab" | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/EnumClass.md b/samples/client/petstore/java/resteasy-echo/docs/EnumClass.md deleted file mode 100644 index b314590a759..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/EnumClass.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# EnumClass - -## Enum - - -* `_ABC` (value: `"_abc"`) - -* `_EFG` (value: `"-efg"`) - -* `_XYZ_` (value: `"(xyz)"`) - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/EnumTest.md b/samples/client/petstore/java/resteasy-echo/docs/EnumTest.md deleted file mode 100644 index 380a2aef0bc..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/EnumTest.md +++ /dev/null @@ -1,58 +0,0 @@ - - -# EnumTest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional] | -|**enumStringRequired** | [**EnumStringRequiredEnum**](#EnumStringRequiredEnum) | | | -|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] | -|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] | -|**outerEnum** | **OuterEnum** | | [optional] | -|**outerEnumInteger** | **OuterEnumInteger** | | [optional] | -|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] | -|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] | - - - -## Enum: EnumStringEnum - -| Name | Value | -|---- | -----| -| UPPER | "UPPER" | -| LOWER | "lower" | -| EMPTY | "" | - - - -## Enum: EnumStringRequiredEnum - -| Name | Value | -|---- | -----| -| UPPER | "UPPER" | -| LOWER | "lower" | -| EMPTY | "" | - - - -## Enum: EnumIntegerEnum - -| Name | Value | -|---- | -----| -| NUMBER_1 | 1 | -| NUMBER_MINUS_1 | -1 | - - - -## Enum: EnumNumberEnum - -| Name | Value | -|---- | -----| -| NUMBER_1_DOT_1 | 1.1 | -| NUMBER_MINUS_1_DOT_2 | -1.2 | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/FakeApi.md b/samples/client/petstore/java/resteasy-echo/docs/FakeApi.md deleted file mode 100644 index d8409218bfd..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/FakeApi.md +++ /dev/null @@ -1,1409 +0,0 @@ -# FakeApi - -All URIs are relative to *http://localhost:3000* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**fakeBigDecimalMap**](FakeApi.md#fakeBigDecimalMap) | **GET** /fake/BigDecimalMap | | -| [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint | -| [**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication | -| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | | -| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | | -| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | | -| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | | -| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | | -| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | | -| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | | -| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | | -| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model | -| [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 | -| [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters | -| [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) | -| [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties | -| [**testInlineFreeformAdditionalProperties**](FakeApi.md#testInlineFreeformAdditionalProperties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties | -| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data | -| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property | -| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | | - - - -## fakeBigDecimalMap - -> FakeBigDecimalMap200Response fakeBigDecimalMap() - - - -for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - try { - FakeBigDecimalMap200Response result = apiInstance.fakeBigDecimalMap(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeBigDecimalMap"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**FakeBigDecimalMap200Response**](FakeBigDecimalMap200Response.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -## fakeHealthGet - -> HealthCheckResult fakeHealthGet() - -Health check endpoint - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - try { - HealthCheckResult result = apiInstance.fakeHealthGet(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeHealthGet"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthCheckResult**](HealthCheckResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The instance started successfully | - | - - -## fakeHttpSignatureTest - -> fakeHttpSignatureTest(pet, query1, header1) - -test http signature authentication - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - - FakeApi apiInstance = new FakeApi(defaultClient); - Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store - String query1 = "query1_example"; // String | query parameter - String header1 = "header1_example"; // String | header parameter - try { - apiInstance.fakeHttpSignatureTest(pet, query1, header1); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | | -| **query1** | **String**| query parameter | [optional] | -| **header1** | **String**| header parameter | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[http_signature_test](../README.md#http_signature_test) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The instance started successfully | - | - - -## fakeOuterBooleanSerialize - -> Boolean fakeOuterBooleanSerialize(body) - - - -Test serialization of outer boolean types - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - Boolean body = true; // Boolean | Input boolean as post body - try { - Boolean result = apiInstance.fakeOuterBooleanSerialize(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **body** | **Boolean**| Input boolean as post body | [optional] | - -### Return type - -**Boolean** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output boolean | - | - - -## fakeOuterCompositeSerialize - -> OuterComposite fakeOuterCompositeSerialize(outerComposite) - - - -Test serialization of object with outer number type - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body - try { - OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] | - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output composite | - | - - -## fakeOuterNumberSerialize - -> BigDecimal fakeOuterNumberSerialize(body) - - - -Test serialization of outer number types - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - BigDecimal body = new BigDecimal(78); // BigDecimal | Input number as post body - try { - BigDecimal result = apiInstance.fakeOuterNumberSerialize(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **body** | **BigDecimal**| Input number as post body | [optional] | - -### Return type - -[**BigDecimal**](BigDecimal.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output number | - | - - -## fakeOuterStringSerialize - -> String fakeOuterStringSerialize(body) - - - -Test serialization of outer string types - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - String body = "body_example"; // String | Input string as post body - try { - String result = apiInstance.fakeOuterStringSerialize(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **body** | **String**| Input string as post body | [optional] | - -### Return type - -**String** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output string | - | - - -## fakePropertyEnumIntegerSerialize - -> OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty) - - - -Test serialization of enum (int) properties with examples - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - OuterObjectWithEnumProperty outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body - try { - OuterObjectWithEnumProperty result = apiInstance.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#fakePropertyEnumIntegerSerialize"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | | - -### Return type - -[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output enum (int) | - | - - -## testBodyWithBinary - -> testBodyWithBinary(body) - - - -For this test, the body has to be a binary file. - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - File body = new File("/path/to/file"); // File | image to upload - try { - apiInstance.testBodyWithBinary(body); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithBinary"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **body** | **File**| image to upload | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: image/png -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## testBodyWithFileSchema - -> testBodyWithFileSchema(fileSchemaTestClass) - - - -For this test, the body for this request must reference a schema named `File`. - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | - try { - apiInstance.testBodyWithFileSchema(fileSchemaTestClass); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## testBodyWithQueryParams - -> testBodyWithQueryParams(query, user) - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - String query = "query_example"; // String | - User user = new User(); // User | - try { - apiInstance.testBodyWithQueryParams(query, user); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **query** | **String**| | | -| **user** | [**User**](User.md)| | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - - -## testClientModel - -> Client testClientModel(client) - -To test \"client\" model - -To test \"client\" model - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - Client client = new Client(); // Client | client model - try { - Client result = apiInstance.testClientModel(client); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testClientModel"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **client** | [**Client**](Client.md)| client model | | - -### Return type - -[**Client**](Client.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -## testEndpointParameters - -> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure HTTP basic authorization: http_basic_test - HttpBasicAuth http_basic_test = (HttpBasicAuth) defaultClient.getAuthentication("http_basic_test"); - http_basic_test.setUsername("YOUR USERNAME"); - http_basic_test.setPassword("YOUR PASSWORD"); - - FakeApi apiInstance = new FakeApi(defaultClient); - BigDecimal number = new BigDecimal(78); // BigDecimal | None - Double _double = 3.4D; // Double | None - String patternWithoutDelimiter = "patternWithoutDelimiter_example"; // String | None - byte[] _byte = null; // byte[] | None - Integer integer = 56; // Integer | None - Integer int32 = 56; // Integer | None - Long int64 = 56L; // Long | None - Float _float = 3.4F; // Float | None - String string = "string_example"; // String | None - File binary = new File("/path/to/file"); // File | None - LocalDate date = LocalDate.now(); // LocalDate | None - OffsetDateTime dateTime = OffsetDateTime.now(); // OffsetDateTime | None - String password = "password_example"; // String | None - String paramCallback = "paramCallback_example"; // String | None - try { - apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEndpointParameters"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **number** | **BigDecimal**| None | | -| **_double** | **Double**| None | | -| **patternWithoutDelimiter** | **String**| None | | -| **_byte** | **byte[]**| None | | -| **integer** | **Integer**| None | [optional] | -| **int32** | **Integer**| None | [optional] | -| **int64** | **Long**| None | [optional] | -| **_float** | **Float**| None | [optional] | -| **string** | **String**| None | [optional] | -| **binary** | **File**| None | [optional] | -| **date** | **LocalDate**| None | [optional] | -| **dateTime** | **OffsetDateTime**| None | [optional] | -| **password** | **String**| None | [optional] | -| **paramCallback** | **String**| None | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - - -## testEnumParameters - -> testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString) - -To test enum parameters - -To test enum parameters - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - List enumHeaderStringArray = Arrays.asList("$"); // List | Header parameter enum test (string array) - String enumHeaderString = "_abc"; // String | Header parameter enum test (string) - List enumQueryStringArray = Arrays.asList("$"); // List | Query parameter enum test (string array) - String enumQueryString = "_abc"; // String | Query parameter enum test (string) - Integer enumQueryInteger = 1; // Integer | Query parameter enum test (double) - Double enumQueryDouble = 1.1D; // Double | Query parameter enum test (double) - List enumQueryModelArray = Arrays.asList(-efg); // List | - List enumFormStringArray = Arrays.asList("$"); // List | Form parameter enum test (string array) - String enumFormString = "_abc"; // String | Form parameter enum test (string) - try { - apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testEnumParameters"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **enumHeaderStringArray** | [**List<String>**](String.md)| Header parameter enum test (string array) | [optional] [enum: >, $] | -| **enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryStringArray** | [**List<String>**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $] | -| **enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | -| **enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2] | -| **enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2] | -| **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] | -| **enumFormStringArray** | [**List<String>**](String.md)| Form parameter enum test (string array) | [optional] [enum: >, $] | -| **enumFormString** | **String**| Form parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)] | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid request | - | -| **404** | Not found | - | - - -## testGroupParameters - -> testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure HTTP bearer authorization: bearer_test - HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test"); - bearer_test.setBearerToken("BEARER TOKEN"); - - FakeApi apiInstance = new FakeApi(defaultClient); - Integer requiredStringGroup = 56; // Integer | Required String in group parameters - Boolean requiredBooleanGroup = true; // Boolean | Required Boolean in group parameters - Long requiredInt64Group = 56L; // Long | Required Integer in group parameters - Integer stringGroup = 56; // Integer | String in group parameters - Boolean booleanGroup = true; // Boolean | Boolean in group parameters - Long int64Group = 56L; // Long | Integer in group parameters - try { - apiInstance.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testGroupParameters"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **requiredStringGroup** | **Integer**| Required String in group parameters | | -| **requiredBooleanGroup** | **Boolean**| Required Boolean in group parameters | | -| **requiredInt64Group** | **Long**| Required Integer in group parameters | | -| **stringGroup** | **Integer**| String in group parameters | [optional] | -| **booleanGroup** | **Boolean**| Boolean in group parameters | [optional] | -| **int64Group** | **Long**| Integer in group parameters | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[bearer_test](../README.md#bearer_test) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Something wrong | - | - - -## testInlineAdditionalProperties - -> testInlineAdditionalProperties(requestBody) - -test inline additionalProperties - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - Map requestBody = new HashMap(); // Map | request body - try { - apiInstance.testInlineAdditionalProperties(requestBody); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **requestBody** | [**Map<String, String>**](String.md)| request body | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -## testInlineFreeformAdditionalProperties - -> testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest) - -test inline free-form additionalProperties - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = new TestInlineFreeformAdditionalPropertiesRequest(); // TestInlineFreeformAdditionalPropertiesRequest | request body - try { - apiInstance.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testInlineFreeformAdditionalProperties"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **testInlineFreeformAdditionalPropertiesRequest** | [**TestInlineFreeformAdditionalPropertiesRequest**](TestInlineFreeformAdditionalPropertiesRequest.md)| request body | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -## testJsonFormData - -> testJsonFormData(param, param2) - -test json serialization of form data - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - String param = "param_example"; // String | field1 - String param2 = "param2_example"; // String | field2 - try { - apiInstance.testJsonFormData(param, param2); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testJsonFormData"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **param** | **String**| field1 | | -| **param2** | **String**| field2 | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -## testNullable - -> testNullable(childWithNullable) - -test nullable parent property - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - ChildWithNullable childWithNullable = new ChildWithNullable(); // ChildWithNullable | request body - try { - apiInstance.testNullable(childWithNullable); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testNullable"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **childWithNullable** | [**ChildWithNullable**](ChildWithNullable.md)| request body | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -## testQueryParameterCollectionFormat - -> testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language) - - - -To test the collection format in query parameters - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - FakeApi apiInstance = new FakeApi(defaultClient); - List pipe = Arrays.asList(); // List | - List ioutil = Arrays.asList(); // List | - List http = Arrays.asList(); // List | - List url = Arrays.asList(); // List | - List context = Arrays.asList(); // List | - String allowEmpty = "allowEmpty_example"; // String | - Map language = new HashMap(); // Map | - try { - apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); - } catch (ApiException e) { - System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **pipe** | [**List<String>**](String.md)| | | -| **ioutil** | [**List<String>**](String.md)| | | -| **http** | [**List<String>**](String.md)| | | -| **url** | [**List<String>**](String.md)| | | -| **context** | [**List<String>**](String.md)| | | -| **allowEmpty** | **String**| | | -| **language** | [**Map<String, String>**](String.md)| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - diff --git a/samples/client/petstore/java/resteasy-echo/docs/FakeBigDecimalMap200Response.md b/samples/client/petstore/java/resteasy-echo/docs/FakeBigDecimalMap200Response.md deleted file mode 100644 index 475be1d2d73..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/FakeBigDecimalMap200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FakeBigDecimalMap200Response - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**someId** | **BigDecimal** | | [optional] | -|**someMap** | **Map<String, BigDecimal>** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/FakeClassnameTags123Api.md b/samples/client/petstore/java/resteasy-echo/docs/FakeClassnameTags123Api.md deleted file mode 100644 index 8829af70c1f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,82 +0,0 @@ -# FakeClassnameTags123Api - -All URIs are relative to *http://localhost:3000* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case | - - - -## testClassname - -> Client testClassname(client) - -To test class name in snake case - -To test class name in snake case - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.FakeClassnameTags123Api; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure API key authorization: api_key_query - ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query"); - api_key_query.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key_query.setApiKeyPrefix("Token"); - - FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); - Client client = new Client(); // Client | client model - try { - Client result = apiInstance.testClassname(client); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **client** | [**Client**](Client.md)| client model | | - -### Return type - -[**Client**](Client.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - diff --git a/samples/client/petstore/java/resteasy-echo/docs/FileSchemaTestClass.md b/samples/client/petstore/java/resteasy-echo/docs/FileSchemaTestClass.md deleted file mode 100644 index 85d1a063669..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# FileSchemaTestClass - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_file** | [**ModelFile**](ModelFile.md) | | [optional] | -|**files** | [**List<ModelFile>**](ModelFile.md) | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Foo.md b/samples/client/petstore/java/resteasy-echo/docs/Foo.md deleted file mode 100644 index 6b3f0556528..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Foo.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# Foo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bar** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/FooGetDefaultResponse.md b/samples/client/petstore/java/resteasy-echo/docs/FooGetDefaultResponse.md deleted file mode 100644 index ff3d7a3a56c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/FooGetDefaultResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# FooGetDefaultResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**string** | [**Foo**](Foo.md) | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/FormApi.md b/samples/client/petstore/java/resteasy-echo/docs/FormApi.md new file mode 100644 index 00000000000..1f3ad73e938 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/FormApi.md @@ -0,0 +1,156 @@ +# FormApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testFormIntegerBooleanString**](FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s) | +| [**testFormOneof**](FormApi.md#testFormOneof) | **POST** /form/oneof | Test form parameter(s) for oneOf schema | + + + +## testFormIntegerBooleanString + +> String testFormIntegerBooleanString(integerForm, booleanForm, stringForm) + +Test form parameter(s) + +Test form parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FormApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + FormApi apiInstance = new FormApi(defaultClient); + Integer integerForm = 56; // Integer | + Boolean booleanForm = true; // Boolean | + String stringForm = "stringForm_example"; // String | + try { + String result = apiInstance.testFormIntegerBooleanString(integerForm, booleanForm, stringForm); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormApi#testFormIntegerBooleanString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerForm** | **Integer**| | [optional] | +| **booleanForm** | **Boolean**| | [optional] | +| **stringForm** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testFormOneof + +> String testFormOneof(form1, form2, form3, form4, id, name) + +Test form parameter(s) for oneOf schema + +Test form parameter(s) for oneOf schema + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.FormApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + FormApi apiInstance = new FormApi(defaultClient); + String form1 = "form1_example"; // String | + Integer form2 = 56; // Integer | + String form3 = "form3_example"; // String | + Boolean form4 = true; // Boolean | + Long id = 56L; // Long | + String name = "name_example"; // String | + try { + String result = apiInstance.testFormOneof(form1, form2, form3, form4, id, name); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FormApi#testFormOneof"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **form1** | **String**| | [optional] | +| **form2** | **Integer**| | [optional] | +| **form3** | **String**| | [optional] | +| **form4** | **Boolean**| | [optional] | +| **id** | **Long**| | [optional] | +| **name** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/x-www-form-urlencoded +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/petstore/java/resteasy-echo/docs/FormatTest.md b/samples/client/petstore/java/resteasy-echo/docs/FormatTest.md deleted file mode 100644 index 01b8c777ae0..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/FormatTest.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# FormatTest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**integer** | **Integer** | | [optional] | -|**int32** | **Integer** | | [optional] | -|**int64** | **Long** | | [optional] | -|**number** | **BigDecimal** | | | -|**_float** | **Float** | | [optional] | -|**_double** | **Double** | | [optional] | -|**decimal** | **BigDecimal** | | [optional] | -|**string** | **String** | | [optional] | -|**_byte** | **byte[]** | | | -|**binary** | **File** | | [optional] | -|**date** | **LocalDate** | | | -|**dateTime** | **OffsetDateTime** | | [optional] | -|**uuid** | **UUID** | | [optional] | -|**password** | **String** | | | -|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] | -|**patternWithDigitsAndDelimiter** | **String** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/HasOnlyReadOnly.md b/samples/client/petstore/java/resteasy-echo/docs/HasOnlyReadOnly.md deleted file mode 100644 index 29da5205dbb..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# HasOnlyReadOnly - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bar** | **String** | | [optional] [readonly] | -|**foo** | **String** | | [optional] [readonly] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/HeaderApi.md b/samples/client/petstore/java/resteasy-echo/docs/HeaderApi.md new file mode 100644 index 00000000000..e30880043fa --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/HeaderApi.md @@ -0,0 +1,83 @@ +# HeaderApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testHeaderIntegerBooleanStringEnums**](HeaderApi.md#testHeaderIntegerBooleanStringEnums) | **GET** /header/integer/boolean/string/enums | Test header parameter(s) | + + + +## testHeaderIntegerBooleanStringEnums + +> String testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader) + +Test header parameter(s) + +Test header parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.HeaderApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + HeaderApi apiInstance = new HeaderApi(defaultClient); + Integer integerHeader = 56; // Integer | + Boolean booleanHeader = true; // Boolean | + String stringHeader = "stringHeader_example"; // String | + String enumNonrefStringHeader = "success"; // String | + StringEnumRef enumRefStringHeader = StringEnumRef.fromValue("success"); // StringEnumRef | + try { + String result = apiInstance.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling HeaderApi#testHeaderIntegerBooleanStringEnums"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerHeader** | **Integer**| | [optional] | +| **booleanHeader** | **Boolean**| | [optional] | +| **stringHeader** | **String**| | [optional] | +| **enumNonrefStringHeader** | **String**| | [optional] [enum: success, failure, unclassified] | +| **enumRefStringHeader** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/petstore/java/resteasy-echo/docs/HealthCheckResult.md b/samples/client/petstore/java/resteasy-echo/docs/HealthCheckResult.md deleted file mode 100644 index 4885e6f1cad..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/HealthCheckResult.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# HealthCheckResult - -Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**nullableMessage** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/MapTest.md b/samples/client/petstore/java/resteasy-echo/docs/MapTest.md deleted file mode 100644 index 54380188e1d..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/MapTest.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# MapTest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**mapMapOfString** | **Map<String, Map<String, String>>** | | [optional] | -|**mapOfEnumString** | [**Map<String, InnerEnum>**](#Map<String, InnerEnum>) | | [optional] | -|**directMap** | **Map<String, Boolean>** | | [optional] | -|**indirectMap** | **Map<String, Boolean>** | | [optional] | - - - -## Enum: Map<String, InnerEnum> - -| Name | Value | -|---- | -----| -| UPPER | "UPPER" | -| LOWER | "lower" | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/java/resteasy-echo/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index a5ddf0faa6a..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# MixedPropertiesAndAdditionalPropertiesClass - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**uuid** | **UUID** | | [optional] | -|**dateTime** | **OffsetDateTime** | | [optional] | -|**map** | [**Map<String, Animal>**](Animal.md) | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Model200Response.md b/samples/client/petstore/java/resteasy-echo/docs/Model200Response.md deleted file mode 100644 index 109411580c6..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Model200Response.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# Model200Response - -Model for testing model name starting with number - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **Integer** | | [optional] | -|**propertyClass** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ModelApiResponse.md b/samples/client/petstore/java/resteasy-echo/docs/ModelApiResponse.md deleted file mode 100644 index e374c2dd2de..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ModelApiResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# ModelApiResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | | [optional] | -|**type** | **String** | | [optional] | -|**message** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ModelFile.md b/samples/client/petstore/java/resteasy-echo/docs/ModelFile.md deleted file mode 100644 index adcde984f52..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ModelFile.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ModelFile - -Must be named `File` for test. - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**sourceURI** | **String** | Test capitalization | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ModelList.md b/samples/client/petstore/java/resteasy-echo/docs/ModelList.md deleted file mode 100644 index f93ab7dde8d..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ModelList.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ModelList - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_123list** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ModelReturn.md b/samples/client/petstore/java/resteasy-echo/docs/ModelReturn.md deleted file mode 100644 index 0bd356861eb..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ModelReturn.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ModelReturn - -Model for testing reserved words - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**_return** | **Integer** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Name.md b/samples/client/petstore/java/resteasy-echo/docs/Name.md deleted file mode 100644 index c901d943530..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Name.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# Name - -Model for testing model name same as property name - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**name** | **Integer** | | | -|**snakeCase** | **Integer** | | [optional] [readonly] | -|**property** | **String** | | [optional] | -|**_123number** | **Integer** | | [optional] [readonly] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/NullableClass.md b/samples/client/petstore/java/resteasy-echo/docs/NullableClass.md deleted file mode 100644 index fa98c5c6d98..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/NullableClass.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# NullableClass - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**integerProp** | **Integer** | | [optional] | -|**numberProp** | **BigDecimal** | | [optional] | -|**booleanProp** | **Boolean** | | [optional] | -|**stringProp** | **String** | | [optional] | -|**dateProp** | **LocalDate** | | [optional] | -|**datetimeProp** | **OffsetDateTime** | | [optional] | -|**arrayNullableProp** | **List<Object>** | | [optional] | -|**arrayAndItemsNullableProp** | **List<Object>** | | [optional] | -|**arrayItemsNullable** | **List<Object>** | | [optional] | -|**objectNullableProp** | **Map<String, Object>** | | [optional] | -|**objectAndItemsNullableProp** | **Map<String, Object>** | | [optional] | -|**objectItemsNullable** | **Map<String, Object>** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/NumberOnly.md b/samples/client/petstore/java/resteasy-echo/docs/NumberOnly.md deleted file mode 100644 index b8ed1a4cfae..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/NumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# NumberOnly - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**justNumber** | **BigDecimal** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/NumberPropertiesOnly.md b/samples/client/petstore/java/resteasy-echo/docs/NumberPropertiesOnly.md new file mode 100644 index 00000000000..7e153538475 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/NumberPropertiesOnly.md @@ -0,0 +1,15 @@ + + +# NumberPropertiesOnly + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**number** | **BigDecimal** | | [optional] | +|**_float** | **Float** | | [optional] | +|**_double** | **Double** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy-echo/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/java/resteasy-echo/docs/ObjectWithDeprecatedFields.md deleted file mode 100644 index f1cf571f4c0..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ObjectWithDeprecatedFields.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# ObjectWithDeprecatedFields - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**uuid** | **String** | | [optional] | -|**id** | **BigDecimal** | | [optional] | -|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] | -|**bars** | **List<String>** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/Order.md b/samples/client/petstore/java/resteasy-echo/docs/Order.md deleted file mode 100644 index 27af32855c5..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/Order.md +++ /dev/null @@ -1,28 +0,0 @@ - - -# Order - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**petId** | **Long** | | [optional] | -|**quantity** | **Integer** | | [optional] | -|**shipDate** | **OffsetDateTime** | | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional] | -|**complete** | **Boolean** | | [optional] | - - - -## Enum: StatusEnum - -| Name | Value | -|---- | -----| -| PLACED | "placed" | -| APPROVED | "approved" | -| DELIVERED | "delivered" | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/OuterComposite.md b/samples/client/petstore/java/resteasy-echo/docs/OuterComposite.md deleted file mode 100644 index 98b56e0763f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/OuterComposite.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OuterComposite - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**myNumber** | **BigDecimal** | | [optional] | -|**myString** | **String** | | [optional] | -|**myBoolean** | **Boolean** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/OuterEnum.md b/samples/client/petstore/java/resteasy-echo/docs/OuterEnum.md deleted file mode 100644 index 1f9b723eb8e..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/OuterEnum.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OuterEnum - -## Enum - - -* `PLACED` (value: `"placed"`) - -* `APPROVED` (value: `"approved"`) - -* `DELIVERED` (value: `"delivered"`) - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/OuterEnumDefaultValue.md b/samples/client/petstore/java/resteasy-echo/docs/OuterEnumDefaultValue.md deleted file mode 100644 index cbc7f4ba54d..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/OuterEnumDefaultValue.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OuterEnumDefaultValue - -## Enum - - -* `PLACED` (value: `"placed"`) - -* `APPROVED` (value: `"approved"`) - -* `DELIVERED` (value: `"delivered"`) - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/OuterEnumInteger.md b/samples/client/petstore/java/resteasy-echo/docs/OuterEnumInteger.md deleted file mode 100644 index f71dea30ad0..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/OuterEnumInteger.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OuterEnumInteger - -## Enum - - -* `NUMBER_0` (value: `0`) - -* `NUMBER_1` (value: `1`) - -* `NUMBER_2` (value: `2`) - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/java/resteasy-echo/docs/OuterEnumIntegerDefaultValue.md deleted file mode 100644 index 99e6389f427..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/OuterEnumIntegerDefaultValue.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OuterEnumIntegerDefaultValue - -## Enum - - -* `NUMBER_0` (value: `0`) - -* `NUMBER_1` (value: `1`) - -* `NUMBER_2` (value: `2`) - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/java/resteasy-echo/docs/OuterObjectWithEnumProperty.md deleted file mode 100644 index 0fafaaa2715..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/OuterObjectWithEnumProperty.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OuterObjectWithEnumProperty - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**value** | **OuterEnumInteger** | | | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/ParentWithNullable.md b/samples/client/petstore/java/resteasy-echo/docs/ParentWithNullable.md deleted file mode 100644 index b8fcf6b42e8..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ParentWithNullable.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# ParentWithNullable - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**type** | [**TypeEnum**](#TypeEnum) | | [optional] | -|**nullableProperty** | **String** | | [optional] | - - - -## Enum: TypeEnum - -| Name | Value | -|---- | -----| -| CHILDWITHNULLABLE | "ChildWithNullable" | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/PathApi.md b/samples/client/petstore/java/resteasy-echo/docs/PathApi.md new file mode 100644 index 00000000000..e9a539e8c3e --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/PathApi.md @@ -0,0 +1,81 @@ +# PathApi + +All URIs are relative to *http://localhost:3000* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath**](PathApi.md#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath) | **GET** /path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path} | Test path parameter(s) | + + + +## testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath + +> String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath) + +Test path parameter(s) + +Test path parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.PathApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + PathApi apiInstance = new PathApi(defaultClient); + String pathString = "pathString_example"; // String | + Integer pathInteger = 56; // Integer | + String enumNonrefStringPath = "success"; // String | + StringEnumRef enumRefStringPath = StringEnumRef.fromValue("success"); // StringEnumRef | + try { + String result = apiInstance.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling PathApi#testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **pathString** | **String**| | | +| **pathInteger** | **Integer**| | | +| **enumNonrefStringPath** | **String**| | [enum: success, failure, unclassified] | +| **enumRefStringPath** | [**StringEnumRef**](.md)| | [enum: success, failure, unclassified] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + diff --git a/samples/client/petstore/java/resteasy-echo/docs/Pet.md b/samples/client/petstore/java/resteasy-echo/docs/Pet.md index 54af77a9f5a..82aa8a25ed7 100644 --- a/samples/client/petstore/java/resteasy-echo/docs/Pet.md +++ b/samples/client/petstore/java/resteasy-echo/docs/Pet.md @@ -8,9 +8,9 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**id** | **Long** | | [optional] | -|**category** | [**Category**](Category.md) | | [optional] | |**name** | **String** | | | -|**photoUrls** | **Set<String>** | | | +|**category** | [**Category**](Category.md) | | [optional] | +|**photoUrls** | **List<String>** | | | |**tags** | [**List<Tag>**](Tag.md) | | [optional] | |**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional] | diff --git a/samples/client/petstore/java/resteasy-echo/docs/Query.md b/samples/client/petstore/java/resteasy-echo/docs/Query.md new file mode 100644 index 00000000000..99c6fd6faa5 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/Query.md @@ -0,0 +1,24 @@ + + +# Query + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**id** | **Long** | Query | [optional] | +|**outcomes** | [**List<OutcomesEnum>**](#List<OutcomesEnum>) | | [optional] | + + + +## Enum: List<OutcomesEnum> + +| Name | Value | +|---- | -----| +| SUCCESS | "SUCCESS" | +| FAILURE | "FAILURE" | +| SKIPPED | "SKIPPED" | + + + diff --git a/samples/client/petstore/java/resteasy-echo/docs/UserApi.md b/samples/client/petstore/java/resteasy-echo/docs/QueryApi.md similarity index 51% rename from samples/client/petstore/java/resteasy-echo/docs/UserApi.md rename to samples/client/petstore/java/resteasy-echo/docs/QueryApi.md index 8ad69e3dda3..2606c8e62ca 100644 --- a/samples/client/petstore/java/resteasy-echo/docs/UserApi.md +++ b/samples/client/petstore/java/resteasy-echo/docs/QueryApi.md @@ -1,27 +1,27 @@ -# UserApi +# QueryApi All URIs are relative to *http://localhost:3000* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createUser**](UserApi.md#createUser) | **POST** /user | Create user | -| [**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array | -| [**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array | -| [**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user | -| [**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name | -| [**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system | -| [**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session | -| [**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user | +| [**testEnumRefString**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) | +| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) | +| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) | +| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) | +| [**testQueryStyleDeepObjectExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObjectAllOf) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testQueryStyleFormExplodeTrueArrayString) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObject**](QueryApi.md#testQueryStyleFormExplodeTrueObject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) | +| [**testQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) | -## createUser +## testEnumRefString -> createUser(user) +> String testEnumRefString(enumNonrefStringQuery, enumRefStringQuery) -Create user +Test query parameter(s) -This can only be done by the logged in user. +Test query parameter(s) ### Example @@ -31,281 +31,21 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; +import org.openapitools.client.api.QueryApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost:3000"); - UserApi apiInstance = new UserApi(defaultClient); - User user = new User(); // User | Created user object + QueryApi apiInstance = new QueryApi(defaultClient); + String enumNonrefStringQuery = "success"; // String | + StringEnumRef enumRefStringQuery = StringEnumRef.fromValue("success"); // StringEnumRef | try { - apiInstance.createUser(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **user** | [**User**](User.md)| Created user object | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -## createUsersWithArrayInput - -> createUsersWithArrayInput(user) - -Creates list of users with given input array - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - UserApi apiInstance = new UserApi(defaultClient); - List user = Arrays.asList(); // List | List of user object - try { - apiInstance.createUsersWithArrayInput(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **user** | [**List<User>**](User.md)| List of user object | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -## createUsersWithListInput - -> createUsersWithListInput(user) - -Creates list of users with given input array - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - UserApi apiInstance = new UserApi(defaultClient); - List user = Arrays.asList(); // List | List of user object - try { - apiInstance.createUsersWithListInput(user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#createUsersWithListInput"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **user** | [**List<User>**](User.md)| List of user object | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -## deleteUser - -> deleteUser(username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | The name that needs to be deleted - try { - apiInstance.deleteUser(username); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#deleteUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **username** | **String**| The name that needs to be deleted | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - - -## getUserByName - -> User getUserByName(username) - -Get user by user name - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing. - try { - User result = apiInstance.getUserByName(username); + String result = apiInstance.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#getUserByName"); + System.err.println("Exception when calling QueryApi#testEnumRefString"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -320,77 +60,8 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **username** | **String**| The name that needs to be fetched. Use user1 for testing. | | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - - -## loginUser - -> String loginUser(username, password) - -Logs user into the system - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | The user name for login - String password = "password_example"; // String | The password for login in clear text - try { - String result = apiInstance.loginUser(username, password); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#loginUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **username** | **String**| The user name for login | | -| **password** | **String**| The password for login in clear text | | +| **enumNonrefStringQuery** | **String**| | [optional] [enum: success, failure, unclassified] | +| **enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] | ### Return type @@ -403,23 +74,22 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/xml, application/json +- **Accept**: text/plain ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | +| **200** | Successful operation | - | -## logoutUser +## testQueryDatetimeDateString -> logoutUser() - -Logs out current logged in user session +> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery) +Test query parameter(s) +Test query parameter(s) ### Example @@ -429,81 +99,22 @@ import org.openapitools.client.ApiClient; import org.openapitools.client.ApiException; import org.openapitools.client.Configuration; import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; +import org.openapitools.client.api.QueryApi; public class Example { public static void main(String[] args) { ApiClient defaultClient = Configuration.getDefaultApiClient(); defaultClient.setBasePath("http://localhost:3000"); - UserApi apiInstance = new UserApi(defaultClient); + QueryApi apiInstance = new QueryApi(defaultClient); + OffsetDateTime datetimeQuery = OffsetDateTime.now(); // OffsetDateTime | + LocalDate dateQuery = LocalDate.now(); // LocalDate | + String stringQuery = "stringQuery_example"; // String | try { - apiInstance.logoutUser(); + String result = apiInstance.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling UserApi#logoutUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - - -## updateUser - -> updateUser(username, user) - -Updated user - -This can only be done by the logged in user. - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - UserApi apiInstance = new UserApi(defaultClient); - String username = "username_example"; // String | name that need to be deleted - User user = new User(); // User | Updated user object - try { - apiInstance.updateUser(username, user); - } catch (ApiException e) { - System.err.println("Exception when calling UserApi#updateUser"); + System.err.println("Exception when calling QueryApi#testQueryDatetimeDateString"); System.err.println("Status code: " + e.getCode()); System.err.println("Reason: " + e.getResponseBody()); System.err.println("Response headers: " + e.getResponseHeaders()); @@ -518,12 +129,13 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **username** | **String**| name that need to be deleted | | -| **user** | [**User**](User.md)| Updated user object | | +| **datetimeQuery** | **OffsetDateTime**| | [optional] | +| **dateQuery** | **LocalDate**| | [optional] | +| **stringQuery** | **String**| | [optional] | ### Return type -null (empty response body) +**String** ### Authorization @@ -531,13 +143,412 @@ No authorization required ### HTTP request headers -- **Content-Type**: application/json -- **Accept**: Not defined +- **Content-Type**: Not defined +- **Accept**: text/plain ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | +| **200** | Successful operation | - | + + +## testQueryIntegerBooleanString + +> String testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Integer integerQuery = 56; // Integer | + Boolean booleanQuery = true; // Boolean | + String stringQuery = "stringQuery_example"; // String | + try { + String result = apiInstance.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryIntegerBooleanString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **integerQuery** | **Integer**| | [optional] | +| **booleanQuery** | **Boolean**| | [optional] | +| **stringQuery** | **String**| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleDeepObjectExplodeTrueObject + +> String testQueryStyleDeepObjectExplodeTrueObject(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Pet queryObject = new Pet(); // Pet | + try { + String result = apiInstance.testQueryStyleDeepObjectExplodeTrueObject(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleDeepObjectExplodeTrueObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**Pet**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleDeepObjectExplodeTrueObjectAllOf + +> String testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter | + try { + String result = apiInstance.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleDeepObjectExplodeTrueObjectAllOf"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueArrayString + +> String testQueryStyleFormExplodeTrueArrayString(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueArrayString(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueArrayString"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueObject + +> String testQueryStyleFormExplodeTrueObject(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + Pet queryObject = new Pet(); // Pet | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueObject(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObject"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**Pet**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | + + +## testQueryStyleFormExplodeTrueObjectAllOf + +> String testQueryStyleFormExplodeTrueObjectAllOf(queryObject) + +Test query parameter(s) + +Test query parameter(s) + +### Example + +```java +// Import classes: +import org.openapitools.client.ApiClient; +import org.openapitools.client.ApiException; +import org.openapitools.client.Configuration; +import org.openapitools.client.models.*; +import org.openapitools.client.api.QueryApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("http://localhost:3000"); + + QueryApi apiInstance = new QueryApi(defaultClient); + DataQuery queryObject = new DataQuery(); // DataQuery | + try { + String result = apiInstance.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling QueryApi#testQueryStyleFormExplodeTrueObjectAllOf"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **queryObject** | [**DataQuery**](.md)| | [optional] | + +### Return type + +**String** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: text/plain + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful operation | - | diff --git a/samples/client/petstore/java/resteasy-echo/docs/ReadOnlyFirst.md b/samples/client/petstore/java/resteasy-echo/docs/ReadOnlyFirst.md deleted file mode 100644 index ad6af7ee155..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# ReadOnlyFirst - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**bar** | **String** | | [optional] [readonly] | -|**baz** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/SingleRefType.md b/samples/client/petstore/java/resteasy-echo/docs/SingleRefType.md deleted file mode 100644 index cc269bb871f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/SingleRefType.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SingleRefType - -## Enum - - -* `ADMIN` (value: `"admin"`) - -* `USER` (value: `"user"`) - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/SpecialModelName.md b/samples/client/petstore/java/resteasy-echo/docs/SpecialModelName.md deleted file mode 100644 index 4b6a06e3622..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/SpecialModelName.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# SpecialModelName - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**$specialPropertyName** | **Long** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/StoreApi.md b/samples/client/petstore/java/resteasy-echo/docs/StoreApi.md deleted file mode 100644 index 9cb3a78fb32..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/StoreApi.md +++ /dev/null @@ -1,282 +0,0 @@ -# StoreApi - -All URIs are relative to *http://localhost:3000* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID | -| [**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status | -| [**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID | -| [**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet | - - - -## deleteOrder - -> deleteOrder(orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - StoreApi apiInstance = new StoreApi(defaultClient); - String orderId = "orderId_example"; // String | ID of the order that needs to be deleted - try { - apiInstance.deleteOrder(orderId); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#deleteOrder"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderId** | **String**| ID of the order that needs to be deleted | | - -### Return type - -null (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - - -## getInventory - -> Map<String, Integer> getInventory() - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - // Configure API key authorization: api_key - ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key"); - api_key.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //api_key.setApiKeyPrefix("Token"); - - StoreApi apiInstance = new StoreApi(defaultClient); - try { - Map result = apiInstance.getInventory(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getInventory"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Map<String, Integer>** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - - -## getOrderById - -> Order getOrderById(orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - StoreApi apiInstance = new StoreApi(defaultClient); - Long orderId = 56L; // Long | ID of pet that needs to be fetched - try { - Order result = apiInstance.getOrderById(orderId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#getOrderById"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orderId** | **Long**| ID of pet that needs to be fetched | | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - - -## placeOrder - -> Order placeOrder(order) - -Place an order for a pet - - - -### Example - -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.models.*; -import org.openapitools.client.api.StoreApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost:3000"); - - StoreApi apiInstance = new StoreApi(defaultClient); - Order order = new Order(); // Order | order placed for purchasing the pet - try { - Order result = apiInstance.placeOrder(order); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling StoreApi#placeOrder"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **order** | [**Order**](Order.md)| order placed for purchasing the pet | | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - diff --git a/samples/client/petstore/java/resteasy-echo/docs/StringEnumRef.md b/samples/client/petstore/java/resteasy-echo/docs/StringEnumRef.md new file mode 100644 index 00000000000..dff22ecf074 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/StringEnumRef.md @@ -0,0 +1,15 @@ + + +# StringEnumRef + +## Enum + + +* `SUCCESS` (value: `"success"`) + +* `FAILURE` (value: `"failure"`) + +* `UNCLASSIFIED` (value: `"unclassified"`) + + + diff --git a/samples/client/petstore/java/resteasy-echo/docs/TestInlineFreeformAdditionalPropertiesRequest.md b/samples/client/petstore/java/resteasy-echo/docs/TestInlineFreeformAdditionalPropertiesRequest.md deleted file mode 100644 index dc066e6c7da..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/TestInlineFreeformAdditionalPropertiesRequest.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# TestInlineFreeformAdditionalPropertiesRequest - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**someProperty** | **String** | | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/petstore/java/resteasy-echo/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md new file mode 100644 index 00000000000..a756a343e8a --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md @@ -0,0 +1,16 @@ + + +# TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**size** | **String** | | [optional] | +|**color** | **String** | | [optional] | +|**id** | **Long** | | [optional] | +|**name** | **String** | | [optional] | + + + diff --git a/samples/client/petstore/java/resteasy-echo/docs/ArrayOfNumberOnly.md b/samples/client/petstore/java/resteasy-echo/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md similarity index 50% rename from samples/client/petstore/java/resteasy-echo/docs/ArrayOfNumberOnly.md rename to samples/client/petstore/java/resteasy-echo/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md index a5753530aad..9235e80fb82 100644 --- a/samples/client/petstore/java/resteasy-echo/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/java/resteasy-echo/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md @@ -1,13 +1,13 @@ -# ArrayOfNumberOnly +# TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**arrayNumber** | **List<BigDecimal>** | | [optional] | +|**values** | **List<String>** | | [optional] | diff --git a/samples/client/petstore/java/resteasy-echo/docs/User.md b/samples/client/petstore/java/resteasy-echo/docs/User.md deleted file mode 100644 index 08813e4b10b..00000000000 --- a/samples/client/petstore/java/resteasy-echo/docs/User.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# User - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **Long** | | [optional] | -|**username** | **String** | | [optional] | -|**firstName** | **String** | | [optional] | -|**lastName** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**password** | **String** | | [optional] | -|**phone** | **String** | | [optional] | -|**userStatus** | **Integer** | User Status | [optional] | - - - diff --git a/samples/client/petstore/java/resteasy-echo/pom.xml b/samples/client/petstore/java/resteasy-echo/pom.xml index 79248dcdd8d..67f2e7229e8 100644 --- a/samples/client/petstore/java/resteasy-echo/pom.xml +++ b/samples/client/petstore/java/resteasy-echo/pom.xml @@ -5,7 +5,7 @@ petstore-resteasy-echo jar petstore-resteasy-echo - 1.0.0 + 0.1.0 scm:git:git@github.com:openapitools/openapi-generator.git scm:git:git@github.com:openapitools/openapi-generator.git @@ -15,7 +15,7 @@ Unlicense - https://www.apache.org/licenses/LICENSE-2.0.html + http://www.apache.org/licenses/LICENSE-2.0.html repo diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiClient.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiClient.java index b979fd2111b..44a553eb4d5 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiClient.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiClient.java @@ -46,7 +46,6 @@ import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.HttpBasicAuth; import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.ApiKeyAuth; -import org.openapitools.client.auth.OAuth; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiClient extends JavaTimeFormatter { @@ -78,15 +77,12 @@ public class ApiClient extends JavaTimeFormatter { this.json.setDateFormat((DateFormat) dateFormat.clone()); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/1.0.0/java"); + setUserAgent("OpenAPI-Generator/0.1.0/java"); // Setup authentications (key: authentication name, value: authentication). authentications = new HashMap(); - authentications.put("petstore_auth", new OAuth()); - authentications.put("api_key", new ApiKeyAuth("header", "api_key")); - authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); - authentications.put("http_basic_test", new HttpBasicAuth()); - authentications.put("bearer_test", new HttpBearerAuth("bearer")); + authentications.put("http_auth", new HttpBasicAuth()); + authentications.put("http_bearer_auth", new HttpBearerAuth("bearer")); // Prevent the authentications from being modified. authentications = Collections.unmodifiableMap(authentications); } @@ -207,20 +203,6 @@ public class ApiClient extends JavaTimeFormatter { throw new RuntimeException("No API key authentication configured!"); } - /** - * Helper method to set access token for the first OAuth2 authentication. - * @param accessToken the access token - */ - public void setAccessToken(String accessToken) { - for (Authentication auth : authentications.values()) { - if (auth instanceof OAuth) { - ((OAuth) auth).setAccessToken(accessToken); - return; - } - } - throw new RuntimeException("No OAuth2 authentication configured!"); - } - /** * Set the User-Agent header's value (by adding to the default header map). * @param userAgent the User-Agent header value diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiException.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiException.java index 942dacc1d30..53d011b4ce5 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiException.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/ApiException.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Configuration.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Configuration.java index 6ce5a1404df..73125b18c8f 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Configuration.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Configuration.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -15,7 +15,7 @@ package org.openapitools.client; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "1.0.0"; + public static final String VERSION = "0.1.0"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/JavaTimeFormatter.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/JavaTimeFormatter.java index fde767b8e2f..b51199a21b0 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/JavaTimeFormatter.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/JavaTimeFormatter.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Pair.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Pair.java index 25b5a1b0879..6518a0948d8 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Pair.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/Pair.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/RFC3339DateFormat.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/RFC3339DateFormat.java index f94cba613ba..22bbe68c49f 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/RFC3339DateFormat.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/RFC3339DateFormat.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/StringUtil.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/StringUtil.java index 4dc60597910..d6c3fc8a968 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/StringUtil.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/StringUtil.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/AnotherFakeApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/AnotherFakeApi.java deleted file mode 100644 index 375fa787060..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/AnotherFakeApi.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiClient; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; - -import javax.ws.rs.core.GenericType; - -import org.openapitools.client.model.Client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AnotherFakeApi { - private ApiClient apiClient; - - public AnotherFakeApi() { - this(Configuration.getDefaultApiClient()); - } - - public AnotherFakeApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * To test special tags - * To test special tags and operation ID starting with number - * @param client client model (required) - * @return a {@code Client} - * @throws ApiException if fails to make API call - */ - public Client call123testSpecialTags(Client client) throws ApiException { - Object localVarPostBody = client; - - // verify the required parameter 'client' is set - if (client == null) { - throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags"); - } - - // create path and map variables - String localVarPath = "/another-fake/dummy".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/AuthApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/AuthApi.java new file mode 100644 index 00000000000..b054205b206 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/AuthApi.java @@ -0,0 +1,110 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import javax.ws.rs.core.GenericType; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AuthApi { + private ApiClient apiClient; + + public AuthApi() { + this(Configuration.getDefaultApiClient()); + } + + public AuthApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * To test HTTP basic authentication + * To test HTTP basic authentication + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testAuthHttpBasic() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/http/basic".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * To test HTTP bearer authentication + * To test HTTP bearer authentication + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testAuthHttpBearer() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/auth/http/bearer".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { "http_bearer_auth" }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/BodyApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/BodyApi.java new file mode 100644 index 00000000000..fde7ad5e99c --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/BodyApi.java @@ -0,0 +1,389 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import javax.ws.rs.core.GenericType; + +import java.io.File; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.Tag; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BodyApi { + private ApiClient apiClient; + + public BodyApi() { + this(Configuration.getDefaultApiClient()); + } + + public BodyApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test binary (gif) response body + * Test binary (gif) response body + * @return a {@code File} + * @throws ApiException if fails to make API call + */ + public File testBinaryGif() throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/binary/gif".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "image/gif" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test body parameter(s) + * Test body parameter(s) + * @param body (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testBodyApplicationOctetstreamBinary(File body) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/body/application/octetstream/binary".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/octet-stream" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test array of binary in multipart mime + * Test array of binary in multipart mime + * @param files (required) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testBodyMultipartFormdataArrayOfBinary(List files) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'files' is set + if (files == null) { + throw new ApiException(400, "Missing the required parameter 'files' when calling testBodyMultipartFormdataArrayOfBinary"); + } + + // create path and map variables + String localVarPath = "/body/application/octetstream/array_of_binary".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (files != null) + localVarFormParams.put("files", files); + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test single binary in multipart mime + * Test single binary in multipart mime + * @param myFile (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testBodyMultipartFormdataSingleBinary(File myFile) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/body/application/octetstream/single_binary".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (myFile != null) + localVarFormParams.put("my-file", myFile); + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test body parameter(s) + * Test body parameter(s) + * @param pet Pet object that needs to be added to the store (optional) + * @return a {@code Pet} + * @throws ApiException if fails to make API call + */ + public Pet testEchoBodyAllOfPet(Pet pet) throws ApiException { + Object localVarPostBody = pet; + + // create path and map variables + String localVarPath = "/echo/body/allOf/Pet".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test free form object + * Test free form object + * @param body Free form object (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testEchoBodyFreeFormObjectResponseString(Object body) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/echo/body/FreeFormObject/response_string".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test body parameter(s) + * Test body parameter(s) + * @param pet Pet object that needs to be added to the store (optional) + * @return a {@code Pet} + * @throws ApiException if fails to make API call + */ + public Pet testEchoBodyPet(Pet pet) throws ApiException { + Object localVarPostBody = pet; + + // create path and map variables + String localVarPath = "/echo/body/Pet".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test empty response body + * Test empty response body + * @param pet Pet object that needs to be added to the store (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testEchoBodyPetResponseString(Pet pet) throws ApiException { + Object localVarPostBody = pet; + + // create path and map variables + String localVarPath = "/echo/body/Pet/response_string".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test empty json (request body) + * Test empty json (request body) + * @param tag Tag object (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testEchoBodyTagResponseString(Tag tag) throws ApiException { + Object localVarPostBody = tag; + + // create path and map variables + String localVarPath = "/echo/body/Tag/response_string".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FakeApi.java deleted file mode 100644 index f9093377f76..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FakeApi.java +++ /dev/null @@ -1,1022 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiClient; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; - -import javax.ws.rs.core.GenericType; - -import java.math.BigDecimal; -import org.openapitools.client.model.ChildWithNullable; -import org.openapitools.client.model.Client; -import org.openapitools.client.model.EnumClass; -import org.openapitools.client.model.FakeBigDecimalMap200Response; -import java.io.File; -import org.openapitools.client.model.FileSchemaTestClass; -import org.openapitools.client.model.HealthCheckResult; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.OuterObjectWithEnumProperty; -import org.openapitools.client.model.Pet; -import org.openapitools.client.model.TestInlineFreeformAdditionalPropertiesRequest; -import org.openapitools.client.model.User; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FakeApi { - private ApiClient apiClient; - - public FakeApi() { - this(Configuration.getDefaultApiClient()); - } - - public FakeApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * - * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys - * @return a {@code FakeBigDecimalMap200Response} - * @throws ApiException if fails to make API call - */ - public FakeBigDecimalMap200Response fakeBigDecimalMap() throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/fake/BigDecimalMap".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "*/*" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Health check endpoint - * - * @return a {@code HealthCheckResult} - * @throws ApiException if fails to make API call - */ - public HealthCheckResult fakeHealthGet() throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/fake/health".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * test http signature authentication - * - * @param pet Pet object that needs to be added to the store (required) - * @param query1 query parameter (optional) - * @param header1 header parameter (optional) - * @throws ApiException if fails to make API call - */ - public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { - Object localVarPostBody = pet; - - // verify the required parameter 'pet' is set - if (pet == null) { - throw new ApiException(400, "Missing the required parameter 'pet' when calling fakeHttpSignatureTest"); - } - - // create path and map variables - String localVarPath = "/fake/http-signature-test".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_1", query1)); - - if (header1 != null) - localVarHeaderParams.put("header_1", apiClient.parameterToString(header1)); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json", "application/xml" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "http_signature_test" }; - - - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * - * Test serialization of outer boolean types - * @param body Input boolean as post body (optional) - * @return a {@code Boolean} - * @throws ApiException if fails to make API call - */ - public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/fake/outer/boolean".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "*/*" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * - * Test serialization of object with outer number type - * @param outerComposite Input composite as post body (optional) - * @return a {@code OuterComposite} - * @throws ApiException if fails to make API call - */ - public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { - Object localVarPostBody = outerComposite; - - // create path and map variables - String localVarPath = "/fake/outer/composite".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "*/*" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * - * Test serialization of outer number types - * @param body Input number as post body (optional) - * @return a {@code BigDecimal} - * @throws ApiException if fails to make API call - */ - public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/fake/outer/number".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "*/*" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * - * Test serialization of outer string types - * @param body Input string as post body (optional) - * @return a {@code String} - * @throws ApiException if fails to make API call - */ - public String fakeOuterStringSerialize(String body) throws ApiException { - Object localVarPostBody = body; - - // create path and map variables - String localVarPath = "/fake/outer/string".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "*/*" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * - * Test serialization of enum (int) properties with examples - * @param outerObjectWithEnumProperty Input enum (int) as post body (required) - * @return a {@code OuterObjectWithEnumProperty} - * @throws ApiException if fails to make API call - */ - public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { - Object localVarPostBody = outerObjectWithEnumProperty; - - // verify the required parameter 'outerObjectWithEnumProperty' is set - if (outerObjectWithEnumProperty == null) { - throw new ApiException(400, "Missing the required parameter 'outerObjectWithEnumProperty' when calling fakePropertyEnumIntegerSerialize"); - } - - // create path and map variables - String localVarPath = "/fake/property/enum-int".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "*/*" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * - * For this test, the body has to be a binary file. - * @param body image to upload (required) - * @throws ApiException if fails to make API call - */ - public void testBodyWithBinary(File body) throws ApiException { - Object localVarPostBody = body; - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithBinary"); - } - - // create path and map variables - String localVarPath = "/fake/body-with-binary".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "image/png" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * - * For this test, the body for this request must reference a schema named `File`. - * @param fileSchemaTestClass (required) - * @throws ApiException if fails to make API call - */ - public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { - Object localVarPostBody = fileSchemaTestClass; - - // verify the required parameter 'fileSchemaTestClass' is set - if (fileSchemaTestClass == null) { - throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema"); - } - - // create path and map variables - String localVarPath = "/fake/body-with-file-schema".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * - * - * @param query (required) - * @param user (required) - * @throws ApiException if fails to make API call - */ - public void testBodyWithQueryParams(String query, User user) throws ApiException { - Object localVarPostBody = user; - - // verify the required parameter 'query' is set - if (query == null) { - throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams"); - } - - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams"); - } - - // create path and map variables - String localVarPath = "/fake/body-with-query-params".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query)); - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * To test \"client\" model - * To test \"client\" model - * @param client client model (required) - * @return a {@code Client} - * @throws ApiException if fails to make API call - */ - public Client testClientModel(Client client) throws ApiException { - Object localVarPostBody = client; - - // verify the required parameter 'client' is set - if (client == null) { - throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel"); - } - - // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * @param number None (required) - * @param _double None (required) - * @param patternWithoutDelimiter None (required) - * @param _byte None (required) - * @param integer None (optional) - * @param int32 None (optional) - * @param int64 None (optional) - * @param _float None (optional) - * @param string None (optional) - * @param binary None (optional) - * @param date None (optional) - * @param dateTime None (optional) - * @param password None (optional) - * @param paramCallback None (optional) - * @throws ApiException if fails to make API call - */ - public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'number' is set - if (number == null) { - throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters"); - } - - // verify the required parameter '_double' is set - if (_double == null) { - throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters"); - } - - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) { - throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters"); - } - - // verify the required parameter '_byte' is set - if (_byte == null) { - throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters"); - } - - // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - if (integer != null) - localVarFormParams.put("integer", integer); -if (int32 != null) - localVarFormParams.put("int32", int32); -if (int64 != null) - localVarFormParams.put("int64", int64); -if (number != null) - localVarFormParams.put("number", number); -if (_float != null) - localVarFormParams.put("float", _float); -if (_double != null) - localVarFormParams.put("double", _double); -if (string != null) - localVarFormParams.put("string", string); -if (patternWithoutDelimiter != null) - localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter); -if (_byte != null) - localVarFormParams.put("byte", _byte); -if (binary != null) - localVarFormParams.put("binary", binary); -if (date != null) - localVarFormParams.put("date", date); -if (dateTime != null) - localVarFormParams.put("dateTime", dateTime); -if (password != null) - localVarFormParams.put("password", password); -if (paramCallback != null) - localVarFormParams.put("callback", paramCallback); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "http_basic_test" }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * To test enum parameters - * To test enum parameters - * @param enumHeaderStringArray Header parameter enum test (string array) (optional) - * @param enumHeaderString Header parameter enum test (string) (optional, default to -efg) - * @param enumQueryStringArray Query parameter enum test (string array) (optional) - * @param enumQueryString Query parameter enum test (string) (optional, default to -efg) - * @param enumQueryInteger Query parameter enum test (double) (optional) - * @param enumQueryDouble Query parameter enum test (double) (optional) - * @param enumQueryModelArray (optional) - * @param enumFormStringArray Form parameter enum test (string array) (optional, default to $) - * @param enumFormString Form parameter enum test (string) (optional, default to -efg) - * @throws ApiException if fails to make API call - */ - public void testEnumParameters(List enumHeaderStringArray, String enumHeaderString, List enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List enumQueryModelArray, List enumFormStringArray, String enumFormString) throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_model_array", enumQueryModelArray)); - - if (enumHeaderStringArray != null) - localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray)); -if (enumHeaderString != null) - localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); - - - if (enumFormStringArray != null) - localVarFormParams.put("enum_form_string_array", enumFormStringArray); -if (enumFormString != null) - localVarFormParams.put("enum_form_string", enumFormString); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Fake endpoint to test group parameters (optional) - * Fake endpoint to test group parameters (optional) - * @param requiredStringGroup Required String in group parameters (required) - * @param requiredBooleanGroup Required Boolean in group parameters (required) - * @param requiredInt64Group Required Integer in group parameters (required) - * @param stringGroup String in group parameters (optional) - * @param booleanGroup Boolean in group parameters (optional) - * @param int64Group Integer in group parameters (optional) - * @throws ApiException if fails to make API call - */ - public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) { - throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters"); - } - - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) { - throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters"); - } - - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) { - throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters"); - } - - // create path and map variables - String localVarPath = "/fake".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group)); - - if (requiredBooleanGroup != null) - localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup)); -if (booleanGroup != null) - localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "bearer_test" }; - - - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * test inline additionalProperties - * - * @param requestBody request body (required) - * @throws ApiException if fails to make API call - */ - public void testInlineAdditionalProperties(Map requestBody) throws ApiException { - Object localVarPostBody = requestBody; - - // verify the required parameter 'requestBody' is set - if (requestBody == null) { - throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties"); - } - - // create path and map variables - String localVarPath = "/fake/inline-additionalProperties".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * test inline free-form additionalProperties - * - * @param testInlineFreeformAdditionalPropertiesRequest request body (required) - * @throws ApiException if fails to make API call - */ - public void testInlineFreeformAdditionalProperties(TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest) throws ApiException { - Object localVarPostBody = testInlineFreeformAdditionalPropertiesRequest; - - // verify the required parameter 'testInlineFreeformAdditionalPropertiesRequest' is set - if (testInlineFreeformAdditionalPropertiesRequest == null) { - throw new ApiException(400, "Missing the required parameter 'testInlineFreeformAdditionalPropertiesRequest' when calling testInlineFreeformAdditionalProperties"); - } - - // create path and map variables - String localVarPath = "/fake/inline-freeform-additionalProperties".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * test json serialization of form data - * - * @param param field1 (required) - * @param param2 field2 (required) - * @throws ApiException if fails to make API call - */ - public void testJsonFormData(String param, String param2) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'param' is set - if (param == null) { - throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData"); - } - - // verify the required parameter 'param2' is set - if (param2 == null) { - throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData"); - } - - // create path and map variables - String localVarPath = "/fake/jsonFormData".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - if (param != null) - localVarFormParams.put("param", param); -if (param2 != null) - localVarFormParams.put("param2", param2); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * test nullable parent property - * - * @param childWithNullable request body (required) - * @throws ApiException if fails to make API call - */ - public void testNullable(ChildWithNullable childWithNullable) throws ApiException { - Object localVarPostBody = childWithNullable; - - // verify the required parameter 'childWithNullable' is set - if (childWithNullable == null) { - throw new ApiException(400, "Missing the required parameter 'childWithNullable' when calling testNullable"); - } - - // create path and map variables - String localVarPath = "/fake/nullable".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * - * To test the collection format in query parameters - * @param pipe (required) - * @param ioutil (required) - * @param http (required) - * @param url (required) - * @param context (required) - * @param allowEmpty (required) - * @param language (optional) - * @throws ApiException if fails to make API call - */ - public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context, String allowEmpty, Map language) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'pipe' is set - if (pipe == null) { - throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat"); - } - - // verify the required parameter 'ioutil' is set - if (ioutil == null) { - throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat"); - } - - // verify the required parameter 'http' is set - if (http == null) { - throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat"); - } - - // verify the required parameter 'url' is set - if (url == null) { - throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat"); - } - - // verify the required parameter 'context' is set - if (context == null) { - throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat"); - } - - // verify the required parameter 'allowEmpty' is set - if (allowEmpty == null) { - throw new ApiException(400, "Missing the required parameter 'allowEmpty' when calling testQueryParameterCollectionFormat"); - } - - // create path and map variables - String localVarPath = "/fake/test-query-parameters".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("pipes", "pipe", pipe)); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil)); - localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http)); - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "language", language)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "allowEmpty", allowEmpty)); - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java deleted file mode 100644 index 71d312411e3..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiClient; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; - -import javax.ws.rs.core.GenericType; - -import org.openapitools.client.model.Client; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FakeClassnameTags123Api { - private ApiClient apiClient; - - public FakeClassnameTags123Api() { - this(Configuration.getDefaultApiClient()); - } - - public FakeClassnameTags123Api(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * To test class name in snake case - * To test class name in snake case - * @param client client model (required) - * @return a {@code Client} - * @throws ApiException if fails to make API call - */ - public Client testClassname(Client client) throws ApiException { - Object localVarPostBody = client; - - // verify the required parameter 'client' is set - if (client == null) { - throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname"); - } - - // create path and map variables - String localVarPath = "/fake_classname_test".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "api_key_query" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FormApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FormApi.java new file mode 100644 index 00000000000..f30385ee8c9 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/FormApi.java @@ -0,0 +1,137 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import javax.ws.rs.core.GenericType; + + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class FormApi { + private ApiClient apiClient; + + public FormApi() { + this(Configuration.getDefaultApiClient()); + } + + public FormApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test form parameter(s) + * Test form parameter(s) + * @param integerForm (optional) + * @param booleanForm (optional) + * @param stringForm (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanForm, String stringForm) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/form/integer/boolean/string".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (integerForm != null) + localVarFormParams.put("integer_form", integerForm); +if (booleanForm != null) + localVarFormParams.put("boolean_form", booleanForm); +if (stringForm != null) + localVarFormParams.put("string_form", stringForm); + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test form parameter(s) for oneOf schema + * Test form parameter(s) for oneOf schema + * @param form1 (optional) + * @param form2 (optional) + * @param form3 (optional) + * @param form4 (optional) + * @param id (optional) + * @param name (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testFormOneof(String form1, Integer form2, String form3, Boolean form4, Long id, String name) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/form/oneof".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + if (form1 != null) + localVarFormParams.put("form1", form1); +if (form2 != null) + localVarFormParams.put("form2", form2); +if (form3 != null) + localVarFormParams.put("form3", form3); +if (form4 != null) + localVarFormParams.put("form4", form4); +if (id != null) + localVarFormParams.put("id", id); +if (name != null) + localVarFormParams.put("name", name); + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + "application/x-www-form-urlencoded" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/DefaultApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/HeaderApi.java similarity index 54% rename from samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/DefaultApi.java rename to samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/HeaderApi.java index bef1d2061d7..1541ee5a402 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/DefaultApi.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/HeaderApi.java @@ -7,7 +7,7 @@ import org.openapitools.client.Pair; import javax.ws.rs.core.GenericType; -import org.openapitools.client.model.FooGetDefaultResponse; +import org.openapitools.client.model.StringEnumRef; import java.util.ArrayList; import java.util.HashMap; @@ -15,14 +15,14 @@ import java.util.List; import java.util.Map; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DefaultApi { +public class HeaderApi { private ApiClient apiClient; - public DefaultApi() { + public HeaderApi() { this(Configuration.getDefaultApiClient()); } - public DefaultApi(ApiClient apiClient) { + public HeaderApi(ApiClient apiClient) { this.apiClient = apiClient; } @@ -35,16 +35,21 @@ public class DefaultApi { } /** - * - * - * @return a {@code FooGetDefaultResponse} + * Test header parameter(s) + * Test header parameter(s) + * @param integerHeader (optional) + * @param booleanHeader (optional) + * @param stringHeader (optional) + * @param enumNonrefStringHeader (optional) + * @param enumRefStringHeader (optional) + * @return a {@code String} * @throws ApiException if fails to make API call */ - public FooGetDefaultResponse fooGet() throws ApiException { + public String testHeaderIntegerBooleanStringEnums(Integer integerHeader, Boolean booleanHeader, String stringHeader, String enumNonrefStringHeader, StringEnumRef enumRefStringHeader) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/foo".replaceAll("\\{format\\}","json"); + String localVarPath = "/header/integer/boolean/string/enums".replaceAll("\\{format\\}","json"); // query params List localVarQueryParams = new ArrayList(); @@ -53,11 +58,21 @@ public class DefaultApi { Map localVarFormParams = new HashMap(); - + if (integerHeader != null) + localVarHeaderParams.put("integer_header", apiClient.parameterToString(integerHeader)); +if (booleanHeader != null) + localVarHeaderParams.put("boolean_header", apiClient.parameterToString(booleanHeader)); +if (stringHeader != null) + localVarHeaderParams.put("string_header", apiClient.parameterToString(stringHeader)); +if (enumNonrefStringHeader != null) + localVarHeaderParams.put("enum_nonref_string_header", apiClient.parameterToString(enumNonrefStringHeader)); +if (enumRefStringHeader != null) + localVarHeaderParams.put("enum_ref_string_header", apiClient.parameterToString(enumRefStringHeader)); + final String[] localVarAccepts = { - "application/json" + "text/plain" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -68,7 +83,7 @@ public class DefaultApi { String[] localVarAuthNames = new String[] { }; - GenericType localVarReturnType = new GenericType() {}; + GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } } diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/PathApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/PathApi.java new file mode 100644 index 00000000000..5ab77cba67e --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/PathApi.java @@ -0,0 +1,102 @@ +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.ApiClient; +import org.openapitools.client.Configuration; +import org.openapitools.client.Pair; + +import javax.ws.rs.core.GenericType; + +import org.openapitools.client.model.StringEnumRef; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PathApi { + private ApiClient apiClient; + + public PathApi() { + this(Configuration.getDefaultApiClient()); + } + + public PathApi(ApiClient apiClient) { + this.apiClient = apiClient; + } + + public ApiClient getApiClient() { + return apiClient; + } + + public void setApiClient(ApiClient apiClient) { + this.apiClient = apiClient; + } + + /** + * Test path parameter(s) + * Test path parameter(s) + * @param pathString (required) + * @param pathInteger (required) + * @param enumNonrefStringPath (required) + * @param enumRefStringPath (required) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(String pathString, Integer pathInteger, String enumNonrefStringPath, StringEnumRef enumRefStringPath) throws ApiException { + Object localVarPostBody = null; + + // verify the required parameter 'pathString' is set + if (pathString == null) { + throw new ApiException(400, "Missing the required parameter 'pathString' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // verify the required parameter 'pathInteger' is set + if (pathInteger == null) { + throw new ApiException(400, "Missing the required parameter 'pathInteger' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // verify the required parameter 'enumNonrefStringPath' is set + if (enumNonrefStringPath == null) { + throw new ApiException(400, "Missing the required parameter 'enumNonrefStringPath' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // verify the required parameter 'enumRefStringPath' is set + if (enumRefStringPath == null) { + throw new ApiException(400, "Missing the required parameter 'enumRefStringPath' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath"); + } + + // create path and map variables + String localVarPath = "/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}".replaceAll("\\{format\\}","json") + .replaceAll("\\{" + "path_string" + "\\}", apiClient.escapeString(pathString.toString())) + .replaceAll("\\{" + "path_integer" + "\\}", apiClient.escapeString(pathInteger.toString())) + .replaceAll("\\{" + "enum_nonref_string_path" + "\\}", apiClient.escapeString(enumNonrefStringPath.toString())) + .replaceAll("\\{" + "enum_ref_string_path" + "\\}", apiClient.escapeString(enumRefStringPath.toString())); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/PetApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/PetApi.java deleted file mode 100644 index b2dd0c286ce..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/PetApi.java +++ /dev/null @@ -1,458 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiClient; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; - -import javax.ws.rs.core.GenericType; - -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; -import java.util.Set; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class PetApi { - private ApiClient apiClient; - - public PetApi() { - this(Configuration.getDefaultApiClient()); - } - - public PetApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Add a new pet to the store - * - * @param pet Pet object that needs to be added to the store (required) - * @throws ApiException if fails to make API call - */ - public void addPet(Pet pet) throws ApiException { - Object localVarPostBody = pet; - - // verify the required parameter 'pet' is set - if (pet == null) { - throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet"); - } - - // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json", "application/xml" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Deletes a pet - * - * @param petId Pet id to delete (required) - * @param apiKey (optional) - * @throws ApiException if fails to make API call - */ - public void deletePet(Long petId, String apiKey) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"); - } - - // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - if (apiKey != null) - localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Finds Pets by status - * Multiple status values can be provided with comma separated strings - * @param status Status values that need to be considered for filter (required) - * @return a {@code List} - * @throws ApiException if fails to make API call - */ - public List findPetsByStatus(List status) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'status' is set - if (status == null) { - throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus"); - } - - // create path and map variables - String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); - - - - - final String[] localVarAccepts = { - "application/xml", "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Finds Pets by tags - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * @param tags Tags to filter by (required) - * @return a {@code Set} - * @throws ApiException if fails to make API call - * @deprecated - */ - @Deprecated - public Set findPetsByTags(Set tags) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'tags' is set - if (tags == null) { - throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags"); - } - - // create path and map variables - String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); - - - - - final String[] localVarAccepts = { - "application/xml", "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Find pet by ID - * Returns a single pet - * @param petId ID of pet to return (required) - * @return a {@code Pet} - * @throws ApiException if fails to make API call - */ - public Pet getPetById(Long petId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById"); - } - - // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/xml", "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "api_key" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Update an existing pet - * - * @param pet Pet object that needs to be added to the store (required) - * @throws ApiException if fails to make API call - */ - public void updatePet(Pet pet) throws ApiException { - Object localVarPostBody = pet; - - // verify the required parameter 'pet' is set - if (pet == null) { - throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"); - } - - // create path and map variables - String localVarPath = "/pet".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json", "application/xml" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Updates a pet in the store with form data - * - * @param petId ID of pet that needs to be updated (required) - * @param name Updated name of the pet (optional) - * @param status Updated status of the pet (optional) - * @throws ApiException if fails to make API call - */ - public void updatePetWithForm(Long petId, String name, String status) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm"); - } - - // create path and map variables - String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - if (name != null) - localVarFormParams.put("name", name); -if (status != null) - localVarFormParams.put("status", status); - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/x-www-form-urlencoded" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * uploads an image - * - * @param petId ID of pet to update (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @param _file file to upload (optional) - * @return a {@code String} - * @throws ApiException if fails to make API call - */ - public String uploadFile(Long petId, String additionalMetadata, File _file) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile"); - } - - // create path and map variables - String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - if (additionalMetadata != null) - localVarFormParams.put("additionalMetadata", additionalMetadata); -if (_file != null) - localVarFormParams.put("file", _file); - - final String[] localVarAccepts = { - "text/plain" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * uploads an image (required) - * - * @param petId ID of pet to update (required) - * @param requiredFile file to upload (required) - * @param additionalMetadata Additional data to pass to server (optional) - * @return a {@code ModelApiResponse} - * @throws ApiException if fails to make API call - */ - public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'petId' is set - if (petId == null) { - throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile"); - } - - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) { - throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile"); - } - - // create path and map variables - String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - if (additionalMetadata != null) - localVarFormParams.put("additionalMetadata", additionalMetadata); -if (requiredFile != null) - localVarFormParams.put("requiredFile", requiredFile); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "petstore_auth" }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/UserApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/QueryApi.java similarity index 52% rename from samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/UserApi.java rename to samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/QueryApi.java index e2c575ca8de..56dca02c018 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/UserApi.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/QueryApi.java @@ -7,8 +7,13 @@ import org.openapitools.client.Pair; import javax.ws.rs.core.GenericType; +import org.openapitools.client.model.DataQuery; +import java.time.LocalDate; import java.time.OffsetDateTime; -import org.openapitools.client.model.User; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; import java.util.ArrayList; import java.util.HashMap; @@ -16,14 +21,14 @@ import java.util.List; import java.util.Map; @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class UserApi { +public class QueryApi { private ApiClient apiClient; - public UserApi() { + public QueryApi() { this(Configuration.getDefaultApiClient()); } - public UserApi(ApiClient apiClient) { + public QueryApi(ApiClient apiClient) { this.apiClient = apiClient; } @@ -36,241 +41,18 @@ public class UserApi { } /** - * Create user - * This can only be done by the logged in user. - * @param user Created user object (required) - * @throws ApiException if fails to make API call - */ - public void createUser(User user) throws ApiException { - Object localVarPostBody = user; - - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException(400, "Missing the required parameter 'user' when calling createUser"); - } - - // create path and map variables - String localVarPath = "/user".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Creates list of users with given input array - * - * @param user List of user object (required) - * @throws ApiException if fails to make API call - */ - public void createUsersWithArrayInput(List user) throws ApiException { - Object localVarPostBody = user; - - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"); - } - - // create path and map variables - String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Creates list of users with given input array - * - * @param user List of user object (required) - * @throws ApiException if fails to make API call - */ - public void createUsersWithListInput(List user) throws ApiException { - Object localVarPostBody = user; - - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"); - } - - // create path and map variables - String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Delete user - * This can only be done by the logged in user. - * @param username The name that needs to be deleted (required) - * @throws ApiException if fails to make API call - */ - public void deleteUser(String username) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser"); - } - - // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Get user by user name - * - * @param username The name that needs to be fetched. Use user1 for testing. (required) - * @return a {@code User} - * @throws ApiException if fails to make API call - */ - public User getUserByName(String username) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName"); - } - - // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/xml", "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Logs user into the system - * - * @param username The user name for login (required) - * @param password The password for login in clear text (required) + * Test query parameter(s) + * Test query parameter(s) + * @param enumNonrefStringQuery (optional) + * @param enumRefStringQuery (optional) * @return a {@code String} * @throws ApiException if fails to make API call */ - public String loginUser(String username, String password) throws ApiException { + public String testEnumRefString(String enumNonrefStringQuery, StringEnumRef enumRefStringQuery) throws ApiException { Object localVarPostBody = null; - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser"); - } - - // verify the required parameter 'password' is set - if (password == null) { - throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser"); - } - // create path and map variables - String localVarPath = "/user/login".replaceAll("\\{format\\}","json"); + String localVarPath = "/query/enum_ref_string".replaceAll("\\{format\\}","json"); // query params List localVarQueryParams = new ArrayList(); @@ -278,14 +60,14 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_nonref_string_query", enumNonrefStringQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_ref_string_query", enumRefStringQuery)); final String[] localVarAccepts = { - "application/xml", "application/json" + "text/plain" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -300,15 +82,19 @@ public class UserApi { return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** - * Logs out current logged in user session - * + * Test query parameter(s) + * Test query parameter(s) + * @param datetimeQuery (optional) + * @param dateQuery (optional) + * @param stringQuery (optional) + * @return a {@code String} * @throws ApiException if fails to make API call */ - public void logoutUser() throws ApiException { + public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/logout".replaceAll("\\{format\\}","json"); + String localVarPath = "/query/datetime/date/string".replaceAll("\\{format\\}","json"); // query params List localVarQueryParams = new ArrayList(); @@ -316,12 +102,15 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "datetime_query", datetimeQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "date_query", dateQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_query", stringQuery)); final String[] localVarAccepts = { - + "text/plain" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); @@ -332,32 +121,23 @@ public class UserApi { String[] localVarAuthNames = new String[] { }; - - apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } /** - * Updated user - * This can only be done by the logged in user. - * @param username name that need to be deleted (required) - * @param user Updated user object (required) + * Test query parameter(s) + * Test query parameter(s) + * @param integerQuery (optional) + * @param booleanQuery (optional) + * @param stringQuery (optional) + * @return a {@code String} * @throws ApiException if fails to make API call */ - public void updateUser(String username, User user) throws ApiException { - Object localVarPostBody = user; - - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser"); - } - - // verify the required parameter 'user' is set - if (user == null) { - throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser"); - } + public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/query/integer/boolean/string".replaceAll("\\{format\\}","json"); // query params List localVarQueryParams = new ArrayList(); @@ -365,23 +145,221 @@ public class UserApi { Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "integer_query", integerQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "boolean_query", booleanQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_query", stringQuery)); final String[] localVarAccepts = { - + "text/plain" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { - "application/json" + }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/style_deepObject/explode_true/object".replaceAll("\\{format\\}","json"); - apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_object", queryObject)); + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/style_deepObject/explode_true/object/allOf".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_object", queryObject)); + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/style_form/explode_true/array_string".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_object", queryObject)); + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/style_form/explode_true/object".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_object", queryObject)); + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } + /** + * Test query parameter(s) + * Test query parameter(s) + * @param queryObject (optional) + * @return a {@code String} + * @throws ApiException if fails to make API call + */ + public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/query/style_form/explode_true/object/allOf".replaceAll("\\{format\\}","json"); + + // query params + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "query_object", queryObject)); + + + + + final String[] localVarAccepts = { + "text/plain" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + + final String[] localVarContentTypes = { + + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + + String[] localVarAuthNames = new String[] { }; + + GenericType localVarReturnType = new GenericType() {}; + return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); + } } diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/StoreApi.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/StoreApi.java deleted file mode 100644 index 0efae2a42a2..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/api/StoreApi.java +++ /dev/null @@ -1,204 +0,0 @@ -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiClient; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; - -import javax.ws.rs.core.GenericType; - -import org.openapitools.client.model.Order; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StoreApi { - private ApiClient apiClient; - - public StoreApi() { - this(Configuration.getDefaultApiClient()); - } - - public StoreApi(ApiClient apiClient) { - this.apiClient = apiClient; - } - - public ApiClient getApiClient() { - return apiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.apiClient = apiClient; - } - - /** - * Delete purchase order by ID - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * @param orderId ID of the order that needs to be deleted (required) - * @throws ApiException if fails to make API call - */ - public void deleteOrder(String orderId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'orderId' is set - if (orderId == null) { - throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder"); - } - - // create path and map variables - String localVarPath = "/store/order/{order_id}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - - apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null); - } - /** - * Returns pet inventories by status - * Returns a map of status codes to quantities - * @return a {@code Map} - * @throws ApiException if fails to make API call - */ - public Map getInventory() throws ApiException { - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { "api_key" }; - - GenericType> localVarReturnType = new GenericType>() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Find purchase order by ID - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * @param orderId ID of pet that needs to be fetched (required) - * @return a {@code Order} - * @throws ApiException if fails to make API call - */ - public Order getOrderById(Long orderId) throws ApiException { - Object localVarPostBody = null; - - // verify the required parameter 'orderId' is set - if (orderId == null) { - throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById"); - } - - // create path and map variables - String localVarPath = "/store/order/{order_id}".replaceAll("\\{format\\}","json") - .replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/xml", "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } - /** - * Place an order for a pet - * - * @param order order placed for purchasing the pet (required) - * @return a {@code Order} - * @throws ApiException if fails to make API call - */ - public Order placeOrder(Order order) throws ApiException { - Object localVarPostBody = order; - - // verify the required parameter 'order' is set - if (order == null) { - throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"); - } - - // create path and map variables - String localVarPath = "/store/order".replaceAll("\\{format\\}","json"); - - // query params - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - - - - - final String[] localVarAccepts = { - "application/xml", "application/json" - }; - final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); - - String[] localVarAuthNames = new String[] { }; - - GenericType localVarReturnType = new GenericType() {}; - return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java index 8e03da2a679..3e77c69480d 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/Authentication.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/Authentication.java index 5c558b1d5ab..4df1c672327 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/Authentication.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/Authentication.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java index b2924cbe555..09f92fecfbc 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java index a0083b8cf98..0f1f505b7de 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/OAuth.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/OAuth.java deleted file mode 100644 index 0f145f8b23c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/OAuth.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.Pair; - -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OAuth implements Authentication { - private String accessToken; - - public String getAccessToken() { - return accessToken; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams) { - if (accessToken != null) { - headerParams.put("Authorization", "Bearer " + accessToken); - } - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/OAuthFlow.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/OAuthFlow.java deleted file mode 100644 index 5faf36c3934..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/auth/OAuthFlow.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -/** - * OAuth flows that are supported by this client - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public enum OAuthFlow { - ACCESS_CODE, //called authorizationCode in OpenAPI 3.0 - IMPLICIT, - PASSWORD, - APPLICATION //called clientCredentials in OpenAPI 3.0 -} diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java deleted file mode 100644 index bb18d6f5c2d..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * AdditionalPropertiesClass - */ -@JsonPropertyOrder({ - AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY, - AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdditionalPropertiesClass { - public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property"; - private Map mapProperty = new HashMap<>(); - - public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property"; - private Map> mapOfMapProperty = new HashMap<>(); - - public AdditionalPropertiesClass() { - } - - public AdditionalPropertiesClass mapProperty(Map mapProperty) { - - this.mapProperty = mapProperty; - return this; - } - - public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) { - if (this.mapProperty == null) { - this.mapProperty = new HashMap<>(); - } - this.mapProperty.put(key, mapPropertyItem); - return this; - } - - /** - * Get mapProperty - * @return mapProperty - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapProperty() { - return mapProperty; - } - - - @JsonProperty(JSON_PROPERTY_MAP_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapProperty(Map mapProperty) { - this.mapProperty = mapProperty; - } - - - public AdditionalPropertiesClass mapOfMapProperty(Map> mapOfMapProperty) { - - this.mapOfMapProperty = mapOfMapProperty; - return this; - } - - public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map mapOfMapPropertyItem) { - if (this.mapOfMapProperty == null) { - this.mapOfMapProperty = new HashMap<>(); - } - this.mapOfMapProperty.put(key, mapOfMapPropertyItem); - return this; - } - - /** - * Get mapOfMapProperty - * @return mapOfMapProperty - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapOfMapProperty() { - return mapOfMapProperty; - } - - - @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapOfMapProperty(Map> mapOfMapProperty) { - this.mapOfMapProperty = mapOfMapProperty; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; - return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) && - Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty); - } - - @Override - public int hashCode() { - return Objects.hash(mapProperty, mapOfMapProperty); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AdditionalPropertiesClass {\n"); - sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n"); - sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java deleted file mode 100644 index ff55e37f2d7..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/AllOfWithSingleRef.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.SingleRefType; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * AllOfWithSingleRef - */ -@JsonPropertyOrder({ - AllOfWithSingleRef.JSON_PROPERTY_USERNAME, - AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AllOfWithSingleRef { - public static final String JSON_PROPERTY_USERNAME = "username"; - private String username; - - public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType"; - private SingleRefType singleRefType; - - public AllOfWithSingleRef() { - } - - public AllOfWithSingleRef username(String username) { - - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getUsername() { - return username; - } - - - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsername(String username) { - this.username = username; - } - - - public AllOfWithSingleRef singleRefType(SingleRefType singleRefType) { - - this.singleRefType = singleRefType; - return this; - } - - /** - * Get singleRefType - * @return singleRefType - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public SingleRefType getSingleRefType() { - return singleRefType; - } - - - @JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSingleRefType(SingleRefType singleRefType) { - this.singleRefType = singleRefType; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o; - return Objects.equals(this.username, allOfWithSingleRef.username) && - Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType); - } - - @Override - public int hashCode() { - return Objects.hash(username, singleRefType); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class AllOfWithSingleRef {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Animal.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Animal.java deleted file mode 100644 index fd52da7ba5e..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Animal.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Animal - */ -@JsonPropertyOrder({ - Animal.JSON_PROPERTY_CLASS_NAME, - Animal.JSON_PROPERTY_COLOR -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonIgnoreProperties( - value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the className to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = Cat.class, name = "CAT"), - @JsonSubTypes.Type(value = Dog.class, name = "DOG"), -}) - -public class Animal { - public static final String JSON_PROPERTY_CLASS_NAME = "className"; - protected String className; - - public static final String JSON_PROPERTY_COLOR = "color"; - private String color = "red"; - - public Animal() { - } - - public Animal className(String className) { - - this.className = className; - return this; - } - - /** - * Get className - * @return className - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_CLASS_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getClassName() { - return className; - } - - - @JsonProperty(JSON_PROPERTY_CLASS_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setClassName(String className) { - this.className = className; - } - - - public Animal color(String color) { - - this.color = color; - return this; - } - - /** - * Get color - * @return color - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getColor() { - return color; - } - - - @JsonProperty(JSON_PROPERTY_COLOR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setColor(String color) { - this.color = color; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Animal animal = (Animal) o; - return Objects.equals(this.className, animal.className) && - Objects.equals(this.color, animal.color); - } - - @Override - public int hashCode() { - return Objects.hash(className, color); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Animal {\n"); - sb.append(" className: ").append(toIndentedString(className)).append("\n"); - sb.append(" color: ").append(toIndentedString(color)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java deleted file mode 100644 index cdcef4d30a5..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * ArrayOfArrayOfNumberOnly - */ -@JsonPropertyOrder({ - ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArrayOfArrayOfNumberOnly { - public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; - private List> arrayArrayNumber; - - public ArrayOfArrayOfNumberOnly() { - } - - public ArrayOfArrayOfNumberOnly arrayArrayNumber(List> arrayArrayNumber) { - - this.arrayArrayNumber = arrayArrayNumber; - return this; - } - - public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List arrayArrayNumberItem) { - if (this.arrayArrayNumber == null) { - this.arrayArrayNumber = new ArrayList<>(); - } - this.arrayArrayNumber.add(arrayArrayNumberItem); - return this; - } - - /** - * Get arrayArrayNumber - * @return arrayArrayNumber - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List> getArrayArrayNumber() { - return arrayArrayNumber; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayNumber(List> arrayArrayNumber) { - this.arrayArrayNumber = arrayArrayNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o; - return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber); - } - - @Override - public int hashCode() { - return Objects.hash(arrayArrayNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfArrayOfNumberOnly {\n"); - sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayTest.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayTest.java deleted file mode 100644 index 2d1949e990f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayTest.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * ArrayTest - */ -@JsonPropertyOrder({ - ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING, - ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER, - ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArrayTest { - public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; - private List arrayOfString; - - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer"; - private List> arrayArrayOfInteger; - - public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; - private List> arrayArrayOfModel; - - public ArrayTest() { - } - - public ArrayTest arrayOfString(List arrayOfString) { - - this.arrayOfString = arrayOfString; - return this; - } - - public ArrayTest addArrayOfStringItem(String arrayOfStringItem) { - if (this.arrayOfString == null) { - this.arrayOfString = new ArrayList<>(); - } - this.arrayOfString.add(arrayOfStringItem); - return this; - } - - /** - * Get arrayOfString - * @return arrayOfString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getArrayOfString() { - return arrayOfString; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayOfString(List arrayOfString) { - this.arrayOfString = arrayOfString; - } - - - public ArrayTest arrayArrayOfInteger(List> arrayArrayOfInteger) { - - this.arrayArrayOfInteger = arrayArrayOfInteger; - return this; - } - - public ArrayTest addArrayArrayOfIntegerItem(List arrayArrayOfIntegerItem) { - if (this.arrayArrayOfInteger == null) { - this.arrayArrayOfInteger = new ArrayList<>(); - } - this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem); - return this; - } - - /** - * Get arrayArrayOfInteger - * @return arrayArrayOfInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List> getArrayArrayOfInteger() { - return arrayArrayOfInteger; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfInteger(List> arrayArrayOfInteger) { - this.arrayArrayOfInteger = arrayArrayOfInteger; - } - - - public ArrayTest arrayArrayOfModel(List> arrayArrayOfModel) { - - this.arrayArrayOfModel = arrayArrayOfModel; - return this; - } - - public ArrayTest addArrayArrayOfModelItem(List arrayArrayOfModelItem) { - if (this.arrayArrayOfModel == null) { - this.arrayArrayOfModel = new ArrayList<>(); - } - this.arrayArrayOfModel.add(arrayArrayOfModelItem); - return this; - } - - /** - * Get arrayArrayOfModel - * @return arrayArrayOfModel - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List> getArrayArrayOfModel() { - return arrayArrayOfModel; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayArrayOfModel(List> arrayArrayOfModel) { - this.arrayArrayOfModel = arrayArrayOfModel; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ArrayTest arrayTest = (ArrayTest) o; - return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && - Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && - Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); - } - - @Override - public int hashCode() { - return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ArrayTest {\n"); - sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); - sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); - sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Bird.java similarity index 54% rename from samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java rename to samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Bird.java index 9f25b2a6d30..1e3195e9bdd 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ReadOnlyFirst.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Bird.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -24,69 +24,72 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; /** - * ReadOnlyFirst + * Bird */ @JsonPropertyOrder({ - ReadOnlyFirst.JSON_PROPERTY_BAR, - ReadOnlyFirst.JSON_PROPERTY_BAZ + Bird.JSON_PROPERTY_SIZE, + Bird.JSON_PROPERTY_COLOR }) @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReadOnlyFirst { - public static final String JSON_PROPERTY_BAR = "bar"; - private String bar; +public class Bird { + public static final String JSON_PROPERTY_SIZE = "size"; + private String size; - public static final String JSON_PROPERTY_BAZ = "baz"; - private String baz; + public static final String JSON_PROPERTY_COLOR = "color"; + private String color; - public ReadOnlyFirst() { + public Bird() { } - @JsonCreator - public ReadOnlyFirst( - @JsonProperty(JSON_PROPERTY_BAR) String bar - ) { - this(); - this.bar = bar; - } - - /** - * Get bar - * @return bar - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBar() { - return bar; - } - - - - - public ReadOnlyFirst baz(String baz) { + public Bird size(String size) { - this.baz = baz; + this.size = size; return this; } /** - * Get baz - * @return baz + * Get size + * @return size **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BAZ) + @JsonProperty(JSON_PROPERTY_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public String getBaz() { - return baz; + public String getSize() { + return size; } - @JsonProperty(JSON_PROPERTY_BAZ) + @JsonProperty(JSON_PROPERTY_SIZE) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBaz(String baz) { - this.baz = baz; + public void setSize(String size) { + this.size = size; + } + + + public Bird color(String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getColor() { + return color; + } + + + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColor(String color) { + this.color = color; } @Override @@ -97,22 +100,22 @@ public class ReadOnlyFirst { if (o == null || getClass() != o.getClass()) { return false; } - ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o; - return Objects.equals(this.bar, readOnlyFirst.bar) && - Objects.equals(this.baz, readOnlyFirst.baz); + Bird bird = (Bird) o; + return Objects.equals(this.size, bird.size) && + Objects.equals(this.color, bird.color); } @Override public int hashCode() { - return Objects.hash(bar, baz); + return Objects.hash(size, color); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ReadOnlyFirst {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" baz: ").append(toIndentedString(baz)).append("\n"); + sb.append("class Bird {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Capitalization.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Capitalization.java deleted file mode 100644 index ed4f3970651..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Capitalization.java +++ /dev/null @@ -1,263 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Capitalization - */ -@JsonPropertyOrder({ - Capitalization.JSON_PROPERTY_SMALL_CAMEL, - Capitalization.JSON_PROPERTY_CAPITAL_CAMEL, - Capitalization.JSON_PROPERTY_SMALL_SNAKE, - Capitalization.JSON_PROPERTY_CAPITAL_SNAKE, - Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS, - Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Capitalization { - public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; - private String smallCamel; - - public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel"; - private String capitalCamel; - - public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake"; - private String smallSnake; - - public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake"; - private String capitalSnake; - - public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points"; - private String scAETHFlowPoints; - - public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; - private String ATT_NAME; - - public Capitalization() { - } - - public Capitalization smallCamel(String smallCamel) { - - this.smallCamel = smallCamel; - return this; - } - - /** - * Get smallCamel - * @return smallCamel - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSmallCamel() { - return smallCamel; - } - - - @JsonProperty(JSON_PROPERTY_SMALL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmallCamel(String smallCamel) { - this.smallCamel = smallCamel; - } - - - public Capitalization capitalCamel(String capitalCamel) { - - this.capitalCamel = capitalCamel; - return this; - } - - /** - * Get capitalCamel - * @return capitalCamel - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCapitalCamel() { - return capitalCamel; - } - - - @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCapitalCamel(String capitalCamel) { - this.capitalCamel = capitalCamel; - } - - - public Capitalization smallSnake(String smallSnake) { - - this.smallSnake = smallSnake; - return this; - } - - /** - * Get smallSnake - * @return smallSnake - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSmallSnake() { - return smallSnake; - } - - - @JsonProperty(JSON_PROPERTY_SMALL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSmallSnake(String smallSnake) { - this.smallSnake = smallSnake; - } - - - public Capitalization capitalSnake(String capitalSnake) { - - this.capitalSnake = capitalSnake; - return this; - } - - /** - * Get capitalSnake - * @return capitalSnake - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getCapitalSnake() { - return capitalSnake; - } - - - @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCapitalSnake(String capitalSnake) { - this.capitalSnake = capitalSnake; - } - - - public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { - - this.scAETHFlowPoints = scAETHFlowPoints; - return this; - } - - /** - * Get scAETHFlowPoints - * @return scAETHFlowPoints - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getScAETHFlowPoints() { - return scAETHFlowPoints; - } - - - @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setScAETHFlowPoints(String scAETHFlowPoints) { - this.scAETHFlowPoints = scAETHFlowPoints; - } - - - public Capitalization ATT_NAME(String ATT_NAME) { - - this.ATT_NAME = ATT_NAME; - return this; - } - - /** - * Name of the pet - * @return ATT_NAME - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getATTNAME() { - return ATT_NAME; - } - - - @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setATTNAME(String ATT_NAME) { - this.ATT_NAME = ATT_NAME; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Capitalization capitalization = (Capitalization) o; - return Objects.equals(this.smallCamel, capitalization.smallCamel) && - Objects.equals(this.capitalCamel, capitalization.capitalCamel) && - Objects.equals(this.smallSnake, capitalization.smallSnake) && - Objects.equals(this.capitalSnake, capitalization.capitalSnake) && - Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && - Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); - } - - @Override - public int hashCode() { - return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Capitalization {\n"); - sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n"); - sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n"); - sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n"); - sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n"); - sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n"); - sb.append(" ATT_NAME: ").append(toIndentedString(ATT_NAME)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Cat.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Cat.java deleted file mode 100644 index e9c3b88dd90..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Cat.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Animal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Cat - */ -@JsonPropertyOrder({ - Cat.JSON_PROPERTY_DECLAWED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonIgnoreProperties( - value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the className to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) - -public class Cat extends Animal { - public static final String JSON_PROPERTY_DECLAWED = "declawed"; - private Boolean declawed; - - public Cat() { - - } - - public Cat declawed(Boolean declawed) { - - this.declawed = declawed; - return this; - } - - /** - * Get declawed - * @return declawed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getDeclawed() { - return declawed; - } - - - @JsonProperty(JSON_PROPERTY_DECLAWED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeclawed(Boolean declawed) { - this.declawed = declawed; - } - - @Override - public Cat className(String className) { - this.setClassName(className); - return this; - } - - @Override - public Cat color(String color) { - this.setColor(color); - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Cat cat = (Cat) o; - return Objects.equals(this.declawed, cat.declawed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(declawed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Cat {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Category.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Category.java index a599f6689ed..29d956d6cb7 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Category.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Category.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -36,7 +36,7 @@ public class Category { private Long id; public static final String JSON_PROPERTY_NAME = "name"; - private String name = "default-name"; + private String name; public Category() { } @@ -77,9 +77,9 @@ public class Category { * Get name * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public String getName() { return name; @@ -87,7 +87,7 @@ public class Category { @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public void setName(String name) { this.name = name; } diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ChildWithNullable.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ChildWithNullable.java deleted file mode 100644 index 808a97496f3..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ChildWithNullable.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.ParentWithNullable; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * ChildWithNullable - */ -@JsonPropertyOrder({ - ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) - -public class ChildWithNullable extends ParentWithNullable { - public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty"; - private String otherProperty; - - public ChildWithNullable() { - - } - - public ChildWithNullable otherProperty(String otherProperty) { - - this.otherProperty = otherProperty; - return this; - } - - /** - * Get otherProperty - * @return otherProperty - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getOtherProperty() { - return otherProperty; - } - - - @JsonProperty(JSON_PROPERTY_OTHER_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOtherProperty(String otherProperty) { - this.otherProperty = otherProperty; - } - - @Override - public ChildWithNullable type(TypeEnum type) { - this.setType(type); - return this; - } - - @Override - public ChildWithNullable nullableProperty(String nullableProperty) { - this.setNullableProperty(nullableProperty); - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ChildWithNullable childWithNullable = (ChildWithNullable) o; - return Objects.equals(this.otherProperty, childWithNullable.otherProperty) && - super.equals(o); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(otherProperty, super.hashCode()); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChildWithNullable {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ClassModel.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ClassModel.java deleted file mode 100644 index f5db7231aef..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ClassModel.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Model for testing model with \"_class\" property - */ -@JsonPropertyOrder({ - ClassModel.JSON_PROPERTY_PROPERTY_CLASS -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ClassModel { - public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; - private String propertyClass; - - public ClassModel() { - } - - public ClassModel propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPropertyClass() { - return propertyClass; - } - - - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ClassModel classModel = (ClassModel) o; - return Objects.equals(this.propertyClass, classModel.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ClassModel {\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Client.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Client.java deleted file mode 100644 index 764697f4191..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Client.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Client - */ -@JsonPropertyOrder({ - Client.JSON_PROPERTY_CLIENT -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Client { - public static final String JSON_PROPERTY_CLIENT = "client"; - private String client; - - public Client() { - } - - public Client client(String client) { - - this.client = client; - return this; - } - - /** - * Get client - * @return client - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CLIENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getClient() { - return client; - } - - - @JsonProperty(JSON_PROPERTY_CLIENT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setClient(String client) { - this.client = client; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Client client = (Client) o; - return Objects.equals(this.client, client.client); - } - - @Override - public int hashCode() { - return Objects.hash(client); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Client {\n"); - sb.append(" client: ").append(toIndentedString(client)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DataQuery.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DataQuery.java new file mode 100644 index 00000000000..5f1c039d516 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DataQuery.java @@ -0,0 +1,187 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Query; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * DataQuery + */ +@JsonPropertyOrder({ + DataQuery.JSON_PROPERTY_SUFFIX, + DataQuery.JSON_PROPERTY_TEXT, + DataQuery.JSON_PROPERTY_DATE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DataQuery extends Query { + public static final String JSON_PROPERTY_SUFFIX = "suffix"; + private String suffix; + + public static final String JSON_PROPERTY_TEXT = "text"; + private String text; + + public static final String JSON_PROPERTY_DATE = "date"; + private OffsetDateTime date; + + public DataQuery() { + + } + + public DataQuery suffix(String suffix) { + + this.suffix = suffix; + return this; + } + + /** + * test suffix + * @return suffix + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSuffix() { + return suffix; + } + + + @JsonProperty(JSON_PROPERTY_SUFFIX) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSuffix(String suffix) { + this.suffix = suffix; + } + + + public DataQuery text(String text) { + + this.text = text; + return this; + } + + /** + * Some text containing white spaces + * @return text + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getText() { + return text; + } + + + @JsonProperty(JSON_PROPERTY_TEXT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setText(String text) { + this.text = text; + } + + + public DataQuery date(OffsetDateTime date) { + + this.date = date; + return this; + } + + /** + * A date + * @return date + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public OffsetDateTime getDate() { + return date; + } + + + @JsonProperty(JSON_PROPERTY_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDate(OffsetDateTime date) { + this.date = date; + } + + @Override + public DataQuery id(Long id) { + this.setId(id); + return this; + } + + @Override + public DataQuery outcomes(List outcomes) { + this.setOutcomes(outcomes); + return this; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DataQuery dataQuery = (DataQuery) o; + return Objects.equals(this.suffix, dataQuery.suffix) && + Objects.equals(this.text, dataQuery.text) && + Objects.equals(this.date, dataQuery.date) && + super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(suffix, text, date, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DataQuery {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DefaultValue.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DefaultValue.java new file mode 100644 index 00000000000..1365a5fcb04 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DefaultValue.java @@ -0,0 +1,471 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * to test the default value of properties + */ +@JsonPropertyOrder({ + DefaultValue.JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_INTEGER_DEFAULT, + DefaultValue.JSON_PROPERTY_ARRAY_STRING, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_NULLABLE, + DefaultValue.JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE, + DefaultValue.JSON_PROPERTY_STRING_NULLABLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class DefaultValue { + public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT = "array_string_enum_ref_default"; + private List arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE)); + + /** + * Gets or Sets arrayStringEnumDefault + */ + public enum ArrayStringEnumDefaultEnum { + SUCCESS("success"), + + FAILURE("failure"), + + UNCLASSIFIED("unclassified"); + + private String value; + + ArrayStringEnumDefaultEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static ArrayStringEnumDefaultEnum fromValue(String value) { + for (ArrayStringEnumDefaultEnum b : ArrayStringEnumDefaultEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT = "array_string_enum_default"; + private List arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE)); + + public static final String JSON_PROPERTY_ARRAY_STRING_DEFAULT = "array_string_default"; + private List arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped")); + + public static final String JSON_PROPERTY_ARRAY_INTEGER_DEFAULT = "array_integer_default"; + private List arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3)); + + public static final String JSON_PROPERTY_ARRAY_STRING = "array_string"; + private List arrayString; + + public static final String JSON_PROPERTY_ARRAY_STRING_NULLABLE = "array_string_nullable"; + private JsonNullable> arrayStringNullable = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE = "array_string_extension_nullable"; + private JsonNullable> arrayStringExtensionNullable = JsonNullable.>undefined(); + + public static final String JSON_PROPERTY_STRING_NULLABLE = "string_nullable"; + private JsonNullable stringNullable = JsonNullable.undefined(); + + public DefaultValue() { + } + + public DefaultValue arrayStringEnumRefDefault(List arrayStringEnumRefDefault) { + + this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; + return this; + } + + public DefaultValue addArrayStringEnumRefDefaultItem(StringEnumRef arrayStringEnumRefDefaultItem) { + if (this.arrayStringEnumRefDefault == null) { + this.arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE)); + } + this.arrayStringEnumRefDefault.add(arrayStringEnumRefDefaultItem); + return this; + } + + /** + * Get arrayStringEnumRefDefault + * @return arrayStringEnumRefDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayStringEnumRefDefault() { + return arrayStringEnumRefDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayStringEnumRefDefault(List arrayStringEnumRefDefault) { + this.arrayStringEnumRefDefault = arrayStringEnumRefDefault; + } + + + public DefaultValue arrayStringEnumDefault(List arrayStringEnumDefault) { + + this.arrayStringEnumDefault = arrayStringEnumDefault; + return this; + } + + public DefaultValue addArrayStringEnumDefaultItem(ArrayStringEnumDefaultEnum arrayStringEnumDefaultItem) { + if (this.arrayStringEnumDefault == null) { + this.arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE)); + } + this.arrayStringEnumDefault.add(arrayStringEnumDefaultItem); + return this; + } + + /** + * Get arrayStringEnumDefault + * @return arrayStringEnumDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayStringEnumDefault() { + return arrayStringEnumDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayStringEnumDefault(List arrayStringEnumDefault) { + this.arrayStringEnumDefault = arrayStringEnumDefault; + } + + + public DefaultValue arrayStringDefault(List arrayStringDefault) { + + this.arrayStringDefault = arrayStringDefault; + return this; + } + + public DefaultValue addArrayStringDefaultItem(String arrayStringDefaultItem) { + if (this.arrayStringDefault == null) { + this.arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped")); + } + this.arrayStringDefault.add(arrayStringDefaultItem); + return this; + } + + /** + * Get arrayStringDefault + * @return arrayStringDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayStringDefault() { + return arrayStringDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayStringDefault(List arrayStringDefault) { + this.arrayStringDefault = arrayStringDefault; + } + + + public DefaultValue arrayIntegerDefault(List arrayIntegerDefault) { + + this.arrayIntegerDefault = arrayIntegerDefault; + return this; + } + + public DefaultValue addArrayIntegerDefaultItem(Integer arrayIntegerDefaultItem) { + if (this.arrayIntegerDefault == null) { + this.arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3)); + } + this.arrayIntegerDefault.add(arrayIntegerDefaultItem); + return this; + } + + /** + * Get arrayIntegerDefault + * @return arrayIntegerDefault + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayIntegerDefault() { + return arrayIntegerDefault; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayIntegerDefault(List arrayIntegerDefault) { + this.arrayIntegerDefault = arrayIntegerDefault; + } + + + public DefaultValue arrayString(List arrayString) { + + this.arrayString = arrayString; + return this; + } + + public DefaultValue addArrayStringItem(String arrayStringItem) { + if (this.arrayString == null) { + this.arrayString = new ArrayList<>(); + } + this.arrayString.add(arrayStringItem); + return this; + } + + /** + * Get arrayString + * @return arrayString + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ARRAY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getArrayString() { + return arrayString; + } + + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setArrayString(List arrayString) { + this.arrayString = arrayString; + } + + + public DefaultValue arrayStringNullable(List arrayStringNullable) { + this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); + + return this; + } + + public DefaultValue addArrayStringNullableItem(String arrayStringNullableItem) { + if (this.arrayStringNullable == null || !this.arrayStringNullable.isPresent()) { + this.arrayStringNullable = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayStringNullable.get().add(arrayStringNullableItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayStringNullable + * @return arrayStringNullable + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayStringNullable() { + return arrayStringNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayStringNullable_JsonNullable() { + return arrayStringNullable; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_NULLABLE) + public void setArrayStringNullable_JsonNullable(JsonNullable> arrayStringNullable) { + this.arrayStringNullable = arrayStringNullable; + } + + public void setArrayStringNullable(List arrayStringNullable) { + this.arrayStringNullable = JsonNullable.>of(arrayStringNullable); + } + + + public DefaultValue arrayStringExtensionNullable(List arrayStringExtensionNullable) { + this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); + + return this; + } + + public DefaultValue addArrayStringExtensionNullableItem(String arrayStringExtensionNullableItem) { + if (this.arrayStringExtensionNullable == null || !this.arrayStringExtensionNullable.isPresent()) { + this.arrayStringExtensionNullable = JsonNullable.>of(new ArrayList<>()); + } + try { + this.arrayStringExtensionNullable.get().add(arrayStringExtensionNullableItem); + } catch (java.util.NoSuchElementException e) { + // this can never happen, as we make sure above that the value is present + } + return this; + } + + /** + * Get arrayStringExtensionNullable + * @return arrayStringExtensionNullable + **/ + @javax.annotation.Nullable + @JsonIgnore + + public List getArrayStringExtensionNullable() { + return arrayStringExtensionNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable> getArrayStringExtensionNullable_JsonNullable() { + return arrayStringExtensionNullable; + } + + @JsonProperty(JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE) + public void setArrayStringExtensionNullable_JsonNullable(JsonNullable> arrayStringExtensionNullable) { + this.arrayStringExtensionNullable = arrayStringExtensionNullable; + } + + public void setArrayStringExtensionNullable(List arrayStringExtensionNullable) { + this.arrayStringExtensionNullable = JsonNullable.>of(arrayStringExtensionNullable); + } + + + public DefaultValue stringNullable(String stringNullable) { + this.stringNullable = JsonNullable.of(stringNullable); + + return this; + } + + /** + * Get stringNullable + * @return stringNullable + **/ + @javax.annotation.Nullable + @JsonIgnore + + public String getStringNullable() { + return stringNullable.orElse(null); + } + + @JsonProperty(JSON_PROPERTY_STRING_NULLABLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public JsonNullable getStringNullable_JsonNullable() { + return stringNullable; + } + + @JsonProperty(JSON_PROPERTY_STRING_NULLABLE) + public void setStringNullable_JsonNullable(JsonNullable stringNullable) { + this.stringNullable = stringNullable; + } + + public void setStringNullable(String stringNullable) { + this.stringNullable = JsonNullable.of(stringNullable); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DefaultValue defaultValue = (DefaultValue) o; + return Objects.equals(this.arrayStringEnumRefDefault, defaultValue.arrayStringEnumRefDefault) && + Objects.equals(this.arrayStringEnumDefault, defaultValue.arrayStringEnumDefault) && + Objects.equals(this.arrayStringDefault, defaultValue.arrayStringDefault) && + Objects.equals(this.arrayIntegerDefault, defaultValue.arrayIntegerDefault) && + Objects.equals(this.arrayString, defaultValue.arrayString) && + equalsNullable(this.arrayStringNullable, defaultValue.arrayStringNullable) && + equalsNullable(this.arrayStringExtensionNullable, defaultValue.arrayStringExtensionNullable) && + equalsNullable(this.stringNullable, defaultValue.stringNullable); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(arrayStringEnumRefDefault, arrayStringEnumDefault, arrayStringDefault, arrayIntegerDefault, arrayString, hashCodeNullable(arrayStringNullable), hashCodeNullable(arrayStringExtensionNullable), hashCodeNullable(stringNullable)); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DefaultValue {\n"); + sb.append(" arrayStringEnumRefDefault: ").append(toIndentedString(arrayStringEnumRefDefault)).append("\n"); + sb.append(" arrayStringEnumDefault: ").append(toIndentedString(arrayStringEnumDefault)).append("\n"); + sb.append(" arrayStringDefault: ").append(toIndentedString(arrayStringDefault)).append("\n"); + sb.append(" arrayIntegerDefault: ").append(toIndentedString(arrayIntegerDefault)).append("\n"); + sb.append(" arrayString: ").append(toIndentedString(arrayString)).append("\n"); + sb.append(" arrayStringNullable: ").append(toIndentedString(arrayStringNullable)).append("\n"); + sb.append(" arrayStringExtensionNullable: ").append(toIndentedString(arrayStringExtensionNullable)).append("\n"); + sb.append(" stringNullable: ").append(toIndentedString(stringNullable)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DeprecatedObject.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DeprecatedObject.java deleted file mode 100644 index 73cccb0d2d3..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/DeprecatedObject.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * DeprecatedObject - * @deprecated - */ -@Deprecated -@JsonPropertyOrder({ - DeprecatedObject.JSON_PROPERTY_NAME -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DeprecatedObject { - public static final String JSON_PROPERTY_NAME = "name"; - private String name; - - public DeprecatedObject() { - } - - public DeprecatedObject name(String name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - DeprecatedObject deprecatedObject = (DeprecatedObject) o; - return Objects.equals(this.name, deprecatedObject.name); - } - - @Override - public int hashCode() { - return Objects.hash(name); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DeprecatedObject {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Dog.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Dog.java deleted file mode 100644 index f77566c7746..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Dog.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Animal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Dog - */ -@JsonPropertyOrder({ - Dog.JSON_PROPERTY_BREED -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonIgnoreProperties( - value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the className to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true) - -public class Dog extends Animal { - public static final String JSON_PROPERTY_BREED = "breed"; - private String breed; - - public Dog() { - - } - - public Dog breed(String breed) { - - this.breed = breed; - return this; - } - - /** - * Get breed - * @return breed - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBreed() { - return breed; - } - - - @JsonProperty(JSON_PROPERTY_BREED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBreed(String breed) { - this.breed = breed; - } - - @Override - public Dog className(String className) { - this.setClassName(className); - return this; - } - - @Override - public Dog color(String color) { - this.setColor(color); - return this; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Dog dog = (Dog) o; - return Objects.equals(this.breed, dog.breed) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(breed, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Dog {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumArrays.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumArrays.java deleted file mode 100644 index f9cc8a9a54f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumArrays.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * EnumArrays - */ -@JsonPropertyOrder({ - EnumArrays.JSON_PROPERTY_JUST_SYMBOL, - EnumArrays.JSON_PROPERTY_ARRAY_ENUM -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class EnumArrays { - /** - * Gets or Sets justSymbol - */ - public enum JustSymbolEnum { - GREATER_THAN_OR_EQUAL_TO(">="), - - DOLLAR("$"); - - private String value; - - JustSymbolEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static JustSymbolEnum fromValue(String value) { - for (JustSymbolEnum b : JustSymbolEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; - private JustSymbolEnum justSymbol; - - /** - * Gets or Sets arrayEnum - */ - public enum ArrayEnumEnum { - FISH("fish"), - - CRAB("crab"); - - private String value; - - ArrayEnumEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static ArrayEnumEnum fromValue(String value) { - for (ArrayEnumEnum b : ArrayEnumEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; - private List arrayEnum; - - public EnumArrays() { - } - - public EnumArrays justSymbol(JustSymbolEnum justSymbol) { - - this.justSymbol = justSymbol; - return this; - } - - /** - * Get justSymbol - * @return justSymbol - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JustSymbolEnum getJustSymbol() { - return justSymbol; - } - - - @JsonProperty(JSON_PROPERTY_JUST_SYMBOL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJustSymbol(JustSymbolEnum justSymbol) { - this.justSymbol = justSymbol; - } - - - public EnumArrays arrayEnum(List arrayEnum) { - - this.arrayEnum = arrayEnum; - return this; - } - - public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) { - if (this.arrayEnum == null) { - this.arrayEnum = new ArrayList<>(); - } - this.arrayEnum.add(arrayEnumItem); - return this; - } - - /** - * Get arrayEnum - * @return arrayEnum - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getArrayEnum() { - return arrayEnum; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayEnum(List arrayEnum) { - this.arrayEnum = arrayEnum; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumArrays enumArrays = (EnumArrays) o; - return Objects.equals(this.justSymbol, enumArrays.justSymbol) && - Objects.equals(this.arrayEnum, enumArrays.arrayEnum); - } - - @Override - public int hashCode() { - return Objects.hash(justSymbol, arrayEnum); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumArrays {\n"); - sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n"); - sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumTest.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumTest.java deleted file mode 100644 index dc4dbac1001..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumTest.java +++ /dev/null @@ -1,499 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.OuterEnum; -import org.openapitools.client.model.OuterEnumDefaultValue; -import org.openapitools.client.model.OuterEnumInteger; -import org.openapitools.client.model.OuterEnumIntegerDefaultValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * EnumTest - */ -@JsonPropertyOrder({ - EnumTest.JSON_PROPERTY_ENUM_STRING, - EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, - EnumTest.JSON_PROPERTY_ENUM_INTEGER, - EnumTest.JSON_PROPERTY_ENUM_NUMBER, - EnumTest.JSON_PROPERTY_OUTER_ENUM, - EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER, - EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE, - EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE -}) -@JsonTypeName("Enum_Test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class EnumTest { - /** - * Gets or Sets enumString - */ - public enum EnumStringEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringEnum fromValue(String value) { - for (EnumStringEnum b : EnumStringEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; - private EnumStringEnum enumString; - - /** - * Gets or Sets enumStringRequired - */ - public enum EnumStringRequiredEnum { - UPPER("UPPER"), - - LOWER("lower"), - - EMPTY(""); - - private String value; - - EnumStringRequiredEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumStringRequiredEnum fromValue(String value) { - for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; - private EnumStringRequiredEnum enumStringRequired; - - /** - * Gets or Sets enumInteger - */ - public enum EnumIntegerEnum { - NUMBER_1(1), - - NUMBER_MINUS_1(-1); - - private Integer value; - - EnumIntegerEnum(Integer value) { - this.value = value; - } - - @JsonValue - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumIntegerEnum fromValue(Integer value) { - for (EnumIntegerEnum b : EnumIntegerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; - private EnumIntegerEnum enumInteger; - - /** - * Gets or Sets enumNumber - */ - public enum EnumNumberEnum { - NUMBER_1_DOT_1(1.1), - - NUMBER_MINUS_1_DOT_2(-1.2); - - private Double value; - - EnumNumberEnum(Double value) { - this.value = value; - } - - @JsonValue - public Double getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static EnumNumberEnum fromValue(Double value) { - for (EnumNumberEnum b : EnumNumberEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number"; - private EnumNumberEnum enumNumber; - - public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; - private JsonNullable outerEnum = JsonNullable.undefined(); - - public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger"; - private OuterEnumInteger outerEnumInteger; - - public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue"; - private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED; - - public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue"; - private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0; - - public EnumTest() { - } - - public EnumTest enumString(EnumStringEnum enumString) { - - this.enumString = enumString; - return this; - } - - /** - * Get enumString - * @return enumString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public EnumStringEnum getEnumString() { - return enumString; - } - - - @JsonProperty(JSON_PROPERTY_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumString(EnumStringEnum enumString) { - this.enumString = enumString; - } - - - public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { - - this.enumStringRequired = enumStringRequired; - return this; - } - - /** - * Get enumStringRequired - * @return enumStringRequired - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public EnumStringRequiredEnum getEnumStringRequired() { - return enumStringRequired; - } - - - @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { - this.enumStringRequired = enumStringRequired; - } - - - public EnumTest enumInteger(EnumIntegerEnum enumInteger) { - - this.enumInteger = enumInteger; - return this; - } - - /** - * Get enumInteger - * @return enumInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public EnumIntegerEnum getEnumInteger() { - return enumInteger; - } - - - @JsonProperty(JSON_PROPERTY_ENUM_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumInteger(EnumIntegerEnum enumInteger) { - this.enumInteger = enumInteger; - } - - - public EnumTest enumNumber(EnumNumberEnum enumNumber) { - - this.enumNumber = enumNumber; - return this; - } - - /** - * Get enumNumber - * @return enumNumber - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public EnumNumberEnum getEnumNumber() { - return enumNumber; - } - - - @JsonProperty(JSON_PROPERTY_ENUM_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEnumNumber(EnumNumberEnum enumNumber) { - this.enumNumber = enumNumber; - } - - - public EnumTest outerEnum(OuterEnum outerEnum) { - this.outerEnum = JsonNullable.of(outerEnum); - - return this; - } - - /** - * Get outerEnum - * @return outerEnum - **/ - @javax.annotation.Nullable - @JsonIgnore - - public OuterEnum getOuterEnum() { - return outerEnum.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getOuterEnum_JsonNullable() { - return outerEnum; - } - - @JsonProperty(JSON_PROPERTY_OUTER_ENUM) - public void setOuterEnum_JsonNullable(JsonNullable outerEnum) { - this.outerEnum = outerEnum; - } - - public void setOuterEnum(OuterEnum outerEnum) { - this.outerEnum = JsonNullable.of(outerEnum); - } - - - public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) { - - this.outerEnumInteger = outerEnumInteger; - return this; - } - - /** - * Get outerEnumInteger - * @return outerEnumInteger - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OuterEnumInteger getOuterEnumInteger() { - return outerEnumInteger; - } - - - @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) { - this.outerEnumInteger = outerEnumInteger; - } - - - public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { - - this.outerEnumDefaultValue = outerEnumDefaultValue; - return this; - } - - /** - * Get outerEnumDefaultValue - * @return outerEnumDefaultValue - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OuterEnumDefaultValue getOuterEnumDefaultValue() { - return outerEnumDefaultValue; - } - - - @JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) { - this.outerEnumDefaultValue = outerEnumDefaultValue; - } - - - public EnumTest outerEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { - - this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - return this; - } - - /** - * Get outerEnumIntegerDefaultValue - * @return outerEnumIntegerDefaultValue - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() { - return outerEnumIntegerDefaultValue; - } - - - @JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setOuterEnumIntegerDefaultValue(OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) { - this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EnumTest enumTest = (EnumTest) o; - return Objects.equals(this.enumString, enumTest.enumString) && - Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && - Objects.equals(this.enumInteger, enumTest.enumInteger) && - Objects.equals(this.enumNumber, enumTest.enumNumber) && - equalsNullable(this.outerEnum, enumTest.outerEnum) && - Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) && - Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) && - Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EnumTest {\n"); - sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n"); - sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n"); - sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); - sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); - sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); - sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n"); - sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n"); - sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java deleted file mode 100644 index 1a6fbe6cb37..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FakeBigDecimalMap200Response.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * FakeBigDecimalMap200Response - */ -@JsonPropertyOrder({ - FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_ID, - FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_MAP -}) -@JsonTypeName("fakeBigDecimalMap_200_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FakeBigDecimalMap200Response { - public static final String JSON_PROPERTY_SOME_ID = "someId"; - private BigDecimal someId; - - public static final String JSON_PROPERTY_SOME_MAP = "someMap"; - private Map someMap = new HashMap<>(); - - public FakeBigDecimalMap200Response() { - } - - public FakeBigDecimalMap200Response someId(BigDecimal someId) { - - this.someId = someId; - return this; - } - - /** - * Get someId - * @return someId - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOME_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getSomeId() { - return someId; - } - - - @JsonProperty(JSON_PROPERTY_SOME_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSomeId(BigDecimal someId) { - this.someId = someId; - } - - - public FakeBigDecimalMap200Response someMap(Map someMap) { - - this.someMap = someMap; - return this; - } - - public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) { - if (this.someMap == null) { - this.someMap = new HashMap<>(); - } - this.someMap.put(key, someMapItem); - return this; - } - - /** - * Get someMap - * @return someMap - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOME_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getSomeMap() { - return someMap; - } - - - @JsonProperty(JSON_PROPERTY_SOME_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSomeMap(Map someMap) { - this.someMap = someMap; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o; - return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) && - Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap); - } - - @Override - public int hashCode() { - return Objects.hash(someId, someMap); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FakeBigDecimalMap200Response {\n"); - sb.append(" someId: ").append(toIndentedString(someId)).append("\n"); - sb.append(" someMap: ").append(toIndentedString(someMap)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java deleted file mode 100644 index 16917a03c9c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FileSchemaTestClass.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ModelFile; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * FileSchemaTestClass - */ -@JsonPropertyOrder({ - FileSchemaTestClass.JSON_PROPERTY_FILE, - FileSchemaTestClass.JSON_PROPERTY_FILES -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FileSchemaTestClass { - public static final String JSON_PROPERTY_FILE = "file"; - private ModelFile _file; - - public static final String JSON_PROPERTY_FILES = "files"; - private List files; - - public FileSchemaTestClass() { - } - - public FileSchemaTestClass _file(ModelFile _file) { - - this._file = _file; - return this; - } - - /** - * Get _file - * @return _file - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public ModelFile getFile() { - return _file; - } - - - @JsonProperty(JSON_PROPERTY_FILE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFile(ModelFile _file) { - this._file = _file; - } - - - public FileSchemaTestClass files(List files) { - - this.files = files; - return this; - } - - public FileSchemaTestClass addFilesItem(ModelFile filesItem) { - if (this.files == null) { - this.files = new ArrayList<>(); - } - this.files.add(filesItem); - return this; - } - - /** - * Get files - * @return files - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getFiles() { - return files; - } - - - @JsonProperty(JSON_PROPERTY_FILES) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFiles(List files) { - this.files = files; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; - return Objects.equals(this._file, fileSchemaTestClass._file) && - Objects.equals(this.files, fileSchemaTestClass.files); - } - - @Override - public int hashCode() { - return Objects.hash(_file, files); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FileSchemaTestClass {\n"); - sb.append(" _file: ").append(toIndentedString(_file)).append("\n"); - sb.append(" files: ").append(toIndentedString(files)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Foo.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Foo.java deleted file mode 100644 index 0ae068735bd..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Foo.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Foo - */ -@JsonPropertyOrder({ - Foo.JSON_PROPERTY_BAR -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Foo { - public static final String JSON_PROPERTY_BAR = "bar"; - private String bar = "bar"; - - public Foo() { - } - - public Foo bar(String bar) { - - this.bar = bar; - return this; - } - - /** - * Get bar - * @return bar - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBar() { - return bar; - } - - - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBar(String bar) { - this.bar = bar; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Foo foo = (Foo) o; - return Objects.equals(this.bar, foo.bar); - } - - @Override - public int hashCode() { - return Objects.hash(bar); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Foo {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java deleted file mode 100644 index 0626a5810e6..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Foo; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * FooGetDefaultResponse - */ -@JsonPropertyOrder({ - FooGetDefaultResponse.JSON_PROPERTY_STRING -}) -@JsonTypeName("_foo_get_default_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FooGetDefaultResponse { - public static final String JSON_PROPERTY_STRING = "string"; - private Foo string; - - public FooGetDefaultResponse() { - } - - public FooGetDefaultResponse string(Foo string) { - - this.string = string; - return this; - } - - /** - * Get string - * @return string - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Foo getString() { - return string; - } - - - @JsonProperty(JSON_PROPERTY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setString(Foo string) { - this.string = string; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o; - return Objects.equals(this.string, fooGetDefaultResponse.string); - } - - @Override - public int hashCode() { - return Objects.hash(string); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FooGetDefaultResponse {\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FormatTest.java deleted file mode 100644 index f9ddc4d4d29..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/FormatTest.java +++ /dev/null @@ -1,599 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.io.File; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.UUID; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * FormatTest - */ -@JsonPropertyOrder({ - FormatTest.JSON_PROPERTY_INTEGER, - FormatTest.JSON_PROPERTY_INT32, - FormatTest.JSON_PROPERTY_INT64, - FormatTest.JSON_PROPERTY_NUMBER, - FormatTest.JSON_PROPERTY_FLOAT, - FormatTest.JSON_PROPERTY_DOUBLE, - FormatTest.JSON_PROPERTY_DECIMAL, - FormatTest.JSON_PROPERTY_STRING, - FormatTest.JSON_PROPERTY_BYTE, - FormatTest.JSON_PROPERTY_BINARY, - FormatTest.JSON_PROPERTY_DATE, - FormatTest.JSON_PROPERTY_DATE_TIME, - FormatTest.JSON_PROPERTY_UUID, - FormatTest.JSON_PROPERTY_PASSWORD, - FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS, - FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER -}) -@JsonTypeName("format_test") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FormatTest { - public static final String JSON_PROPERTY_INTEGER = "integer"; - private Integer integer; - - public static final String JSON_PROPERTY_INT32 = "int32"; - private Integer int32; - - public static final String JSON_PROPERTY_INT64 = "int64"; - private Long int64; - - public static final String JSON_PROPERTY_NUMBER = "number"; - private BigDecimal number; - - public static final String JSON_PROPERTY_FLOAT = "float"; - private Float _float; - - public static final String JSON_PROPERTY_DOUBLE = "double"; - private Double _double; - - public static final String JSON_PROPERTY_DECIMAL = "decimal"; - private BigDecimal decimal; - - public static final String JSON_PROPERTY_STRING = "string"; - private String string; - - public static final String JSON_PROPERTY_BYTE = "byte"; - private byte[] _byte; - - public static final String JSON_PROPERTY_BINARY = "binary"; - private File binary; - - public static final String JSON_PROPERTY_DATE = "date"; - private LocalDate date; - - public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private OffsetDateTime dateTime; - - public static final String JSON_PROPERTY_UUID = "uuid"; - private UUID uuid; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits"; - private String patternWithDigits; - - public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter"; - private String patternWithDigitsAndDelimiter; - - public FormatTest() { - } - - public FormatTest integer(Integer integer) { - - this.integer = integer; - return this; - } - - /** - * Get integer - * minimum: 10 - * maximum: 100 - * @return integer - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getInteger() { - return integer; - } - - - @JsonProperty(JSON_PROPERTY_INTEGER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInteger(Integer integer) { - this.integer = integer; - } - - - public FormatTest int32(Integer int32) { - - this.int32 = int32; - return this; - } - - /** - * Get int32 - * minimum: 20 - * maximum: 200 - * @return int32 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INT32) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getInt32() { - return int32; - } - - - @JsonProperty(JSON_PROPERTY_INT32) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt32(Integer int32) { - this.int32 = int32; - } - - - public FormatTest int64(Long int64) { - - this.int64 = int64; - return this; - } - - /** - * Get int64 - * @return int64 - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INT64) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getInt64() { - return int64; - } - - - @JsonProperty(JSON_PROPERTY_INT64) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setInt64(Long int64) { - this.int64 = int64; - } - - - public FormatTest number(BigDecimal number) { - - this.number = number; - return this; - } - - /** - * Get number - * minimum: 32.1 - * maximum: 543.2 - * @return number - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public BigDecimal getNumber() { - return number; - } - - - @JsonProperty(JSON_PROPERTY_NUMBER) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setNumber(BigDecimal number) { - this.number = number; - } - - - public FormatTest _float(Float _float) { - - this._float = _float; - return this; - } - - /** - * Get _float - * minimum: 54.3 - * maximum: 987.6 - * @return _float - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FLOAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Float getFloat() { - return _float; - } - - - @JsonProperty(JSON_PROPERTY_FLOAT) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFloat(Float _float) { - this._float = _float; - } - - - public FormatTest _double(Double _double) { - - this._double = _double; - return this; - } - - /** - * Get _double - * minimum: 67.8 - * maximum: 123.4 - * @return _double - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DOUBLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Double getDouble() { - return _double; - } - - - @JsonProperty(JSON_PROPERTY_DOUBLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDouble(Double _double) { - this._double = _double; - } - - - public FormatTest decimal(BigDecimal decimal) { - - this.decimal = decimal; - return this; - } - - /** - * Get decimal - * @return decimal - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DECIMAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getDecimal() { - return decimal; - } - - - @JsonProperty(JSON_PROPERTY_DECIMAL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDecimal(BigDecimal decimal) { - this.decimal = decimal; - } - - - public FormatTest string(String string) { - - this.string = string; - return this; - } - - /** - * Get string - * @return string - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getString() { - return string; - } - - - @JsonProperty(JSON_PROPERTY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setString(String string) { - this.string = string; - } - - - public FormatTest _byte(byte[] _byte) { - - this._byte = _byte; - return this; - } - - /** - * Get _byte - * @return _byte - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_BYTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public byte[] getByte() { - return _byte; - } - - - @JsonProperty(JSON_PROPERTY_BYTE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setByte(byte[] _byte) { - this._byte = _byte; - } - - - public FormatTest binary(File binary) { - - this.binary = binary; - return this; - } - - /** - * Get binary - * @return binary - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BINARY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public File getBinary() { - return binary; - } - - - @JsonProperty(JSON_PROPERTY_BINARY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBinary(File binary) { - this.binary = binary; - } - - - public FormatTest date(LocalDate date) { - - this.date = date; - return this; - } - - /** - * Get date - * @return date - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public LocalDate getDate() { - return date; - } - - - @JsonProperty(JSON_PROPERTY_DATE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setDate(LocalDate date) { - this.date = date; - } - - - public FormatTest dateTime(OffsetDateTime dateTime) { - - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDateTime() { - return dateTime; - } - - - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - - public FormatTest uuid(UUID uuid) { - - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public UUID getUuid() { - return uuid; - } - - - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - - public FormatTest password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public String getPassword() { - return password; - } - - - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPassword(String password) { - this.password = password; - } - - - public FormatTest patternWithDigits(String patternWithDigits) { - - this.patternWithDigits = patternWithDigits; - return this; - } - - /** - * A string that is a 10 digit number. Can have leading zeros. - * @return patternWithDigits - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPatternWithDigits() { - return patternWithDigits; - } - - - @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPatternWithDigits(String patternWithDigits) { - this.patternWithDigits = patternWithDigits; - } - - - public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { - - this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - return this; - } - - /** - * A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - * @return patternWithDigitsAndDelimiter - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPatternWithDigitsAndDelimiter() { - return patternWithDigitsAndDelimiter; - } - - - @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) { - this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - FormatTest formatTest = (FormatTest) o; - return Objects.equals(this.integer, formatTest.integer) && - Objects.equals(this.int32, formatTest.int32) && - Objects.equals(this.int64, formatTest.int64) && - Objects.equals(this.number, formatTest.number) && - Objects.equals(this._float, formatTest._float) && - Objects.equals(this._double, formatTest._double) && - Objects.equals(this.decimal, formatTest.decimal) && - Objects.equals(this.string, formatTest.string) && - Arrays.equals(this._byte, formatTest._byte) && - Objects.equals(this.binary, formatTest.binary) && - Objects.equals(this.date, formatTest.date) && - Objects.equals(this.dateTime, formatTest.dateTime) && - Objects.equals(this.uuid, formatTest.uuid) && - Objects.equals(this.password, formatTest.password) && - Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) && - Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter); - } - - @Override - public int hashCode() { - return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class FormatTest {\n"); - sb.append(" integer: ").append(toIndentedString(integer)).append("\n"); - sb.append(" int32: ").append(toIndentedString(int32)).append("\n"); - sb.append(" int64: ").append(toIndentedString(int64)).append("\n"); - sb.append(" number: ").append(toIndentedString(number)).append("\n"); - sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); - sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); - sb.append(" decimal: ").append(toIndentedString(decimal)).append("\n"); - sb.append(" string: ").append(toIndentedString(string)).append("\n"); - sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n"); - sb.append(" binary: ").append(toIndentedString(binary)).append("\n"); - sb.append(" date: ").append(toIndentedString(date)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" password: ").append("*").append("\n"); - sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n"); - sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java deleted file mode 100644 index cdb08919cbf..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * HasOnlyReadOnly - */ -@JsonPropertyOrder({ - HasOnlyReadOnly.JSON_PROPERTY_BAR, - HasOnlyReadOnly.JSON_PROPERTY_FOO -}) -@JsonTypeName("hasOnlyReadOnly") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HasOnlyReadOnly { - public static final String JSON_PROPERTY_BAR = "bar"; - private String bar; - - public static final String JSON_PROPERTY_FOO = "foo"; - private String foo; - - public HasOnlyReadOnly() { - } - - @JsonCreator - public HasOnlyReadOnly( - @JsonProperty(JSON_PROPERTY_BAR) String bar, - @JsonProperty(JSON_PROPERTY_FOO) String foo - ) { - this(); - this.bar = bar; - this.foo = foo; - } - - /** - * Get bar - * @return bar - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BAR) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getBar() { - return bar; - } - - - - - /** - * Get foo - * @return foo - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FOO) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getFoo() { - return foo; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; - return Objects.equals(this.bar, hasOnlyReadOnly.bar) && - Objects.equals(this.foo, hasOnlyReadOnly.foo); - } - - @Override - public int hashCode() { - return Objects.hash(bar, foo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HasOnlyReadOnly {\n"); - sb.append(" bar: ").append(toIndentedString(bar)).append("\n"); - sb.append(" foo: ").append(toIndentedString(foo)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/HealthCheckResult.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/HealthCheckResult.java deleted file mode 100644 index b156198397f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/HealthCheckResult.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - */ -@JsonPropertyOrder({ - HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HealthCheckResult { - public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage"; - private JsonNullable nullableMessage = JsonNullable.undefined(); - - public HealthCheckResult() { - } - - public HealthCheckResult nullableMessage(String nullableMessage) { - this.nullableMessage = JsonNullable.of(nullableMessage); - - return this; - } - - /** - * Get nullableMessage - * @return nullableMessage - **/ - @javax.annotation.Nullable - @JsonIgnore - - public String getNullableMessage() { - return nullableMessage.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getNullableMessage_JsonNullable() { - return nullableMessage; - } - - @JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE) - public void setNullableMessage_JsonNullable(JsonNullable nullableMessage) { - this.nullableMessage = nullableMessage; - } - - public void setNullableMessage(String nullableMessage) { - this.nullableMessage = JsonNullable.of(nullableMessage); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - HealthCheckResult healthCheckResult = (HealthCheckResult) o; - return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(hashCodeNullable(nullableMessage)); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class HealthCheckResult {\n"); - sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/MapTest.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/MapTest.java deleted file mode 100644 index 4070e6e0d39..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/MapTest.java +++ /dev/null @@ -1,268 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * MapTest - */ -@JsonPropertyOrder({ - MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING, - MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING, - MapTest.JSON_PROPERTY_DIRECT_MAP, - MapTest.JSON_PROPERTY_INDIRECT_MAP -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MapTest { - public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; - private Map> mapMapOfString = new HashMap<>(); - - /** - * Gets or Sets inner - */ - public enum InnerEnum { - UPPER("UPPER"), - - LOWER("lower"); - - private String value; - - InnerEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static InnerEnum fromValue(String value) { - for (InnerEnum b : InnerEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string"; - private Map mapOfEnumString = new HashMap<>(); - - public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map"; - private Map directMap = new HashMap<>(); - - public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; - private Map indirectMap = new HashMap<>(); - - public MapTest() { - } - - public MapTest mapMapOfString(Map> mapMapOfString) { - - this.mapMapOfString = mapMapOfString; - return this; - } - - public MapTest putMapMapOfStringItem(String key, Map mapMapOfStringItem) { - if (this.mapMapOfString == null) { - this.mapMapOfString = new HashMap<>(); - } - this.mapMapOfString.put(key, mapMapOfStringItem); - return this; - } - - /** - * Get mapMapOfString - * @return mapMapOfString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map> getMapMapOfString() { - return mapMapOfString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapMapOfString(Map> mapMapOfString) { - this.mapMapOfString = mapMapOfString; - } - - - public MapTest mapOfEnumString(Map mapOfEnumString) { - - this.mapOfEnumString = mapOfEnumString; - return this; - } - - public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) { - if (this.mapOfEnumString == null) { - this.mapOfEnumString = new HashMap<>(); - } - this.mapOfEnumString.put(key, mapOfEnumStringItem); - return this; - } - - /** - * Get mapOfEnumString - * @return mapOfEnumString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMapOfEnumString() { - return mapOfEnumString; - } - - - @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMapOfEnumString(Map mapOfEnumString) { - this.mapOfEnumString = mapOfEnumString; - } - - - public MapTest directMap(Map directMap) { - - this.directMap = directMap; - return this; - } - - public MapTest putDirectMapItem(String key, Boolean directMapItem) { - if (this.directMap == null) { - this.directMap = new HashMap<>(); - } - this.directMap.put(key, directMapItem); - return this; - } - - /** - * Get directMap - * @return directMap - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getDirectMap() { - return directMap; - } - - - @JsonProperty(JSON_PROPERTY_DIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDirectMap(Map directMap) { - this.directMap = directMap; - } - - - public MapTest indirectMap(Map indirectMap) { - - this.indirectMap = indirectMap; - return this; - } - - public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { - if (this.indirectMap == null) { - this.indirectMap = new HashMap<>(); - } - this.indirectMap.put(key, indirectMapItem); - return this; - } - - /** - * Get indirectMap - * @return indirectMap - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getIndirectMap() { - return indirectMap; - } - - - @JsonProperty(JSON_PROPERTY_INDIRECT_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setIndirectMap(Map indirectMap) { - this.indirectMap = indirectMap; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MapTest mapTest = (MapTest) o; - return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && - Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && - Objects.equals(this.directMap, mapTest.directMap) && - Objects.equals(this.indirectMap, mapTest.indirectMap); - } - - @Override - public int hashCode() { - return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MapTest {\n"); - sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n"); - sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n"); - sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n"); - sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java deleted file mode 100644 index ad65e2d8fc5..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.openapitools.client.model.Animal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * MixedPropertiesAndAdditionalPropertiesClass - */ -@JsonPropertyOrder({ - MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID, - MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME, - MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class MixedPropertiesAndAdditionalPropertiesClass { - public static final String JSON_PROPERTY_UUID = "uuid"; - private UUID uuid; - - public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private OffsetDateTime dateTime; - - public static final String JSON_PROPERTY_MAP = "map"; - private Map map = new HashMap<>(); - - public MixedPropertiesAndAdditionalPropertiesClass() { - } - - public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { - - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public UUID getUuid() { - return uuid; - } - - - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUuid(UUID uuid) { - this.uuid = uuid; - } - - - public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { - - this.dateTime = dateTime; - return this; - } - - /** - * Get dateTime - * @return dateTime - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getDateTime() { - return dateTime; - } - - - @JsonProperty(JSON_PROPERTY_DATE_TIME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDateTime(OffsetDateTime dateTime) { - this.dateTime = dateTime; - } - - - public MixedPropertiesAndAdditionalPropertiesClass map(Map map) { - - this.map = map; - return this; - } - - public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) { - if (this.map == null) { - this.map = new HashMap<>(); - } - this.map.put(key, mapItem); - return this; - } - - /** - * Get map - * @return map - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Map getMap() { - return map; - } - - - @JsonProperty(JSON_PROPERTY_MAP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMap(Map map) { - this.map = map; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; - return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && - Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && - Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, dateTime, map); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); - sb.append(" map: ").append(toIndentedString(map)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Model200Response.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Model200Response.java deleted file mode 100644 index 28ff32d43f0..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Model200Response.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Model for testing model name starting with number - */ -@JsonPropertyOrder({ - Model200Response.JSON_PROPERTY_NAME, - Model200Response.JSON_PROPERTY_PROPERTY_CLASS -}) -@JsonTypeName("200_response") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Model200Response { - public static final String JSON_PROPERTY_NAME = "name"; - private Integer name; - - public static final String JSON_PROPERTY_PROPERTY_CLASS = "class"; - private String propertyClass; - - public Model200Response() { - } - - public Model200Response name(Integer name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setName(Integer name) { - this.name = name; - } - - - public Model200Response propertyClass(String propertyClass) { - - this.propertyClass = propertyClass; - return this; - } - - /** - * Get propertyClass - * @return propertyClass - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPropertyClass() { - return propertyClass; - } - - - @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPropertyClass(String propertyClass) { - this.propertyClass = propertyClass; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Model200Response _200response = (Model200Response) o; - return Objects.equals(this.name, _200response.name) && - Objects.equals(this.propertyClass, _200response.propertyClass); - } - - @Override - public int hashCode() { - return Objects.hash(name, propertyClass); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Model200Response {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelApiResponse.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelApiResponse.java deleted file mode 100644 index 7cd7d657857..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelApiResponse.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * ModelApiResponse - */ -@JsonPropertyOrder({ - ModelApiResponse.JSON_PROPERTY_CODE, - ModelApiResponse.JSON_PROPERTY_TYPE, - ModelApiResponse.JSON_PROPERTY_MESSAGE -}) -@JsonTypeName("ApiResponse") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ModelApiResponse { - public static final String JSON_PROPERTY_CODE = "code"; - private Integer code; - - public static final String JSON_PROPERTY_TYPE = "type"; - private String type; - - public static final String JSON_PROPERTY_MESSAGE = "message"; - private String message; - - public ModelApiResponse() { - } - - public ModelApiResponse code(Integer code) { - - this.code = code; - return this; - } - - /** - * Get code - * @return code - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getCode() { - return code; - } - - - @JsonProperty(JSON_PROPERTY_CODE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCode(Integer code) { - this.code = code; - } - - - public ModelApiResponse type(String type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getType() { - return type; - } - - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(String type) { - this.type = type; - } - - - public ModelApiResponse message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMessage() { - return message; - } - - - @JsonProperty(JSON_PROPERTY_MESSAGE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMessage(String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelApiResponse _apiResponse = (ModelApiResponse) o; - return Objects.equals(this.code, _apiResponse.code) && - Objects.equals(this.type, _apiResponse.type) && - Objects.equals(this.message, _apiResponse.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, type, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelApiResponse {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelFile.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelFile.java deleted file mode 100644 index 51a513be4a1..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelFile.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Must be named `File` for test. - */ -@JsonPropertyOrder({ - ModelFile.JSON_PROPERTY_SOURCE_U_R_I -}) -@JsonTypeName("File") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ModelFile { - public static final String JSON_PROPERTY_SOURCE_U_R_I = "sourceURI"; - private String sourceURI; - - public ModelFile() { - } - - public ModelFile sourceURI(String sourceURI) { - - this.sourceURI = sourceURI; - return this; - } - - /** - * Test capitalization - * @return sourceURI - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSourceURI() { - return sourceURI; - } - - - @JsonProperty(JSON_PROPERTY_SOURCE_U_R_I) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSourceURI(String sourceURI) { - this.sourceURI = sourceURI; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelFile _file = (ModelFile) o; - return Objects.equals(this.sourceURI, _file.sourceURI); - } - - @Override - public int hashCode() { - return Objects.hash(sourceURI); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelFile {\n"); - sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelList.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelList.java deleted file mode 100644 index 4d903ec4d45..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelList.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * ModelList - */ -@JsonPropertyOrder({ - ModelList.JSON_PROPERTY_123LIST -}) -@JsonTypeName("List") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ModelList { - public static final String JSON_PROPERTY_123LIST = "123-list"; - private String _123list; - - public ModelList() { - } - - public ModelList _123list(String _123list) { - - this._123list = _123list; - return this; - } - - /** - * Get _123list - * @return _123list - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_123LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String get123list() { - return _123list; - } - - - @JsonProperty(JSON_PROPERTY_123LIST) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void set123list(String _123list) { - this._123list = _123list; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelList _list = (ModelList) o; - return Objects.equals(this._123list, _list._123list); - } - - @Override - public int hashCode() { - return Objects.hash(_123list); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelList {\n"); - sb.append(" _123list: ").append(toIndentedString(_123list)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelReturn.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelReturn.java deleted file mode 100644 index eabe6a173bb..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ModelReturn.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Model for testing reserved words - */ -@JsonPropertyOrder({ - ModelReturn.JSON_PROPERTY_RETURN -}) -@JsonTypeName("Return") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ModelReturn { - public static final String JSON_PROPERTY_RETURN = "return"; - private Integer _return; - - public ModelReturn() { - } - - public ModelReturn _return(Integer _return) { - - this._return = _return; - return this; - } - - /** - * Get _return - * @return _return - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_RETURN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getReturn() { - return _return; - } - - - @JsonProperty(JSON_PROPERTY_RETURN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setReturn(Integer _return) { - this._return = _return; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ModelReturn _return = (ModelReturn) o; - return Objects.equals(this._return, _return._return); - } - - @Override - public int hashCode() { - return Objects.hash(_return); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ModelReturn {\n"); - sb.append(" _return: ").append(toIndentedString(_return)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Name.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Name.java deleted file mode 100644 index 9af78b50a14..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Name.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Model for testing model name same as property name - */ -@JsonPropertyOrder({ - Name.JSON_PROPERTY_NAME, - Name.JSON_PROPERTY_SNAKE_CASE, - Name.JSON_PROPERTY_PROPERTY, - Name.JSON_PROPERTY_123NUMBER -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Name { - public static final String JSON_PROPERTY_NAME = "name"; - private Integer name; - - public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case"; - private Integer snakeCase; - - public static final String JSON_PROPERTY_PROPERTY = "property"; - private String property; - - public static final String JSON_PROPERTY_123NUMBER = "123Number"; - private Integer _123number; - - public Name() { - } - - @JsonCreator - public Name( - @JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase, - @JsonProperty(JSON_PROPERTY_123NUMBER) Integer _123number - ) { - this(); - this.snakeCase = snakeCase; - this._123number = _123number; - } - - public Name name(Integer name) { - - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public Integer getName() { - return name; - } - - - @JsonProperty(JSON_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setName(Integer name) { - this.name = name; - } - - - /** - * Get snakeCase - * @return snakeCase - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SNAKE_CASE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getSnakeCase() { - return snakeCase; - } - - - - - public Name property(String property) { - - this.property = property; - return this; - } - - /** - * Get property - * @return property - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getProperty() { - return property; - } - - - @JsonProperty(JSON_PROPERTY_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setProperty(String property) { - this.property = property; - } - - - /** - * Get _123number - * @return _123number - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_123NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer get123number() { - return _123number; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Name name = (Name) o; - return Objects.equals(this.name, name.name) && - Objects.equals(this.snakeCase, name.snakeCase) && - Objects.equals(this.property, name.property) && - Objects.equals(this._123number, name._123number); - } - - @Override - public int hashCode() { - return Objects.hash(name, snakeCase, property, _123number); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Name {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n"); - sb.append(" property: ").append(toIndentedString(property)).append("\n"); - sb.append(" _123number: ").append(toIndentedString(_123number)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NullableClass.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NullableClass.java deleted file mode 100644 index 44ae6b98f11..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NullableClass.java +++ /dev/null @@ -1,625 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * NullableClass - */ -@JsonPropertyOrder({ - NullableClass.JSON_PROPERTY_INTEGER_PROP, - NullableClass.JSON_PROPERTY_NUMBER_PROP, - NullableClass.JSON_PROPERTY_BOOLEAN_PROP, - NullableClass.JSON_PROPERTY_STRING_PROP, - NullableClass.JSON_PROPERTY_DATE_PROP, - NullableClass.JSON_PROPERTY_DATETIME_PROP, - NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP, - NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP, - NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE, - NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP, - NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP, - NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NullableClass extends HashMap { - public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop"; - private JsonNullable integerProp = JsonNullable.undefined(); - - public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop"; - private JsonNullable numberProp = JsonNullable.undefined(); - - public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop"; - private JsonNullable booleanProp = JsonNullable.undefined(); - - public static final String JSON_PROPERTY_STRING_PROP = "string_prop"; - private JsonNullable stringProp = JsonNullable.undefined(); - - public static final String JSON_PROPERTY_DATE_PROP = "date_prop"; - private JsonNullable dateProp = JsonNullable.undefined(); - - public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop"; - private JsonNullable datetimeProp = JsonNullable.undefined(); - - public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop"; - private JsonNullable> arrayNullableProp = JsonNullable.>undefined(); - - public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop"; - private JsonNullable> arrayAndItemsNullableProp = JsonNullable.>undefined(); - - public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable"; - private List arrayItemsNullable; - - public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop"; - private JsonNullable> objectNullableProp = JsonNullable.>undefined(); - - public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop"; - private JsonNullable> objectAndItemsNullableProp = JsonNullable.>undefined(); - - public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable"; - private Map objectItemsNullable = new HashMap<>(); - - public NullableClass() { - - } - - public NullableClass integerProp(Integer integerProp) { - this.integerProp = JsonNullable.of(integerProp); - - return this; - } - - /** - * Get integerProp - * @return integerProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public Integer getIntegerProp() { - return integerProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_INTEGER_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getIntegerProp_JsonNullable() { - return integerProp; - } - - @JsonProperty(JSON_PROPERTY_INTEGER_PROP) - public void setIntegerProp_JsonNullable(JsonNullable integerProp) { - this.integerProp = integerProp; - } - - public void setIntegerProp(Integer integerProp) { - this.integerProp = JsonNullable.of(integerProp); - } - - - public NullableClass numberProp(BigDecimal numberProp) { - this.numberProp = JsonNullable.of(numberProp); - - return this; - } - - /** - * Get numberProp - * @return numberProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public BigDecimal getNumberProp() { - return numberProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_NUMBER_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getNumberProp_JsonNullable() { - return numberProp; - } - - @JsonProperty(JSON_PROPERTY_NUMBER_PROP) - public void setNumberProp_JsonNullable(JsonNullable numberProp) { - this.numberProp = numberProp; - } - - public void setNumberProp(BigDecimal numberProp) { - this.numberProp = JsonNullable.of(numberProp); - } - - - public NullableClass booleanProp(Boolean booleanProp) { - this.booleanProp = JsonNullable.of(booleanProp); - - return this; - } - - /** - * Get booleanProp - * @return booleanProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public Boolean getBooleanProp() { - return booleanProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getBooleanProp_JsonNullable() { - return booleanProp; - } - - @JsonProperty(JSON_PROPERTY_BOOLEAN_PROP) - public void setBooleanProp_JsonNullable(JsonNullable booleanProp) { - this.booleanProp = booleanProp; - } - - public void setBooleanProp(Boolean booleanProp) { - this.booleanProp = JsonNullable.of(booleanProp); - } - - - public NullableClass stringProp(String stringProp) { - this.stringProp = JsonNullable.of(stringProp); - - return this; - } - - /** - * Get stringProp - * @return stringProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public String getStringProp() { - return stringProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_STRING_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getStringProp_JsonNullable() { - return stringProp; - } - - @JsonProperty(JSON_PROPERTY_STRING_PROP) - public void setStringProp_JsonNullable(JsonNullable stringProp) { - this.stringProp = stringProp; - } - - public void setStringProp(String stringProp) { - this.stringProp = JsonNullable.of(stringProp); - } - - - public NullableClass dateProp(LocalDate dateProp) { - this.dateProp = JsonNullable.of(dateProp); - - return this; - } - - /** - * Get dateProp - * @return dateProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public LocalDate getDateProp() { - return dateProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_DATE_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getDateProp_JsonNullable() { - return dateProp; - } - - @JsonProperty(JSON_PROPERTY_DATE_PROP) - public void setDateProp_JsonNullable(JsonNullable dateProp) { - this.dateProp = dateProp; - } - - public void setDateProp(LocalDate dateProp) { - this.dateProp = JsonNullable.of(dateProp); - } - - - public NullableClass datetimeProp(OffsetDateTime datetimeProp) { - this.datetimeProp = JsonNullable.of(datetimeProp); - - return this; - } - - /** - * Get datetimeProp - * @return datetimeProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public OffsetDateTime getDatetimeProp() { - return datetimeProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_DATETIME_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getDatetimeProp_JsonNullable() { - return datetimeProp; - } - - @JsonProperty(JSON_PROPERTY_DATETIME_PROP) - public void setDatetimeProp_JsonNullable(JsonNullable datetimeProp) { - this.datetimeProp = datetimeProp; - } - - public void setDatetimeProp(OffsetDateTime datetimeProp) { - this.datetimeProp = JsonNullable.of(datetimeProp); - } - - - public NullableClass arrayNullableProp(List arrayNullableProp) { - this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); - - return this; - } - - public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) { - if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) { - this.arrayNullableProp = JsonNullable.>of(new ArrayList<>()); - } - try { - this.arrayNullableProp.get().add(arrayNullablePropItem); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - } - - /** - * Get arrayNullableProp - * @return arrayNullableProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public List getArrayNullableProp() { - return arrayNullableProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable> getArrayNullableProp_JsonNullable() { - return arrayNullableProp; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP) - public void setArrayNullableProp_JsonNullable(JsonNullable> arrayNullableProp) { - this.arrayNullableProp = arrayNullableProp; - } - - public void setArrayNullableProp(List arrayNullableProp) { - this.arrayNullableProp = JsonNullable.>of(arrayNullableProp); - } - - - public NullableClass arrayAndItemsNullableProp(List arrayAndItemsNullableProp) { - this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); - - return this; - } - - public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) { - if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) { - this.arrayAndItemsNullableProp = JsonNullable.>of(new ArrayList<>()); - } - try { - this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - } - - /** - * Get arrayAndItemsNullableProp - * @return arrayAndItemsNullableProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public List getArrayAndItemsNullableProp() { - return arrayAndItemsNullableProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable> getArrayAndItemsNullableProp_JsonNullable() { - return arrayAndItemsNullableProp; - } - - @JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP) - public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable> arrayAndItemsNullableProp) { - this.arrayAndItemsNullableProp = arrayAndItemsNullableProp; - } - - public void setArrayAndItemsNullableProp(List arrayAndItemsNullableProp) { - this.arrayAndItemsNullableProp = JsonNullable.>of(arrayAndItemsNullableProp); - } - - - public NullableClass arrayItemsNullable(List arrayItemsNullable) { - - this.arrayItemsNullable = arrayItemsNullable; - return this; - } - - public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) { - if (this.arrayItemsNullable == null) { - this.arrayItemsNullable = new ArrayList<>(); - } - this.arrayItemsNullable.add(arrayItemsNullableItem); - return this; - } - - /** - * Get arrayItemsNullable - * @return arrayItemsNullable - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getArrayItemsNullable() { - return arrayItemsNullable; - } - - - @JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayItemsNullable(List arrayItemsNullable) { - this.arrayItemsNullable = arrayItemsNullable; - } - - - public NullableClass objectNullableProp(Map objectNullableProp) { - this.objectNullableProp = JsonNullable.>of(objectNullableProp); - - return this; - } - - public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) { - if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) { - this.objectNullableProp = JsonNullable.>of(new HashMap<>()); - } - try { - this.objectNullableProp.get().put(key, objectNullablePropItem); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - } - - /** - * Get objectNullableProp - * @return objectNullableProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public Map getObjectNullableProp() { - return objectNullableProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable> getObjectNullableProp_JsonNullable() { - return objectNullableProp; - } - - @JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP) - public void setObjectNullableProp_JsonNullable(JsonNullable> objectNullableProp) { - this.objectNullableProp = objectNullableProp; - } - - public void setObjectNullableProp(Map objectNullableProp) { - this.objectNullableProp = JsonNullable.>of(objectNullableProp); - } - - - public NullableClass objectAndItemsNullableProp(Map objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); - - return this; - } - - public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) { - if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) { - this.objectAndItemsNullableProp = JsonNullable.>of(new HashMap<>()); - } - try { - this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem); - } catch (java.util.NoSuchElementException e) { - // this can never happen, as we make sure above that the value is present - } - return this; - } - - /** - * Get objectAndItemsNullableProp - * @return objectAndItemsNullableProp - **/ - @javax.annotation.Nullable - @JsonIgnore - - public Map getObjectAndItemsNullableProp() { - return objectAndItemsNullableProp.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable> getObjectAndItemsNullableProp_JsonNullable() { - return objectAndItemsNullableProp; - } - - @JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP) - public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable> objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = objectAndItemsNullableProp; - } - - public void setObjectAndItemsNullableProp(Map objectAndItemsNullableProp) { - this.objectAndItemsNullableProp = JsonNullable.>of(objectAndItemsNullableProp); - } - - - public NullableClass objectItemsNullable(Map objectItemsNullable) { - - this.objectItemsNullable = objectItemsNullable; - return this; - } - - public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) { - if (this.objectItemsNullable == null) { - this.objectItemsNullable = new HashMap<>(); - } - this.objectItemsNullable.put(key, objectItemsNullableItem); - return this; - } - - /** - * Get objectItemsNullable - * @return objectItemsNullable - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - - public Map getObjectItemsNullable() { - return objectItemsNullable; - } - - - @JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE) - @JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS) - public void setObjectItemsNullable(Map objectItemsNullable) { - this.objectItemsNullable = objectItemsNullable; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NullableClass nullableClass = (NullableClass) o; - return equalsNullable(this.integerProp, nullableClass.integerProp) && - equalsNullable(this.numberProp, nullableClass.numberProp) && - equalsNullable(this.booleanProp, nullableClass.booleanProp) && - equalsNullable(this.stringProp, nullableClass.stringProp) && - equalsNullable(this.dateProp, nullableClass.dateProp) && - equalsNullable(this.datetimeProp, nullableClass.datetimeProp) && - equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) && - equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) && - Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) && - equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) && - equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) && - Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) && - super.equals(o); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, super.hashCode()); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NullableClass {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n"); - sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n"); - sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n"); - sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n"); - sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n"); - sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n"); - sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n"); - sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n"); - sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n"); - sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n"); - sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n"); - sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NumberOnly.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NumberOnly.java deleted file mode 100644 index b8453c0e955..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NumberOnly.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * NumberOnly - */ -@JsonPropertyOrder({ - NumberOnly.JSON_PROPERTY_JUST_NUMBER -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NumberOnly { - public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber"; - private BigDecimal justNumber; - - public NumberOnly() { - } - - public NumberOnly justNumber(BigDecimal justNumber) { - - this.justNumber = justNumber; - return this; - } - - /** - * Get justNumber - * @return justNumber - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_JUST_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getJustNumber() { - return justNumber; - } - - - @JsonProperty(JSON_PROPERTY_JUST_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setJustNumber(BigDecimal justNumber) { - this.justNumber = justNumber; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NumberOnly numberOnly = (NumberOnly) o; - return Objects.equals(this.justNumber, numberOnly.justNumber); - } - - @Override - public int hashCode() { - return Objects.hash(justNumber); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NumberOnly {\n"); - sb.append(" justNumber: ").append(toIndentedString(justNumber)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java new file mode 100644 index 00000000000..96de851944c --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/NumberPropertiesOnly.java @@ -0,0 +1,170 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * NumberPropertiesOnly + */ +@JsonPropertyOrder({ + NumberPropertiesOnly.JSON_PROPERTY_NUMBER, + NumberPropertiesOnly.JSON_PROPERTY_FLOAT, + NumberPropertiesOnly.JSON_PROPERTY_DOUBLE +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class NumberPropertiesOnly { + public static final String JSON_PROPERTY_NUMBER = "number"; + private BigDecimal number; + + public static final String JSON_PROPERTY_FLOAT = "float"; + private Float _float; + + public static final String JSON_PROPERTY_DOUBLE = "double"; + private Double _double; + + public NumberPropertiesOnly() { + } + + public NumberPropertiesOnly number(BigDecimal number) { + + this.number = number; + return this; + } + + /** + * Get number + * @return number + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public BigDecimal getNumber() { + return number; + } + + + @JsonProperty(JSON_PROPERTY_NUMBER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumber(BigDecimal number) { + this.number = number; + } + + + public NumberPropertiesOnly _float(Float _float) { + + this._float = _float; + return this; + } + + /** + * Get _float + * @return _float + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Float getFloat() { + return _float; + } + + + @JsonProperty(JSON_PROPERTY_FLOAT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFloat(Float _float) { + this._float = _float; + } + + + public NumberPropertiesOnly _double(Double _double) { + + this._double = _double; + return this; + } + + /** + * Get _double + * minimum: 0.8 + * maximum: 50.2 + * @return _double + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Double getDouble() { + return _double; + } + + + @JsonProperty(JSON_PROPERTY_DOUBLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDouble(Double _double) { + this._double = _double; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NumberPropertiesOnly numberPropertiesOnly = (NumberPropertiesOnly) o; + return Objects.equals(this.number, numberPropertiesOnly.number) && + Objects.equals(this._float, numberPropertiesOnly._float) && + Objects.equals(this._double, numberPropertiesOnly._double); + } + + @Override + public int hashCode() { + return Objects.hash(number, _float, _double); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NumberPropertiesOnly {\n"); + sb.append(" number: ").append(toIndentedString(number)).append("\n"); + sb.append(" _float: ").append(toIndentedString(_float)).append("\n"); + sb.append(" _double: ").append(toIndentedString(_double)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java deleted file mode 100644 index 1a3e502685b..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ObjectWithDeprecatedFields.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.DeprecatedObject; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * ObjectWithDeprecatedFields - */ -@JsonPropertyOrder({ - ObjectWithDeprecatedFields.JSON_PROPERTY_UUID, - ObjectWithDeprecatedFields.JSON_PROPERTY_ID, - ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF, - ObjectWithDeprecatedFields.JSON_PROPERTY_BARS -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ObjectWithDeprecatedFields { - public static final String JSON_PROPERTY_UUID = "uuid"; - private String uuid; - - public static final String JSON_PROPERTY_ID = "id"; - private BigDecimal id; - - public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef"; - private DeprecatedObject deprecatedRef; - - public static final String JSON_PROPERTY_BARS = "bars"; - private List bars; - - public ObjectWithDeprecatedFields() { - } - - public ObjectWithDeprecatedFields uuid(String uuid) { - - this.uuid = uuid; - return this; - } - - /** - * Get uuid - * @return uuid - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getUuid() { - return uuid; - } - - - @JsonProperty(JSON_PROPERTY_UUID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUuid(String uuid) { - this.uuid = uuid; - } - - - public ObjectWithDeprecatedFields id(BigDecimal id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - * @deprecated - **/ - @Deprecated - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getId() { - return id; - } - - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(BigDecimal id) { - this.id = id; - } - - - public ObjectWithDeprecatedFields deprecatedRef(DeprecatedObject deprecatedRef) { - - this.deprecatedRef = deprecatedRef; - return this; - } - - /** - * Get deprecatedRef - * @return deprecatedRef - * @deprecated - **/ - @Deprecated - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public DeprecatedObject getDeprecatedRef() { - return deprecatedRef; - } - - - @JsonProperty(JSON_PROPERTY_DEPRECATED_REF) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setDeprecatedRef(DeprecatedObject deprecatedRef) { - this.deprecatedRef = deprecatedRef; - } - - - public ObjectWithDeprecatedFields bars(List bars) { - - this.bars = bars; - return this; - } - - public ObjectWithDeprecatedFields addBarsItem(String barsItem) { - if (this.bars == null) { - this.bars = new ArrayList<>(); - } - this.bars.add(barsItem); - return this; - } - - /** - * Get bars - * @return bars - * @deprecated - **/ - @Deprecated - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_BARS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public List getBars() { - return bars; - } - - - @JsonProperty(JSON_PROPERTY_BARS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setBars(List bars) { - this.bars = bars; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o; - return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) && - Objects.equals(this.id, objectWithDeprecatedFields.id) && - Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) && - Objects.equals(this.bars, objectWithDeprecatedFields.bars); - } - - @Override - public int hashCode() { - return Objects.hash(uuid, id, deprecatedRef, bars); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ObjectWithDeprecatedFields {\n"); - sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n"); - sb.append(" bars: ").append(toIndentedString(bars)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Order.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Order.java deleted file mode 100644 index 73e649ff1fa..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Order.java +++ /dev/null @@ -1,301 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * Order - */ -@JsonPropertyOrder({ - Order.JSON_PROPERTY_ID, - Order.JSON_PROPERTY_PET_ID, - Order.JSON_PROPERTY_QUANTITY, - Order.JSON_PROPERTY_SHIP_DATE, - Order.JSON_PROPERTY_STATUS, - Order.JSON_PROPERTY_COMPLETE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Order { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_PET_ID = "petId"; - private Long petId; - - public static final String JSON_PROPERTY_QUANTITY = "quantity"; - private Integer quantity; - - public static final String JSON_PROPERTY_SHIP_DATE = "shipDate"; - private OffsetDateTime shipDate; - - /** - * Order Status - */ - public enum StatusEnum { - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - StatusEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static StatusEnum fromValue(String value) { - for (StatusEnum b : StatusEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_STATUS = "status"; - private StatusEnum status; - - public static final String JSON_PROPERTY_COMPLETE = "complete"; - private Boolean complete = false; - - public Order() { - } - - public Order id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getId() { - return id; - } - - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { - this.id = id; - } - - - public Order petId(Long petId) { - - this.petId = petId; - return this; - } - - /** - * Get petId - * @return petId - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PET_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getPetId() { - return petId; - } - - - @JsonProperty(JSON_PROPERTY_PET_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPetId(Long petId) { - this.petId = petId; - } - - - public Order quantity(Integer quantity) { - - this.quantity = quantity; - return this; - } - - /** - * Get quantity - * @return quantity - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getQuantity() { - return quantity; - } - - - @JsonProperty(JSON_PROPERTY_QUANTITY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setQuantity(Integer quantity) { - this.quantity = quantity; - } - - - public Order shipDate(OffsetDateTime shipDate) { - - this.shipDate = shipDate; - return this; - } - - /** - * Get shipDate - * @return shipDate - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SHIP_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public OffsetDateTime getShipDate() { - return shipDate; - } - - - @JsonProperty(JSON_PROPERTY_SHIP_DATE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setShipDate(OffsetDateTime shipDate) { - this.shipDate = shipDate; - } - - - public Order status(StatusEnum status) { - - this.status = status; - return this; - } - - /** - * Order Status - * @return status - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public StatusEnum getStatus() { - return status; - } - - - @JsonProperty(JSON_PROPERTY_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setStatus(StatusEnum status) { - this.status = status; - } - - - public Order complete(Boolean complete) { - - this.complete = complete; - return this; - } - - /** - * Get complete - * @return complete - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getComplete() { - return complete; - } - - - @JsonProperty(JSON_PROPERTY_COMPLETE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setComplete(Boolean complete) { - this.complete = complete; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - Order order = (Order) o; - return Objects.equals(this.id, order.id) && - Objects.equals(this.petId, order.petId) && - Objects.equals(this.quantity, order.quantity) && - Objects.equals(this.shipDate, order.shipDate) && - Objects.equals(this.status, order.status) && - Objects.equals(this.complete, order.complete); - } - - @Override - public int hashCode() { - return Objects.hash(id, petId, quantity, shipDate, status, complete); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class Order {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" petId: ").append(toIndentedString(petId)).append("\n"); - sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); - sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" complete: ").append(toIndentedString(complete)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterComposite.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterComposite.java deleted file mode 100644 index 3a35d693a21..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterComposite.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * OuterComposite - */ -@JsonPropertyOrder({ - OuterComposite.JSON_PROPERTY_MY_NUMBER, - OuterComposite.JSON_PROPERTY_MY_STRING, - OuterComposite.JSON_PROPERTY_MY_BOOLEAN -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OuterComposite { - public static final String JSON_PROPERTY_MY_NUMBER = "my_number"; - private BigDecimal myNumber; - - public static final String JSON_PROPERTY_MY_STRING = "my_string"; - private String myString; - - public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean"; - private Boolean myBoolean; - - public OuterComposite() { - } - - public OuterComposite myNumber(BigDecimal myNumber) { - - this.myNumber = myNumber; - return this; - } - - /** - * Get myNumber - * @return myNumber - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public BigDecimal getMyNumber() { - return myNumber; - } - - - @JsonProperty(JSON_PROPERTY_MY_NUMBER) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyNumber(BigDecimal myNumber) { - this.myNumber = myNumber; - } - - - public OuterComposite myString(String myString) { - - this.myString = myString; - return this; - } - - /** - * Get myString - * @return myString - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getMyString() { - return myString; - } - - - @JsonProperty(JSON_PROPERTY_MY_STRING) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyString(String myString) { - this.myString = myString; - } - - - public OuterComposite myBoolean(Boolean myBoolean) { - - this.myBoolean = myBoolean; - return this; - } - - /** - * Get myBoolean - * @return myBoolean - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Boolean getMyBoolean() { - return myBoolean; - } - - - @JsonProperty(JSON_PROPERTY_MY_BOOLEAN) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setMyBoolean(Boolean myBoolean) { - this.myBoolean = myBoolean; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterComposite outerComposite = (OuterComposite) o; - return Objects.equals(this.myNumber, outerComposite.myNumber) && - Objects.equals(this.myString, outerComposite.myString) && - Objects.equals(this.myBoolean, outerComposite.myBoolean); - } - - @Override - public int hashCode() { - return Objects.hash(myNumber, myString, myBoolean); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterComposite {\n"); - sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n"); - sb.append(" myString: ").append(toIndentedString(myString)).append("\n"); - sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnum.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnum.java deleted file mode 100644 index 4cd955b63dc..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnum.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnum - */ -public enum OuterEnum { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnum fromValue(String value) { - for (OuterEnum b : OuterEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return null; - } -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java deleted file mode 100644 index 73077cc8c31..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumDefaultValue.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnumDefaultValue - */ -public enum OuterEnumDefaultValue { - - PLACED("placed"), - - APPROVED("approved"), - - DELIVERED("delivered"); - - private String value; - - OuterEnumDefaultValue(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnumDefaultValue fromValue(String value) { - for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumInteger.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumInteger.java deleted file mode 100644 index e6c2e38c2e7..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumInteger.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnumInteger - */ -public enum OuterEnumInteger { - - NUMBER_0(0), - - NUMBER_1(1), - - NUMBER_2(2); - - private Integer value; - - OuterEnumInteger(Integer value) { - this.value = value; - } - - @JsonValue - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnumInteger fromValue(Integer value) { - for (OuterEnumInteger b : OuterEnumInteger.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java deleted file mode 100644 index ef61373b187..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterEnumIntegerDefaultValue.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets OuterEnumIntegerDefaultValue - */ -public enum OuterEnumIntegerDefaultValue { - - NUMBER_0(0), - - NUMBER_1(1), - - NUMBER_2(2); - - private Integer value; - - OuterEnumIntegerDefaultValue(Integer value) { - this.value = value; - } - - @JsonValue - public Integer getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static OuterEnumIntegerDefaultValue fromValue(Integer value) { - for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java deleted file mode 100644 index 0b8b5f66164..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/OuterObjectWithEnumProperty.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.OuterEnumInteger; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * OuterObjectWithEnumProperty - */ -@JsonPropertyOrder({ - OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OuterObjectWithEnumProperty { - public static final String JSON_PROPERTY_VALUE = "value"; - private OuterEnumInteger value; - - public OuterObjectWithEnumProperty() { - } - - public OuterObjectWithEnumProperty value(OuterEnumInteger value) { - - this.value = value; - return this; - } - - /** - * Get value - * @return value - **/ - @javax.annotation.Nonnull - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - - public OuterEnumInteger getValue() { - return value; - } - - - @JsonProperty(JSON_PROPERTY_VALUE) - @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setValue(OuterEnumInteger value) { - this.value = value; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o; - return Objects.equals(this.value, outerObjectWithEnumProperty.value); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OuterObjectWithEnumProperty {\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ParentWithNullable.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ParentWithNullable.java deleted file mode 100644 index b8ad35eda76..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ParentWithNullable.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * ParentWithNullable - */ -@JsonPropertyOrder({ - ParentWithNullable.JSON_PROPERTY_TYPE, - ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -@JsonIgnoreProperties( - value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization - allowSetters = true // allows the type to be set during deserialization -) -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true) -@JsonSubTypes({ - @JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"), -}) - -public class ParentWithNullable { - /** - * Gets or Sets type - */ - public enum TypeEnum { - CHILDWITHNULLABLE("ChildWithNullable"); - - private String value; - - TypeEnum(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static TypeEnum fromValue(String value) { - for (TypeEnum b : TypeEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } - } - - public static final String JSON_PROPERTY_TYPE = "type"; - protected TypeEnum type; - - public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty"; - private JsonNullable nullableProperty = JsonNullable.undefined(); - - public ParentWithNullable() { - } - - public ParentWithNullable type(TypeEnum type) { - - this.type = type; - return this; - } - - /** - * Get type - * @return type - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public TypeEnum getType() { - return type; - } - - - @JsonProperty(JSON_PROPERTY_TYPE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setType(TypeEnum type) { - this.type = type; - } - - - public ParentWithNullable nullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); - - return this; - } - - /** - * Get nullableProperty - * @return nullableProperty - **/ - @javax.annotation.Nullable - @JsonIgnore - - public String getNullableProperty() { - return nullableProperty.orElse(null); - } - - @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public JsonNullable getNullableProperty_JsonNullable() { - return nullableProperty; - } - - @JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY) - public void setNullableProperty_JsonNullable(JsonNullable nullableProperty) { - this.nullableProperty = nullableProperty; - } - - public void setNullableProperty(String nullableProperty) { - this.nullableProperty = JsonNullable.of(nullableProperty); - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ParentWithNullable parentWithNullable = (ParentWithNullable) o; - return Objects.equals(this.type, parentWithNullable.type) && - equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(type, hashCodeNullable(nullableProperty)); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ParentWithNullable {\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Pet.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Pet.java index d9f797ddb6b..4daf4511bb0 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Pet.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Pet.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -20,12 +20,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedHashSet; import java.util.List; -import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import com.fasterxml.jackson.annotation.JsonPropertyOrder; @@ -36,8 +33,8 @@ import com.fasterxml.jackson.annotation.JsonTypeName; */ @JsonPropertyOrder({ Pet.JSON_PROPERTY_ID, - Pet.JSON_PROPERTY_CATEGORY, Pet.JSON_PROPERTY_NAME, + Pet.JSON_PROPERTY_CATEGORY, Pet.JSON_PROPERTY_PHOTO_URLS, Pet.JSON_PROPERTY_TAGS, Pet.JSON_PROPERTY_STATUS @@ -47,14 +44,14 @@ public class Pet { public static final String JSON_PROPERTY_ID = "id"; private Long id; - public static final String JSON_PROPERTY_CATEGORY = "category"; - private Category category; - public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_CATEGORY = "category"; + private Category category; + public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls"; - private Set photoUrls = new LinkedHashSet<>(); + private List photoUrls = new ArrayList<>(); public static final String JSON_PROPERTY_TAGS = "tags"; private List tags; @@ -128,32 +125,6 @@ public class Pet { } - public Pet category(Category category) { - - this.category = category; - return this; - } - - /** - * Get category - * @return category - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Category getCategory() { - return category; - } - - - @JsonProperty(JSON_PROPERTY_CATEGORY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setCategory(Category category) { - this.category = category; - } - - public Pet name(String name) { this.name = name; @@ -180,7 +151,33 @@ public class Pet { } - public Pet photoUrls(Set photoUrls) { + public Pet category(Category category) { + + this.category = category; + return this; + } + + /** + * Get category + * @return category + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Category getCategory() { + return category; + } + + + @JsonProperty(JSON_PROPERTY_CATEGORY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCategory(Category category) { + this.category = category; + } + + + public Pet photoUrls(List photoUrls) { this.photoUrls = photoUrls; return this; @@ -188,7 +185,7 @@ public class Pet { public Pet addPhotoUrlsItem(String photoUrlsItem) { if (this.photoUrls == null) { - this.photoUrls = new LinkedHashSet<>(); + this.photoUrls = new ArrayList<>(); } this.photoUrls.add(photoUrlsItem); return this; @@ -202,15 +199,14 @@ public class Pet { @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public Set getPhotoUrls() { + public List getPhotoUrls() { return photoUrls; } - @JsonDeserialize(as = LinkedHashSet.class) @JsonProperty(JSON_PROPERTY_PHOTO_URLS) @JsonInclude(value = JsonInclude.Include.ALWAYS) - public void setPhotoUrls(Set photoUrls) { + public void setPhotoUrls(List photoUrls) { this.photoUrls = photoUrls; } @@ -284,8 +280,8 @@ public class Pet { } Pet pet = (Pet) o; return Objects.equals(this.id, pet.id) && - Objects.equals(this.category, pet.category) && Objects.equals(this.name, pet.name) && + Objects.equals(this.category, pet.category) && Objects.equals(this.photoUrls, pet.photoUrls) && Objects.equals(this.tags, pet.tags) && Objects.equals(this.status, pet.status); @@ -293,7 +289,7 @@ public class Pet { @Override public int hashCode() { - return Objects.hash(id, category, name, photoUrls, tags, status); + return Objects.hash(id, name, category, photoUrls, tags, status); } @Override @@ -301,8 +297,8 @@ public class Pet { StringBuilder sb = new StringBuilder(); sb.append("class Pet {\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" category: ").append(toIndentedString(category)).append("\n"); sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Query.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Query.java new file mode 100644 index 00000000000..5e110710d72 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Query.java @@ -0,0 +1,183 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * Query + */ +@JsonPropertyOrder({ + Query.JSON_PROPERTY_ID, + Query.JSON_PROPERTY_OUTCOMES +}) +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class Query { + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + /** + * Gets or Sets outcomes + */ + public enum OutcomesEnum { + SUCCESS("SUCCESS"), + + FAILURE("FAILURE"), + + SKIPPED("SKIPPED"); + + private String value; + + OutcomesEnum(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + @JsonCreator + public static OutcomesEnum fromValue(String value) { + for (OutcomesEnum b : OutcomesEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + } + + public static final String JSON_PROPERTY_OUTCOMES = "outcomes"; + private List outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); + + public Query() { + } + + public Query id(Long id) { + + this.id = id; + return this; + } + + /** + * Query + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public Query outcomes(List outcomes) { + + this.outcomes = outcomes; + return this; + } + + public Query addOutcomesItem(OutcomesEnum outcomesItem) { + if (this.outcomes == null) { + this.outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE)); + } + this.outcomes.add(outcomesItem); + return this; + } + + /** + * Get outcomes + * @return outcomes + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OUTCOMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public List getOutcomes() { + return outcomes; + } + + + @JsonProperty(JSON_PROPERTY_OUTCOMES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setOutcomes(List outcomes) { + this.outcomes = outcomes; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Query query = (Query) o; + return Objects.equals(this.id, query.id) && + Objects.equals(this.outcomes, query.outcomes); + } + + @Override + public int hashCode() { + return Objects.hash(id, outcomes); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Query {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" outcomes: ").append(toIndentedString(outcomes)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/SingleRefType.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/SingleRefType.java deleted file mode 100644 index f9922454755..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/SingleRefType.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; - -/** - * Gets or Sets SingleRefType - */ -public enum SingleRefType { - - ADMIN("admin"), - - USER("user"); - - private String value; - - SingleRefType(String value) { - this.value = value; - } - - @JsonValue - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - @JsonCreator - public static SingleRefType fromValue(String value) { - for (SingleRefType b : SingleRefType.values()) { - if (b.value.equals(value)) { - return b; - } - } - throw new IllegalArgumentException("Unexpected value '" + value + "'"); - } -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/SpecialModelName.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/SpecialModelName.java deleted file mode 100644 index 8c6588d73f4..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/SpecialModelName.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * SpecialModelName - */ -@JsonPropertyOrder({ - SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME -}) -@JsonTypeName("_special_model.name_") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class SpecialModelName { - public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]"; - private Long $specialPropertyName; - - public SpecialModelName() { - } - - public SpecialModelName $specialPropertyName(Long $specialPropertyName) { - - this.$specialPropertyName = $specialPropertyName; - return this; - } - - /** - * Get $specialPropertyName - * @return $specialPropertyName - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long get$SpecialPropertyName() { - return $specialPropertyName; - } - - - @JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void set$SpecialPropertyName(Long $specialPropertyName) { - this.$specialPropertyName = $specialPropertyName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - SpecialModelName specialModelName = (SpecialModelName) o; - return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName); - } - - @Override - public int hashCode() { - return Objects.hash($specialPropertyName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class SpecialModelName {\n"); - sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumClass.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/StringEnumRef.java similarity index 65% rename from samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumClass.java rename to samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/StringEnumRef.java index 1190cf5abe3..6e706b20d44 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/EnumClass.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/StringEnumRef.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -22,19 +22,19 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; /** - * Gets or Sets EnumClass + * Gets or Sets StringEnumRef */ -public enum EnumClass { +public enum StringEnumRef { - _ABC("_abc"), + SUCCESS("success"), - _EFG("-efg"), + FAILURE("failure"), - _XYZ_("(xyz)"); + UNCLASSIFIED("unclassified"); private String value; - EnumClass(String value) { + StringEnumRef(String value) { this.value = value; } @@ -49,8 +49,8 @@ public enum EnumClass { } @JsonCreator - public static EnumClass fromValue(String value) { - for (EnumClass b : EnumClass.values()) { + public static StringEnumRef fromValue(String value) { + for (StringEnumRef b : StringEnumRef.values()) { if (b.value.equals(value)) { return b; } diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Tag.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Tag.java index cf6ef04de76..794d3457040 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Tag.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/Tag.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java deleted file mode 100644 index 1c27f9f0afd..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * TestInlineFreeformAdditionalPropertiesRequest - */ -@JsonPropertyOrder({ - TestInlineFreeformAdditionalPropertiesRequest.JSON_PROPERTY_SOME_PROPERTY -}) -@JsonTypeName("testInlineFreeformAdditionalProperties_request") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TestInlineFreeformAdditionalPropertiesRequest extends HashMap { - public static final String JSON_PROPERTY_SOME_PROPERTY = "someProperty"; - private String someProperty; - - public TestInlineFreeformAdditionalPropertiesRequest() { - - } - - public TestInlineFreeformAdditionalPropertiesRequest someProperty(String someProperty) { - - this.someProperty = someProperty; - return this; - } - - /** - * Get someProperty - * @return someProperty - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_SOME_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getSomeProperty() { - return someProperty; - } - - - @JsonProperty(JSON_PROPERTY_SOME_PROPERTY) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setSomeProperty(String someProperty) { - this.someProperty = someProperty; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = (TestInlineFreeformAdditionalPropertiesRequest) o; - return Objects.equals(this.someProperty, testInlineFreeformAdditionalPropertiesRequest.someProperty) && - super.equals(o); - } - - @Override - public int hashCode() { - return Objects.hash(someProperty, super.hashCode()); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class TestInlineFreeformAdditionalPropertiesRequest {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); - sb.append(" someProperty: ").append(toIndentedString(someProperty)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java new file mode 100644 index 00000000000..95ee4725f1a --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java @@ -0,0 +1,200 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import java.util.Objects; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonTypeName; + +/** + * TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + */ +@JsonPropertyOrder({ + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_SIZE, + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_COLOR, + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_ID, + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_NAME +}) +@JsonTypeName("test_query_style_deepObject_explode_true_object_allOf_query_object_parameter") +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter { + public static final String JSON_PROPERTY_SIZE = "size"; + private String size; + + public static final String JSON_PROPERTY_COLOR = "color"; + private String color; + + public static final String JSON_PROPERTY_ID = "id"; + private Long id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() { + } + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) { + + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSize() { + return size; + } + + + @JsonProperty(JSON_PROPERTY_SIZE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSize(String size) { + this.size = size; + } + + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) { + + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getColor() { + return color; + } + + + @JsonProperty(JSON_PROPERTY_COLOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setColor(String color) { + this.color = color; + } + + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) { + + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getId() { + return id; + } + + + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setId(Long id) { + this.id = id; + } + + + public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) { + + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @javax.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getName() { + return name; + } + + + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) o; + return Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) && + Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color) && + Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) && + Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name); + } + + @Override + public int hashCode() { + return Objects.hash(size, color, id, name); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java similarity index 50% rename from samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java rename to samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java index 8e58dc975b5..a28cc79320d 100644 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java +++ b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -20,7 +20,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -28,50 +27,51 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonTypeName; /** - * ArrayOfNumberOnly + * TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter */ @JsonPropertyOrder({ - ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.JSON_PROPERTY_VALUES }) +@JsonTypeName("test_query_style_form_explode_true_array_string_query_object_parameter") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ArrayOfNumberOnly { - public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; - private List arrayNumber; +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter { + public static final String JSON_PROPERTY_VALUES = "values"; + private List values; - public ArrayOfNumberOnly() { + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { } - public ArrayOfNumberOnly arrayNumber(List arrayNumber) { + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List values) { - this.arrayNumber = arrayNumber; + this.values = values; return this; } - public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) { - if (this.arrayNumber == null) { - this.arrayNumber = new ArrayList<>(); + public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter addValuesItem(String valuesItem) { + if (this.values == null) { + this.values = new ArrayList<>(); } - this.arrayNumber.add(arrayNumberItem); + this.values.add(valuesItem); return this; } /** - * Get arrayNumber - * @return arrayNumber + * Get values + * @return values **/ @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) + @JsonProperty(JSON_PROPERTY_VALUES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public List getArrayNumber() { - return arrayNumber; + public List getValues() { + return values; } - @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) + @JsonProperty(JSON_PROPERTY_VALUES) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setArrayNumber(List arrayNumber) { - this.arrayNumber = arrayNumber; + public void setValues(List values) { + this.values = values; } @Override @@ -82,20 +82,20 @@ public class ArrayOfNumberOnly { if (o == null || getClass() != o.getClass()) { return false; } - ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o; - return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber); + TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter = (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) o; + return Objects.equals(this.values, testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.values); } @Override public int hashCode() { - return Objects.hash(arrayNumber); + return Objects.hash(values); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class ArrayOfNumberOnly {\n"); - sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).append("\n"); + sb.append("class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {\n"); + sb.append(" values: ").append(toIndentedString(values)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/User.java b/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/User.java deleted file mode 100644 index b29fba7c1b6..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/main/java/org/openapitools/client/model/User.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonTypeName; - -/** - * User - */ -@JsonPropertyOrder({ - User.JSON_PROPERTY_ID, - User.JSON_PROPERTY_USERNAME, - User.JSON_PROPERTY_FIRST_NAME, - User.JSON_PROPERTY_LAST_NAME, - User.JSON_PROPERTY_EMAIL, - User.JSON_PROPERTY_PASSWORD, - User.JSON_PROPERTY_PHONE, - User.JSON_PROPERTY_USER_STATUS -}) -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class User { - public static final String JSON_PROPERTY_ID = "id"; - private Long id; - - public static final String JSON_PROPERTY_USERNAME = "username"; - private String username; - - public static final String JSON_PROPERTY_FIRST_NAME = "firstName"; - private String firstName; - - public static final String JSON_PROPERTY_LAST_NAME = "lastName"; - private String lastName; - - public static final String JSON_PROPERTY_EMAIL = "email"; - private String email; - - public static final String JSON_PROPERTY_PASSWORD = "password"; - private String password; - - public static final String JSON_PROPERTY_PHONE = "phone"; - private String phone; - - public static final String JSON_PROPERTY_USER_STATUS = "userStatus"; - private Integer userStatus; - - public User() { - } - - public User id(Long id) { - - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Long getId() { - return id; - } - - - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setId(Long id) { - this.id = id; - } - - - public User username(String username) { - - this.username = username; - return this; - } - - /** - * Get username - * @return username - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getUsername() { - return username; - } - - - @JsonProperty(JSON_PROPERTY_USERNAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUsername(String username) { - this.username = username; - } - - - public User firstName(String firstName) { - - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_FIRST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getFirstName() { - return firstName; - } - - - @JsonProperty(JSON_PROPERTY_FIRST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - - public User lastName(String lastName) { - - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_LAST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getLastName() { - return lastName; - } - - - @JsonProperty(JSON_PROPERTY_LAST_NAME) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLastName(String lastName) { - this.lastName = lastName; - } - - - public User email(String email) { - - this.email = email; - return this; - } - - /** - * Get email - * @return email - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getEmail() { - return email; - } - - - @JsonProperty(JSON_PROPERTY_EMAIL) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setEmail(String email) { - this.email = email; - } - - - public User password(String password) { - - this.password = password; - return this; - } - - /** - * Get password - * @return password - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPassword() { - return password; - } - - - @JsonProperty(JSON_PROPERTY_PASSWORD) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPassword(String password) { - this.password = password; - } - - - public User phone(String phone) { - - this.phone = phone; - return this; - } - - /** - * Get phone - * @return phone - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_PHONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public String getPhone() { - return phone; - } - - - @JsonProperty(JSON_PROPERTY_PHONE) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setPhone(String phone) { - this.phone = phone; - } - - - public User userStatus(Integer userStatus) { - - this.userStatus = userStatus; - return this; - } - - /** - * User Status - * @return userStatus - **/ - @javax.annotation.Nullable - @JsonProperty(JSON_PROPERTY_USER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - - public Integer getUserStatus() { - return userStatus; - } - - - @JsonProperty(JSON_PROPERTY_USER_STATUS) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setUserStatus(Integer userStatus) { - this.userStatus = userStatus; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - User user = (User) o; - return Objects.equals(this.id, user.id) && - Objects.equals(this.username, user.username) && - Objects.equals(this.firstName, user.firstName) && - Objects.equals(this.lastName, user.lastName) && - Objects.equals(this.email, user.email) && - Objects.equals(this.password, user.password) && - Objects.equals(this.phone, user.phone) && - Objects.equals(this.userStatus, user.userStatus); - } - - @Override - public int hashCode() { - return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class User {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" phone: ").append(toIndentedString(phone)).append("\n"); - sb.append(" userStatus: ").append(toIndentedString(userStatus)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - -} - diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java deleted file mode 100644 index 9f3d3543c84..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; - -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AnotherFakeApi - */ -public class AnotherFakeApiTest { - - private final AnotherFakeApi api = new AnotherFakeApi(); - - /** - * To test special tags - * - * To test special tags and operation ID starting with number - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void call123testSpecialTagsTest() throws ApiException { - // - //Client client = null; - // - //Client response = api.call123testSpecialTags(client); - - // TODO: test validations - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/AuthApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/AuthApiTest.java new file mode 100644 index 00000000000..17e790b7617 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/AuthApiTest.java @@ -0,0 +1,65 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AuthApi + */ +public class AuthApiTest { + + private final AuthApi api = new AuthApi(); + + /** + * To test HTTP basic authentication + * + * To test HTTP basic authentication + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testAuthHttpBasicTest() throws ApiException { + // + //String response = api.testAuthHttpBasic(); + + // TODO: test validations + } + /** + * To test HTTP bearer authentication + * + * To test HTTP bearer authentication + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testAuthHttpBearerTest() throws ApiException { + // + //String response = api.testAuthHttpBearer(); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/BodyApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/BodyApiTest.java new file mode 100644 index 00000000000..3d2102e4643 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/BodyApiTest.java @@ -0,0 +1,210 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import java.io.File; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.Tag; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.io.FileWriter; +import java.io.IOException; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import static org.hamcrest.CoreMatchers.containsString; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.Assert.assertTrue; + +/** + * API tests for BodyApi + */ +public class BodyApiTest { + + private final BodyApi api = new BodyApi(); + + /** + * Test binary (gif) response body + * + * Test binary (gif) response body + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBinaryGifTest() throws ApiException { + // + //File response = api.testBinaryGif(); + + // TODO: test validations + } + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyApplicationOctetstreamBinaryTest() throws ApiException { + // + //File body = null; + // + //String response = api.testBodyApplicationOctetstreamBinary(body); + + // TODO: test validations + } + /** + * Test array of binary in multipart mime + * + * Test array of binary in multipart mime + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testBodyMultipartFormdataArrayOfBinaryTest() throws ApiException { + // + //List files = null; + // + //String response = api.testBodyMultipartFormdataArrayOfBinary(files); + + // TODO: test validations + } + + /** + * Test single binary in multipart mime + * + * @see + * #17367 + */ + @Test + public void testBodyMultipartFormdataSingleBinaryTest() + throws ApiException, IOException { + File myFile = new File("test.txt"); + if (!myFile.exists()){ + assertTrue(myFile.createNewFile()); + } + FileWriter fw = new FileWriter(myFile); + fw.write("testing only"); + fw.close(); + myFile.deleteOnExit(); + + String response = + api.testBodyMultipartFormdataSingleBinary(myFile); + + EchoServerResponseParser parser = + new EchoServerResponseParser(response); + + String contentDisposition = parser.headers.get("Content-Disposition"); + + assertThat(contentDisposition, containsString( + "form-data; name=\"my-file\"; filename=\"test.txt\"" + )); + } + + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyAllOfPetTest() throws ApiException { + // + //Pet pet = null; + // + //Pet response = api.testEchoBodyAllOfPet(pet); + + // TODO: test validations + } + /** + * Test free form object + * + * Test free form object + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyFreeFormObjectResponseStringTest() throws ApiException { + // + //Object body = null; + // + //String response = api.testEchoBodyFreeFormObjectResponseString(body); + + // TODO: test validations + } + /** + * Test body parameter(s) + * + * Test body parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyPetTest() throws ApiException { + // + //Pet pet = null; + // + //Pet response = api.testEchoBodyPet(pet); + + // TODO: test validations + } + /** + * Test empty response body + * + * Test empty response body + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyPetResponseStringTest() throws ApiException { + // + //Pet pet = null; + // + //String response = api.testEchoBodyPetResponseString(pet); + + // TODO: test validations + } + /** + * Test empty json (request body) + * + * Test empty json (request body) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEchoBodyTagResponseStringTest() throws ApiException { + // + //Tag tag = null; + // + //String response = api.testEchoBodyTagResponseString(tag); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/DefaultApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/DefaultApiTest.java deleted file mode 100644 index 6e55220f09e..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/DefaultApiTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.FooGetDefaultResponse; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; - -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for DefaultApi - */ -public class DefaultApiTest { - - private final DefaultApi api = new DefaultApi(); - - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void fooGetTest() throws ApiException { - // - //FooGetDefaultResponse response = api.fooGet(); - - // TODO: test validations - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/EchoServerResponseParser.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/EchoServerResponseParser.java new file mode 100644 index 00000000000..35a6999aab4 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/EchoServerResponseParser.java @@ -0,0 +1,51 @@ +/* + * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.openapitools.client.api; + +public class EchoServerResponseParser { + public String method; // e.g. GET + public String path; // e.g. /query/style_form/explode_true/object?id=12345 + public String protocol; // e.g. HTTP/1.1 + public java.util.HashMap headers = new java.util.HashMap<>(); + + public EchoServerResponseParser(String response) { + if (response == null) { + throw new RuntimeException("Echo server response cannot be null"); + } + + String[] lines = response.split("\n"); + boolean firstLine = true; + + for (String line : lines) { + if (firstLine) { + String[] items = line.split(" "); + this.method = items[0]; + this.path = items[1]; + this.protocol = items[2]; + firstLine = false; + continue; + } + + // store the header key-value pair in headers + String[] keyValue = line.split(": "); + if (keyValue.length == 2) { // skip blank line, non key-value pair + this.headers.put(keyValue[0], keyValue[1]); + } + } + + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FakeApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FakeApiTest.java deleted file mode 100644 index 8104e1dc7de..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FakeApiTest.java +++ /dev/null @@ -1,432 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import java.math.BigDecimal; -import org.openapitools.client.model.ChildWithNullable; -import org.openapitools.client.model.Client; -import org.openapitools.client.model.EnumClass; -import org.openapitools.client.model.FakeBigDecimalMap200Response; -import java.io.File; -import org.openapitools.client.model.FileSchemaTestClass; -import org.openapitools.client.model.HealthCheckResult; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import org.openapitools.client.model.OuterComposite; -import org.openapitools.client.model.OuterObjectWithEnumProperty; -import org.openapitools.client.model.Pet; -import org.openapitools.client.model.TestInlineFreeformAdditionalPropertiesRequest; -import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; - -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeApi - */ -public class FakeApiTest { - - private final FakeApi api = new FakeApi(); - - /** - * for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeBigDecimalMapTest() throws ApiException { - // - //FakeBigDecimalMap200Response response = api.fakeBigDecimalMap(); - - // TODO: test validations - } - /** - * Health check endpoint - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeHealthGetTest() throws ApiException { - // - //HealthCheckResult response = api.fakeHealthGet(); - - // TODO: test validations - } - /** - * test http signature authentication - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeHttpSignatureTestTest() throws ApiException { - // - //Pet pet = null; - // - //String query1 = null; - // - //String header1 = null; - // - //api.fakeHttpSignatureTest(pet, query1, header1); - - // TODO: test validations - } - /** - * Test serialization of outer boolean types - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterBooleanSerializeTest() throws ApiException { - // - //Boolean body = null; - // - //Boolean response = api.fakeOuterBooleanSerialize(body); - - // TODO: test validations - } - /** - * Test serialization of object with outer number type - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterCompositeSerializeTest() throws ApiException { - // - //OuterComposite outerComposite = null; - // - //OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite); - - // TODO: test validations - } - /** - * Test serialization of outer number types - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterNumberSerializeTest() throws ApiException { - // - //BigDecimal body = null; - // - //BigDecimal response = api.fakeOuterNumberSerialize(body); - - // TODO: test validations - } - /** - * Test serialization of outer string types - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakeOuterStringSerializeTest() throws ApiException { - // - //String body = null; - // - //String response = api.fakeOuterStringSerialize(body); - - // TODO: test validations - } - /** - * Test serialization of enum (int) properties with examples - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void fakePropertyEnumIntegerSerializeTest() throws ApiException { - // - //OuterObjectWithEnumProperty outerObjectWithEnumProperty = null; - // - //OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); - - // TODO: test validations - } - /** - * For this test, the body has to be a binary file. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testBodyWithBinaryTest() throws ApiException { - // - //File body = null; - // - //api.testBodyWithBinary(body); - - // TODO: test validations - } - /** - * For this test, the body for this request must reference a schema named `File`. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testBodyWithFileSchemaTest() throws ApiException { - // - //FileSchemaTestClass fileSchemaTestClass = null; - // - //api.testBodyWithFileSchema(fileSchemaTestClass); - - // TODO: test validations - } - /** - * @throws ApiException - * if the Api call fails - */ - @Test - public void testBodyWithQueryParamsTest() throws ApiException { - // - //String query = null; - // - //User user = null; - // - //api.testBodyWithQueryParams(query, user); - - // TODO: test validations - } - /** - * To test \"client\" model - * - * To test \"client\" model - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testClientModelTest() throws ApiException { - // - //Client client = null; - // - //Client response = api.testClientModel(client); - - // TODO: test validations - } - /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testEndpointParametersTest() throws ApiException { - // - //BigDecimal number = null; - // - //Double _double = null; - // - //String patternWithoutDelimiter = null; - // - //byte[] _byte = null; - // - //Integer integer = null; - // - //Integer int32 = null; - // - //Long int64 = null; - // - //Float _float = null; - // - //String string = null; - // - //File binary = null; - // - //LocalDate date = null; - // - //OffsetDateTime dateTime = null; - // - //String password = null; - // - //String paramCallback = null; - // - //api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback); - - // TODO: test validations - } - /** - * To test enum parameters - * - * To test enum parameters - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testEnumParametersTest() throws ApiException { - // - //List enumHeaderStringArray = null; - // - //String enumHeaderString = null; - // - //List enumQueryStringArray = null; - // - //String enumQueryString = null; - // - //Integer enumQueryInteger = null; - // - //Double enumQueryDouble = null; - // - //List enumQueryModelArray = null; - // - //List enumFormStringArray = null; - // - //String enumFormString = null; - // - //api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); - - // TODO: test validations - } - /** - * Fake endpoint to test group parameters (optional) - * - * Fake endpoint to test group parameters (optional) - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testGroupParametersTest() throws ApiException { - // - //Integer requiredStringGroup = null; - // - //Boolean requiredBooleanGroup = null; - // - //Long requiredInt64Group = null; - // - //Integer stringGroup = null; - // - //Boolean booleanGroup = null; - // - //Long int64Group = null; - // - //api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - // TODO: test validations - } - /** - * test inline additionalProperties - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testInlineAdditionalPropertiesTest() throws ApiException { - // - //Map requestBody = null; - // - //api.testInlineAdditionalProperties(requestBody); - - // TODO: test validations - } - /** - * test inline free-form additionalProperties - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testInlineFreeformAdditionalPropertiesTest() throws ApiException { - // - //TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = null; - // - //api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest); - - // TODO: test validations - } - /** - * test json serialization of form data - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testJsonFormDataTest() throws ApiException { - // - //String param = null; - // - //String param2 = null; - // - //api.testJsonFormData(param, param2); - - // TODO: test validations - } - /** - * test nullable parent property - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testNullableTest() throws ApiException { - // - //ChildWithNullable childWithNullable = null; - // - //api.testNullable(childWithNullable); - - // TODO: test validations - } - /** - * To test the collection format in query parameters - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testQueryParameterCollectionFormatTest() throws ApiException { - // - //List pipe = null; - // - //List ioutil = null; - // - //List http = null; - // - //List url = null; - // - //List context = null; - // - //String allowEmpty = null; - // - //Map language = null; - // - //api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); - - // TODO: test validations - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java deleted file mode 100644 index 4369000f256..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Client; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; - -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for FakeClassnameTags123Api - */ -public class FakeClassnameTags123ApiTest { - - private final FakeClassnameTags123Api api = new FakeClassnameTags123Api(); - - /** - * To test class name in snake case - * - * To test class name in snake case - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void testClassnameTest() throws ApiException { - // - //Client client = null; - // - //Client response = api.testClassname(client); - - // TODO: test validations - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FormApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FormApiTest.java new file mode 100644 index 00000000000..df8fae9511d --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/FormApiTest.java @@ -0,0 +1,83 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for FormApi + */ +public class FormApiTest { + + private final FormApi api = new FormApi(); + + /** + * Test form parameter(s) + * + * Test form parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testFormIntegerBooleanStringTest() throws ApiException { + // + //Integer integerForm = null; + // + //Boolean booleanForm = null; + // + //String stringForm = null; + // + //String response = api.testFormIntegerBooleanString(integerForm, booleanForm, stringForm); + + // TODO: test validations + } + /** + * Test form parameter(s) for oneOf schema + * + * Test form parameter(s) for oneOf schema + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testFormOneofTest() throws ApiException { + // + //String form1 = null; + // + //Integer form2 = null; + // + //String form3 = null; + // + //Boolean form4 = null; + // + //Long id = null; + // + //String name = null; + // + //String response = api.testFormOneof(form1, form2, form3, form4, id, name); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/HeaderApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/HeaderApiTest.java new file mode 100644 index 00000000000..9132aeb9b78 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/HeaderApiTest.java @@ -0,0 +1,61 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.model.StringEnumRef; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for HeaderApi + */ +public class HeaderApiTest { + + private final HeaderApi api = new HeaderApi(); + + /** + * Test header parameter(s) + * + * Test header parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testHeaderIntegerBooleanStringEnumsTest() throws ApiException { + // + //Integer integerHeader = null; + // + //Boolean booleanHeader = null; + // + //String stringHeader = null; + // + //String enumNonrefStringHeader = null; + // + //StringEnumRef enumRefStringHeader = null; + // + //String response = api.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/PathApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/PathApiTest.java new file mode 100644 index 00000000000..a48fb9c3bf3 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/PathApiTest.java @@ -0,0 +1,59 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.model.StringEnumRef; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for PathApi + */ +public class PathApiTest { + + private final PathApi api = new PathApi(); + + /** + * Test path parameter(s) + * + * Test path parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathTest() throws ApiException { + // + //String pathString = null; + // + //Integer pathInteger = null; + // + //String enumNonrefStringPath = null; + // + //StringEnumRef enumRefStringPath = null; + // + //String response = api.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/PetApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/PetApiTest.java deleted file mode 100644 index abc76d8d2db..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/PetApiTest.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import java.io.File; -import org.openapitools.client.model.ModelApiResponse; -import org.openapitools.client.model.Pet; - -import java.io.FileWriter; -import java.util.Set; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; - -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static io.smallrye.common.constraint.Assert.assertTrue; - -/** - * API tests for PetApi - */ -public class PetApiTest { - - private final PetApi api = new PetApi(); - - /** - * Add a new pet to the store - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void addPetTest() throws ApiException { - // - //Pet pet = null; - // - //api.addPet(pet); - - // TODO: test validations - } - /** - * Deletes a pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deletePetTest() throws ApiException { - // - //Long petId = null; - // - //String apiKey = null; - // - //api.deletePet(petId, apiKey); - - // TODO: test validations - } - /** - * Finds Pets by status - * - * Multiple status values can be provided with comma separated strings - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void findPetsByStatusTest() throws ApiException { - // - //List status = null; - // - //List response = api.findPetsByStatus(status); - - // TODO: test validations - } - /** - * Finds Pets by tags - * - * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void findPetsByTagsTest() throws ApiException { - // - //Set tags = null; - // - //Set response = api.findPetsByTags(tags); - - // TODO: test validations - } - /** - * Find pet by ID - * - * Returns a single pet - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getPetByIdTest() throws ApiException { - // - //Long petId = null; - // - //Pet response = api.getPetById(petId); - - // TODO: test validations - } - /** - * Update an existing pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetTest() throws ApiException { - // - //Pet pet = null; - // - //api.updatePet(pet); - - // TODO: test validations - } - /** - * Updates a pet in the store with form data - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updatePetWithFormTest() throws ApiException { - // - //Long petId = null; - // - //String name = null; - // - //String status = null; - // - //api.updatePetWithForm(petId, name, status); - - // TODO: test validations - } - - /** - * @see https://github.com/OpenAPITools/openapi-generator/issues/17367 - */ - @Test - public void uploadFileTest() throws Exception { - Long petId = 1L; - String additionalMetadata = "more data"; - File file = new File("test.txt"); - if(!file.exists()){ - file.createNewFile(); - } - FileWriter fw = new FileWriter(file); - fw.write("testing only"); - fw.close(); - file.deleteOnExit(); - String response = api.uploadFile(petId, additionalMetadata, file); - assertTrue(response.contains( - "Content-Disposition: form-data; name=\"file\"; filename=\"test.txt\"" - )); - } - /** - * uploads an image (required) - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void uploadFileWithRequiredFileTest() throws ApiException { - // - //Long petId = null; - // - //File requiredFile = null; - // - //String additionalMetadata = null; - // - //ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - - // TODO: test validations - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/QueryApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/QueryApiTest.java new file mode 100644 index 00000000000..a2bd6f65721 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/QueryApiTest.java @@ -0,0 +1,188 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.api; + +import org.openapitools.client.ApiException; +import org.openapitools.client.model.DataQuery; +import java.time.LocalDate; +import java.time.OffsetDateTime; +import org.openapitools.client.model.Pet; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter; +import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter; +import org.junit.Test; +import org.junit.Ignore; +import org.junit.Assert; + +import java.time.LocalDate; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for QueryApi + */ +public class QueryApiTest { + + private final QueryApi api = new QueryApi(); + + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testEnumRefStringTest() throws ApiException { + // + //String enumNonrefStringQuery = null; + // + //StringEnumRef enumRefStringQuery = null; + // + //String response = api.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryDatetimeDateStringTest() throws ApiException { + // + //OffsetDateTime datetimeQuery = null; + // + //LocalDate dateQuery = null; + // + //String stringQuery = null; + // + //String response = api.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryIntegerBooleanStringTest() throws ApiException { + // + //Integer integerQuery = null; + // + //Boolean booleanQuery = null; + // + //String stringQuery = null; + // + //String response = api.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleDeepObjectExplodeTrueObjectTest() throws ApiException { + // + //Pet queryObject = null; + // + //String response = api.testQueryStyleDeepObjectExplodeTrueObject(queryObject); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleDeepObjectExplodeTrueObjectAllOfTest() throws ApiException { + // + //TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null; + // + //String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueArrayStringTest() throws ApiException { + // + //TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null; + // + //String response = api.testQueryStyleFormExplodeTrueArrayString(queryObject); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectTest() throws ApiException { + // + //Pet queryObject = null; + // + //String response = api.testQueryStyleFormExplodeTrueObject(queryObject); + + // TODO: test validations + } + /** + * Test query parameter(s) + * + * Test query parameter(s) + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void testQueryStyleFormExplodeTrueObjectAllOfTest() throws ApiException { + // + //DataQuery queryObject = null; + // + //String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject); + + // TODO: test validations + } +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/StoreApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/StoreApiTest.java deleted file mode 100644 index f0456cb1998..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/StoreApiTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Order; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; - -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for StoreApi - */ -public class StoreApiTest { - - private final StoreApi api = new StoreApi(); - - /** - * Delete purchase order by ID - * - * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteOrderTest() throws ApiException { - // - //String orderId = null; - // - //api.deleteOrder(orderId); - - // TODO: test validations - } - /** - * Returns pet inventories by status - * - * Returns a map of status codes to quantities - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getInventoryTest() throws ApiException { - // - //Map response = api.getInventory(); - - // TODO: test validations - } - /** - * Find purchase order by ID - * - * For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getOrderByIdTest() throws ApiException { - // - //Long orderId = null; - // - //Order response = api.getOrderById(orderId); - - // TODO: test validations - } - /** - * Place an order for a pet - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void placeOrderTest() throws ApiException { - // - //Order order = null; - // - //Order response = api.placeOrder(order); - - // TODO: test validations - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/UserApiTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/UserApiTest.java deleted file mode 100644 index 6a405a0ae6f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/api/UserApiTest.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import java.time.OffsetDateTime; -import org.openapitools.client.model.User; -import org.junit.Test; -import org.junit.Ignore; -import org.junit.Assert; - -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserApi - */ -public class UserApiTest { - - private final UserApi api = new UserApi(); - - /** - * Create user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUserTest() throws ApiException { - // - //User user = null; - // - //api.createUser(user); - - // TODO: test validations - } - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithArrayInputTest() throws ApiException { - // - //List user = null; - // - //api.createUsersWithArrayInput(user); - - // TODO: test validations - } - /** - * Creates list of users with given input array - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void createUsersWithListInputTest() throws ApiException { - // - //List user = null; - // - //api.createUsersWithListInput(user); - - // TODO: test validations - } - /** - * Delete user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void deleteUserTest() throws ApiException { - // - //String username = null; - // - //api.deleteUser(username); - - // TODO: test validations - } - /** - * Get user by user name - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void getUserByNameTest() throws ApiException { - // - //String username = null; - // - //User response = api.getUserByName(username); - - // TODO: test validations - } - /** - * Logs user into the system - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void loginUserTest() throws ApiException { - // - //String username = null; - // - //String password = null; - // - //String response = api.loginUser(username, password); - - // TODO: test validations - } - /** - * Logs out current logged in user session - * - * - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void logoutUserTest() throws ApiException { - // - //api.logoutUser(); - - // TODO: test validations - } - /** - * Updated user - * - * This can only be done by the logged in user. - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void updateUserTest() throws ApiException { - // - //String username = null; - // - //User user = null; - // - //api.updateUser(username, user); - - // TODO: test validations - } -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java deleted file mode 100644 index 29bc5ae9694..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for AdditionalPropertiesClass - */ -public class AdditionalPropertiesClassTest { - private final AdditionalPropertiesClass model = new AdditionalPropertiesClass(); - - /** - * Model tests for AdditionalPropertiesClass - */ - @Test - public void testAdditionalPropertiesClass() { - // TODO: test AdditionalPropertiesClass - } - - /** - * Test the property 'mapProperty' - */ - @Test - public void mapPropertyTest() { - // TODO: test mapProperty - } - - /** - * Test the property 'mapOfMapProperty' - */ - @Test - public void mapOfMapPropertyTest() { - // TODO: test mapOfMapProperty - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java deleted file mode 100644 index dad0e9235de..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AllOfWithSingleRefTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.SingleRefType; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for AllOfWithSingleRef - */ -public class AllOfWithSingleRefTest { - private final AllOfWithSingleRef model = new AllOfWithSingleRef(); - - /** - * Model tests for AllOfWithSingleRef - */ - @Test - public void testAllOfWithSingleRef() { - // TODO: test AllOfWithSingleRef - } - - /** - * Test the property 'username' - */ - @Test - public void usernameTest() { - // TODO: test username - } - - /** - * Test the property 'singleRefType' - */ - @Test - public void singleRefTypeTest() { - // TODO: test singleRefType - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AnimalTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AnimalTest.java deleted file mode 100644 index da5609b5489..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/AnimalTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Animal - */ -public class AnimalTest { - private final Animal model = new Animal(); - - /** - * Model tests for Animal - */ - @Test - public void testAnimal() { - // TODO: test Animal - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java deleted file mode 100644 index cbc199f1575..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ArrayOfArrayOfNumberOnly - */ -public class ArrayOfArrayOfNumberOnlyTest { - private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfArrayOfNumberOnly - */ - @Test - public void testArrayOfArrayOfNumberOnly() { - // TODO: test ArrayOfArrayOfNumberOnly - } - - /** - * Test the property 'arrayArrayNumber' - */ - @Test - public void arrayArrayNumberTest() { - // TODO: test arrayArrayNumber - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java deleted file mode 100644 index 762f9d6dc33..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ArrayOfNumberOnly - */ -public class ArrayOfNumberOnlyTest { - private final ArrayOfNumberOnly model = new ArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfNumberOnly - */ - @Test - public void testArrayOfNumberOnly() { - // TODO: test ArrayOfNumberOnly - } - - /** - * Test the property 'arrayNumber' - */ - @Test - public void arrayNumberTest() { - // TODO: test arrayNumber - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayTestTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayTestTest.java deleted file mode 100644 index 20dc34a8c51..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ArrayTestTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ReadOnlyFirst; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ArrayTest - */ -public class ArrayTestTest { - private final ArrayTest model = new ArrayTest(); - - /** - * Model tests for ArrayTest - */ - @Test - public void testArrayTest() { - // TODO: test ArrayTest - } - - /** - * Test the property 'arrayOfString' - */ - @Test - public void arrayOfStringTest() { - // TODO: test arrayOfString - } - - /** - * Test the property 'arrayArrayOfInteger' - */ - @Test - public void arrayArrayOfIntegerTest() { - // TODO: test arrayArrayOfInteger - } - - /** - * Test the property 'arrayArrayOfModel' - */ - @Test - public void arrayArrayOfModelTest() { - // TODO: test arrayArrayOfModel - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FooTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/BirdTest.java similarity index 55% rename from samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FooTest.java rename to samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/BirdTest.java index 2a92367019b..3e82e9d7553 100644 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FooTest.java +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/BirdTest.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -23,25 +23,33 @@ import org.junit.Ignore; import org.junit.Test; /** - * Model tests for Foo + * Model tests for Bird */ -public class FooTest { - private final Foo model = new Foo(); +public class BirdTest { + private final Bird model = new Bird(); /** - * Model tests for Foo + * Model tests for Bird */ @Test - public void testFoo() { - // TODO: test Foo + public void testBird() { + // TODO: test Bird } /** - * Test the property 'bar' + * Test the property 'size' */ @Test - public void barTest() { - // TODO: test bar + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color } } diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CapitalizationTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CapitalizationTest.java deleted file mode 100644 index 4fd3728ab89..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CapitalizationTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Capitalization - */ -public class CapitalizationTest { - private final Capitalization model = new Capitalization(); - - /** - * Model tests for Capitalization - */ - @Test - public void testCapitalization() { - // TODO: test Capitalization - } - - /** - * Test the property 'smallCamel' - */ - @Test - public void smallCamelTest() { - // TODO: test smallCamel - } - - /** - * Test the property 'capitalCamel' - */ - @Test - public void capitalCamelTest() { - // TODO: test capitalCamel - } - - /** - * Test the property 'smallSnake' - */ - @Test - public void smallSnakeTest() { - // TODO: test smallSnake - } - - /** - * Test the property 'capitalSnake' - */ - @Test - public void capitalSnakeTest() { - // TODO: test capitalSnake - } - - /** - * Test the property 'scAETHFlowPoints' - */ - @Test - public void scAETHFlowPointsTest() { - // TODO: test scAETHFlowPoints - } - - /** - * Test the property 'ATT_NAME' - */ - @Test - public void ATT_NAMETest() { - // TODO: test ATT_NAME - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CatTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CatTest.java deleted file mode 100644 index d591bdd30ef..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CatTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Cat - */ -public class CatTest { - private final Cat model = new Cat(); - - /** - * Model tests for Cat - */ - @Test - public void testCat() { - // TODO: test Cat - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'declawed' - */ - @Test - public void declawedTest() { - // TODO: test declawed - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CategoryTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CategoryTest.java index 12de38c0c08..5b6a08fd677 100644 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CategoryTest.java +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/CategoryTest.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java deleted file mode 100644 index 2616181bec3..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ChildWithNullableTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.ParentWithNullable; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ChildWithNullable - */ -public class ChildWithNullableTest { - private final ChildWithNullable model = new ChildWithNullable(); - - /** - * Model tests for ChildWithNullable - */ - @Test - public void testChildWithNullable() { - // TODO: test ChildWithNullable - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'nullableProperty' - */ - @Test - public void nullablePropertyTest() { - // TODO: test nullableProperty - } - - /** - * Test the property 'otherProperty' - */ - @Test - public void otherPropertyTest() { - // TODO: test otherProperty - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ClassModelTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ClassModelTest.java deleted file mode 100644 index d1936d85e81..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ClassModelTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ClassModel - */ -public class ClassModelTest { - private final ClassModel model = new ClassModel(); - - /** - * Model tests for ClassModel - */ - @Test - public void testClassModel() { - // TODO: test ClassModel - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ClientTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ClientTest.java deleted file mode 100644 index 7aa0f5859ff..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ClientTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Client - */ -public class ClientTest { - private final Client model = new Client(); - - /** - * Model tests for Client - */ - @Test - public void testClient() { - // TODO: test Client - } - - /** - * Test the property 'client' - */ - @Test - public void clientTest() { - // TODO: test client - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DataQueryTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DataQueryTest.java new file mode 100644 index 00000000000..d08082e114e --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DataQueryTest.java @@ -0,0 +1,84 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.Query; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DataQuery + */ +public class DataQueryTest { + private final DataQuery model = new DataQuery(); + + /** + * Model tests for DataQuery + */ + @Test + public void testDataQuery() { + // TODO: test DataQuery + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'outcomes' + */ + @Test + public void outcomesTest() { + // TODO: test outcomes + } + + /** + * Test the property 'suffix' + */ + @Test + public void suffixTest() { + // TODO: test suffix + } + + /** + * Test the property 'text' + */ + @Test + public void textTest() { + // TODO: test text + } + + /** + * Test the property 'date' + */ + @Test + public void dateTest() { + // TODO: test date + } + +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DefaultValueTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DefaultValueTest.java new file mode 100644 index 00000000000..843a43b28d7 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DefaultValueTest.java @@ -0,0 +1,111 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.client.model.StringEnumRef; +import org.openapitools.jackson.nullable.JsonNullable; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.openapitools.jackson.nullable.JsonNullable; +import java.util.NoSuchElementException; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for DefaultValue + */ +public class DefaultValueTest { + private final DefaultValue model = new DefaultValue(); + + /** + * Model tests for DefaultValue + */ + @Test + public void testDefaultValue() { + // TODO: test DefaultValue + } + + /** + * Test the property 'arrayStringEnumRefDefault' + */ + @Test + public void arrayStringEnumRefDefaultTest() { + // TODO: test arrayStringEnumRefDefault + } + + /** + * Test the property 'arrayStringEnumDefault' + */ + @Test + public void arrayStringEnumDefaultTest() { + // TODO: test arrayStringEnumDefault + } + + /** + * Test the property 'arrayStringDefault' + */ + @Test + public void arrayStringDefaultTest() { + // TODO: test arrayStringDefault + } + + /** + * Test the property 'arrayIntegerDefault' + */ + @Test + public void arrayIntegerDefaultTest() { + // TODO: test arrayIntegerDefault + } + + /** + * Test the property 'arrayString' + */ + @Test + public void arrayStringTest() { + // TODO: test arrayString + } + + /** + * Test the property 'arrayStringNullable' + */ + @Test + public void arrayStringNullableTest() { + // TODO: test arrayStringNullable + } + + /** + * Test the property 'arrayStringExtensionNullable' + */ + @Test + public void arrayStringExtensionNullableTest() { + // TODO: test arrayStringExtensionNullable + } + + /** + * Test the property 'stringNullable' + */ + @Test + public void stringNullableTest() { + // TODO: test stringNullable + } + +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java deleted file mode 100644 index 65fd3cc0b76..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DeprecatedObjectTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for DeprecatedObject - */ -public class DeprecatedObjectTest { - private final DeprecatedObject model = new DeprecatedObject(); - - /** - * Model tests for DeprecatedObject - */ - @Test - public void testDeprecatedObject() { - // TODO: test DeprecatedObject - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DogTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DogTest.java deleted file mode 100644 index 744c8a406fe..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/DogTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Dog - */ -public class DogTest { - private final Dog model = new Dog(); - - /** - * Model tests for Dog - */ - @Test - public void testDog() { - // TODO: test Dog - } - - /** - * Test the property 'className' - */ - @Test - public void classNameTest() { - // TODO: test className - } - - /** - * Test the property 'color' - */ - @Test - public void colorTest() { - // TODO: test color - } - - /** - * Test the property 'breed' - */ - @Test - public void breedTest() { - // TODO: test breed - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumClassTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumClassTest.java deleted file mode 100644 index 3f50e1bfb9e..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumClassTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for EnumClass - */ -public class EnumClassTest { - /** - * Model tests for EnumClass - */ - @Test - public void testEnumClass() { - // TODO: test EnumClass - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumTestTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumTestTest.java deleted file mode 100644 index 0a1fd0f4268..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumTestTest.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.OuterEnum; -import org.openapitools.client.model.OuterEnumDefaultValue; -import org.openapitools.client.model.OuterEnumInteger; -import org.openapitools.client.model.OuterEnumIntegerDefaultValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for EnumTest - */ -public class EnumTestTest { - private final EnumTest model = new EnumTest(); - - /** - * Model tests for EnumTest - */ - @Test - public void testEnumTest() { - // TODO: test EnumTest - } - - /** - * Test the property 'enumString' - */ - @Test - public void enumStringTest() { - // TODO: test enumString - } - - /** - * Test the property 'enumStringRequired' - */ - @Test - public void enumStringRequiredTest() { - // TODO: test enumStringRequired - } - - /** - * Test the property 'enumInteger' - */ - @Test - public void enumIntegerTest() { - // TODO: test enumInteger - } - - /** - * Test the property 'enumNumber' - */ - @Test - public void enumNumberTest() { - // TODO: test enumNumber - } - - /** - * Test the property 'outerEnum' - */ - @Test - public void outerEnumTest() { - // TODO: test outerEnum - } - - /** - * Test the property 'outerEnumInteger' - */ - @Test - public void outerEnumIntegerTest() { - // TODO: test outerEnumInteger - } - - /** - * Test the property 'outerEnumDefaultValue' - */ - @Test - public void outerEnumDefaultValueTest() { - // TODO: test outerEnumDefaultValue - } - - /** - * Test the property 'outerEnumIntegerDefaultValue' - */ - @Test - public void outerEnumIntegerDefaultValueTest() { - // TODO: test outerEnumIntegerDefaultValue - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java deleted file mode 100644 index 88c1d374be6..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FakeBigDecimalMap200ResponseTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for FakeBigDecimalMap200Response - */ -public class FakeBigDecimalMap200ResponseTest { - private final FakeBigDecimalMap200Response model = new FakeBigDecimalMap200Response(); - - /** - * Model tests for FakeBigDecimalMap200Response - */ - @Test - public void testFakeBigDecimalMap200Response() { - // TODO: test FakeBigDecimalMap200Response - } - - /** - * Test the property 'someId' - */ - @Test - public void someIdTest() { - // TODO: test someId - } - - /** - * Test the property 'someMap' - */ - @Test - public void someMapTest() { - // TODO: test someMap - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java deleted file mode 100644 index fb8827a1e88..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.ModelFile; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for FileSchemaTestClass - */ -public class FileSchemaTestClassTest { - private final FileSchemaTestClass model = new FileSchemaTestClass(); - - /** - * Model tests for FileSchemaTestClass - */ - @Test - public void testFileSchemaTestClass() { - // TODO: test FileSchemaTestClass - } - - /** - * Test the property '_file' - */ - @Test - public void _fileTest() { - // TODO: test _file - } - - /** - * Test the property 'files' - */ - @Test - public void filesTest() { - // TODO: test files - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java deleted file mode 100644 index cd15af86ee9..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FooGetDefaultResponseTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.Foo; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for FooGetDefaultResponse - */ -public class FooGetDefaultResponseTest { - private final FooGetDefaultResponse model = new FooGetDefaultResponse(); - - /** - * Model tests for FooGetDefaultResponse - */ - @Test - public void testFooGetDefaultResponse() { - // TODO: test FooGetDefaultResponse - } - - /** - * Test the property 'string' - */ - @Test - public void stringTest() { - // TODO: test string - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FormatTestTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FormatTestTest.java deleted file mode 100644 index 8a9d3adfc01..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/FormatTestTest.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.io.File; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.UUID; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for FormatTest - */ -public class FormatTestTest { - private final FormatTest model = new FormatTest(); - - /** - * Model tests for FormatTest - */ - @Test - public void testFormatTest() { - // TODO: test FormatTest - } - - /** - * Test the property 'integer' - */ - @Test - public void integerTest() { - // TODO: test integer - } - - /** - * Test the property 'int32' - */ - @Test - public void int32Test() { - // TODO: test int32 - } - - /** - * Test the property 'int64' - */ - @Test - public void int64Test() { - // TODO: test int64 - } - - /** - * Test the property 'number' - */ - @Test - public void numberTest() { - // TODO: test number - } - - /** - * Test the property '_float' - */ - @Test - public void _floatTest() { - // TODO: test _float - } - - /** - * Test the property '_double' - */ - @Test - public void _doubleTest() { - // TODO: test _double - } - - /** - * Test the property 'decimal' - */ - @Test - public void decimalTest() { - // TODO: test decimal - } - - /** - * Test the property 'string' - */ - @Test - public void stringTest() { - // TODO: test string - } - - /** - * Test the property '_byte' - */ - @Test - public void _byteTest() { - // TODO: test _byte - } - - /** - * Test the property 'binary' - */ - @Test - public void binaryTest() { - // TODO: test binary - } - - /** - * Test the property 'date' - */ - @Test - public void dateTest() { - // TODO: test date - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'patternWithDigits' - */ - @Test - public void patternWithDigitsTest() { - // TODO: test patternWithDigits - } - - /** - * Test the property 'patternWithDigitsAndDelimiter' - */ - @Test - public void patternWithDigitsAndDelimiterTest() { - // TODO: test patternWithDigitsAndDelimiter - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java deleted file mode 100644 index bf777b061cc..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for HasOnlyReadOnly - */ -public class HasOnlyReadOnlyTest { - private final HasOnlyReadOnly model = new HasOnlyReadOnly(); - - /** - * Model tests for HasOnlyReadOnly - */ - @Test - public void testHasOnlyReadOnly() { - // TODO: test HasOnlyReadOnly - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'foo' - */ - @Test - public void fooTest() { - // TODO: test foo - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java deleted file mode 100644 index e96ffaa18f4..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/HealthCheckResultTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for HealthCheckResult - */ -public class HealthCheckResultTest { - private final HealthCheckResult model = new HealthCheckResult(); - - /** - * Model tests for HealthCheckResult - */ - @Test - public void testHealthCheckResult() { - // TODO: test HealthCheckResult - } - - /** - * Test the property 'nullableMessage' - */ - @Test - public void nullableMessageTest() { - // TODO: test nullableMessage - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/MapTestTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/MapTestTest.java deleted file mode 100644 index 50e909f0381..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/MapTestTest.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for MapTest - */ -public class MapTestTest { - private final MapTest model = new MapTest(); - - /** - * Model tests for MapTest - */ - @Test - public void testMapTest() { - // TODO: test MapTest - } - - /** - * Test the property 'mapMapOfString' - */ - @Test - public void mapMapOfStringTest() { - // TODO: test mapMapOfString - } - - /** - * Test the property 'mapOfEnumString' - */ - @Test - public void mapOfEnumStringTest() { - // TODO: test mapOfEnumString - } - - /** - * Test the property 'directMap' - */ - @Test - public void directMapTest() { - // TODO: test directMap - } - - /** - * Test the property 'indirectMap' - */ - @Test - public void indirectMapTest() { - // TODO: test indirectMap - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java deleted file mode 100644 index b16858dc17e..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; -import org.openapitools.client.model.Animal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ -public class MixedPropertiesAndAdditionalPropertiesClassTest { - private final MixedPropertiesAndAdditionalPropertiesClass model = new MixedPropertiesAndAdditionalPropertiesClass(); - - /** - * Model tests for MixedPropertiesAndAdditionalPropertiesClass - */ - @Test - public void testMixedPropertiesAndAdditionalPropertiesClass() { - // TODO: test MixedPropertiesAndAdditionalPropertiesClass - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'dateTime' - */ - @Test - public void dateTimeTest() { - // TODO: test dateTime - } - - /** - * Test the property 'map' - */ - @Test - public void mapTest() { - // TODO: test map - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/Model200ResponseTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/Model200ResponseTest.java deleted file mode 100644 index dd90f6799d3..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/Model200ResponseTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Model200Response - */ -public class Model200ResponseTest { - private final Model200Response model = new Model200Response(); - - /** - * Model tests for Model200Response - */ - @Test - public void testModel200Response() { - // TODO: test Model200Response - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'propertyClass' - */ - @Test - public void propertyClassTest() { - // TODO: test propertyClass - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java deleted file mode 100644 index e63f2ae5e9c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelApiResponseTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ModelApiResponse - */ -public class ModelApiResponseTest { - private final ModelApiResponse model = new ModelApiResponse(); - - /** - * Model tests for ModelApiResponse - */ - @Test - public void testModelApiResponse() { - // TODO: test ModelApiResponse - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelFileTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelFileTest.java deleted file mode 100644 index 264249edc1c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelFileTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ModelFile - */ -public class ModelFileTest { - private final ModelFile model = new ModelFile(); - - /** - * Model tests for ModelFile - */ - @Test - public void testModelFile() { - // TODO: test ModelFile - } - - /** - * Test the property 'sourceURI' - */ - @Test - public void sourceURITest() { - // TODO: test sourceURI - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelListTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelListTest.java deleted file mode 100644 index 81fd2dcc6a6..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelListTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ModelList - */ -public class ModelListTest { - private final ModelList model = new ModelList(); - - /** - * Model tests for ModelList - */ - @Test - public void testModelList() { - // TODO: test ModelList - } - - /** - * Test the property '_123list' - */ - @Test - public void _123listTest() { - // TODO: test _123list - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelReturnTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelReturnTest.java deleted file mode 100644 index 5840d4f8f0c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ModelReturnTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ModelReturn - */ -public class ModelReturnTest { - private final ModelReturn model = new ModelReturn(); - - /** - * Model tests for ModelReturn - */ - @Test - public void testModelReturn() { - // TODO: test ModelReturn - } - - /** - * Test the property '_return' - */ - @Test - public void _returnTest() { - // TODO: test _return - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NameTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NameTest.java deleted file mode 100644 index 9280c171539..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NameTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Name - */ -public class NameTest { - private final Name model = new Name(); - - /** - * Model tests for Name - */ - @Test - public void testName() { - // TODO: test Name - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'snakeCase' - */ - @Test - public void snakeCaseTest() { - // TODO: test snakeCase - } - - /** - * Test the property 'property' - */ - @Test - public void propertyTest() { - // TODO: test property - } - - /** - * Test the property '_123number' - */ - @Test - public void _123numberTest() { - // TODO: test _123number - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NullableClassTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NullableClassTest.java deleted file mode 100644 index c79c6366f83..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NullableClassTest.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for NullableClass - */ -public class NullableClassTest { - private final NullableClass model = new NullableClass(); - - /** - * Model tests for NullableClass - */ - @Test - public void testNullableClass() { - // TODO: test NullableClass - } - - /** - * Test the property 'integerProp' - */ - @Test - public void integerPropTest() { - // TODO: test integerProp - } - - /** - * Test the property 'numberProp' - */ - @Test - public void numberPropTest() { - // TODO: test numberProp - } - - /** - * Test the property 'booleanProp' - */ - @Test - public void booleanPropTest() { - // TODO: test booleanProp - } - - /** - * Test the property 'stringProp' - */ - @Test - public void stringPropTest() { - // TODO: test stringProp - } - - /** - * Test the property 'dateProp' - */ - @Test - public void datePropTest() { - // TODO: test dateProp - } - - /** - * Test the property 'datetimeProp' - */ - @Test - public void datetimePropTest() { - // TODO: test datetimeProp - } - - /** - * Test the property 'arrayNullableProp' - */ - @Test - public void arrayNullablePropTest() { - // TODO: test arrayNullableProp - } - - /** - * Test the property 'arrayAndItemsNullableProp' - */ - @Test - public void arrayAndItemsNullablePropTest() { - // TODO: test arrayAndItemsNullableProp - } - - /** - * Test the property 'arrayItemsNullable' - */ - @Test - public void arrayItemsNullableTest() { - // TODO: test arrayItemsNullable - } - - /** - * Test the property 'objectNullableProp' - */ - @Test - public void objectNullablePropTest() { - // TODO: test objectNullableProp - } - - /** - * Test the property 'objectAndItemsNullableProp' - */ - @Test - public void objectAndItemsNullablePropTest() { - // TODO: test objectAndItemsNullableProp - } - - /** - * Test the property 'objectItemsNullable' - */ - @Test - public void objectItemsNullableTest() { - // TODO: test objectItemsNullable - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NumberOnlyTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NumberOnlyTest.java deleted file mode 100644 index 63b5bc0440e..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NumberOnlyTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for NumberOnly - */ -public class NumberOnlyTest { - private final NumberOnly model = new NumberOnly(); - - /** - * Model tests for NumberOnly - */ - @Test - public void testNumberOnly() { - // TODO: test NumberOnly - } - - /** - * Test the property 'justNumber' - */ - @Test - public void justNumberTest() { - // TODO: test justNumber - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NumberPropertiesOnlyTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NumberPropertiesOnlyTest.java new file mode 100644 index 00000000000..80e515fd707 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/NumberPropertiesOnlyTest.java @@ -0,0 +1,64 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for NumberPropertiesOnly + */ +public class NumberPropertiesOnlyTest { + private final NumberPropertiesOnly model = new NumberPropertiesOnly(); + + /** + * Model tests for NumberPropertiesOnly + */ + @Test + public void testNumberPropertiesOnly() { + // TODO: test NumberPropertiesOnly + } + + /** + * Test the property 'number' + */ + @Test + public void numberTest() { + // TODO: test number + } + + /** + * Test the property '_float' + */ + @Test + public void _floatTest() { + // TODO: test _float + } + + /** + * Test the property '_double' + */ + @Test + public void _doubleTest() { + // TODO: test _double + } + +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java deleted file mode 100644 index 4203b62f784..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ObjectWithDeprecatedFieldsTest.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.openapitools.client.model.DeprecatedObject; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ObjectWithDeprecatedFields - */ -public class ObjectWithDeprecatedFieldsTest { - private final ObjectWithDeprecatedFields model = new ObjectWithDeprecatedFields(); - - /** - * Model tests for ObjectWithDeprecatedFields - */ - @Test - public void testObjectWithDeprecatedFields() { - // TODO: test ObjectWithDeprecatedFields - } - - /** - * Test the property 'uuid' - */ - @Test - public void uuidTest() { - // TODO: test uuid - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'deprecatedRef' - */ - @Test - public void deprecatedRefTest() { - // TODO: test deprecatedRef - } - - /** - * Test the property 'bars' - */ - @Test - public void barsTest() { - // TODO: test bars - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OrderTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OrderTest.java deleted file mode 100644 index e0fbb529af6..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OrderTest.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.time.OffsetDateTime; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for Order - */ -public class OrderTest { - private final Order model = new Order(); - - /** - * Model tests for Order - */ - @Test - public void testOrder() { - // TODO: test Order - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'petId' - */ - @Test - public void petIdTest() { - // TODO: test petId - } - - /** - * Test the property 'quantity' - */ - @Test - public void quantityTest() { - // TODO: test quantity - } - - /** - * Test the property 'shipDate' - */ - @Test - public void shipDateTest() { - // TODO: test shipDate - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'complete' - */ - @Test - public void completeTest() { - // TODO: test complete - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterCompositeTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterCompositeTest.java deleted file mode 100644 index 840cf65c8d0..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterCompositeTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.math.BigDecimal; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for OuterComposite - */ -public class OuterCompositeTest { - private final OuterComposite model = new OuterComposite(); - - /** - * Model tests for OuterComposite - */ - @Test - public void testOuterComposite() { - // TODO: test OuterComposite - } - - /** - * Test the property 'myNumber' - */ - @Test - public void myNumberTest() { - // TODO: test myNumber - } - - /** - * Test the property 'myString' - */ - @Test - public void myStringTest() { - // TODO: test myString - } - - /** - * Test the property 'myBoolean' - */ - @Test - public void myBooleanTest() { - // TODO: test myBoolean - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java deleted file mode 100644 index 5b9bae28ec6..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumDefaultValueTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for OuterEnumDefaultValue - */ -public class OuterEnumDefaultValueTest { - /** - * Model tests for OuterEnumDefaultValue - */ - @Test - public void testOuterEnumDefaultValue() { - // TODO: test OuterEnumDefaultValue - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java deleted file mode 100644 index 731acbf905f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumIntegerDefaultValueTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for OuterEnumIntegerDefaultValue - */ -public class OuterEnumIntegerDefaultValueTest { - /** - * Model tests for OuterEnumIntegerDefaultValue - */ - @Test - public void testOuterEnumIntegerDefaultValue() { - // TODO: test OuterEnumIntegerDefaultValue - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java deleted file mode 100644 index 234945cec0f..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumIntegerTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for OuterEnumInteger - */ -public class OuterEnumIntegerTest { - /** - * Model tests for OuterEnumInteger - */ - @Test - public void testOuterEnumInteger() { - // TODO: test OuterEnumInteger - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumTest.java deleted file mode 100644 index b312b11a09e..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterEnumTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for OuterEnum - */ -public class OuterEnumTest { - /** - * Model tests for OuterEnum - */ - @Test - public void testOuterEnum() { - // TODO: test OuterEnum - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java deleted file mode 100644 index 964d1281b21..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/OuterObjectWithEnumPropertyTest.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.client.model.OuterEnumInteger; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for OuterObjectWithEnumProperty - */ -public class OuterObjectWithEnumPropertyTest { - private final OuterObjectWithEnumProperty model = new OuterObjectWithEnumProperty(); - - /** - * Model tests for OuterObjectWithEnumProperty - */ - @Test - public void testOuterObjectWithEnumProperty() { - // TODO: test OuterObjectWithEnumProperty - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java deleted file mode 100644 index bdd46008b13..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ParentWithNullableTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.openapitools.jackson.nullable.JsonNullable; -import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openapitools.jackson.nullable.JsonNullable; -import java.util.NoSuchElementException; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ParentWithNullable - */ -public class ParentWithNullableTest { - private final ParentWithNullable model = new ParentWithNullable(); - - /** - * Model tests for ParentWithNullable - */ - @Test - public void testParentWithNullable() { - // TODO: test ParentWithNullable - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'nullableProperty' - */ - @Test - public void nullablePropertyTest() { - // TODO: test nullableProperty - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/PetTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/PetTest.java index ca23198fbf1..30e1991c7e3 100644 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/PetTest.java +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/PetTest.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -18,12 +18,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import java.util.ArrayList; import java.util.Arrays; -import java.util.LinkedHashSet; import java.util.List; -import java.util.Set; import org.openapitools.client.model.Category; import org.openapitools.client.model.Tag; import org.junit.Assert; @@ -52,14 +49,6 @@ public class PetTest { // TODO: test id } - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - /** * Test the property 'name' */ @@ -68,6 +57,14 @@ public class PetTest { // TODO: test name } + /** + * Test the property 'category' + */ + @Test + public void categoryTest() { + // TODO: test category + } + /** * Test the property 'photoUrls' */ diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumArraysTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/QueryTest.java similarity index 53% rename from samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumArraysTest.java rename to samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/QueryTest.java index 694e4196138..3ae0ecb7b70 100644 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/EnumArraysTest.java +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/QueryTest.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -26,33 +26,33 @@ import org.junit.Ignore; import org.junit.Test; /** - * Model tests for EnumArrays + * Model tests for Query */ -public class EnumArraysTest { - private final EnumArrays model = new EnumArrays(); +public class QueryTest { + private final Query model = new Query(); /** - * Model tests for EnumArrays + * Model tests for Query */ @Test - public void testEnumArrays() { - // TODO: test EnumArrays + public void testQuery() { + // TODO: test Query } /** - * Test the property 'justSymbol' + * Test the property 'id' */ @Test - public void justSymbolTest() { - // TODO: test justSymbol + public void idTest() { + // TODO: test id } /** - * Test the property 'arrayEnum' + * Test the property 'outcomes' */ @Test - public void arrayEnumTest() { - // TODO: test arrayEnum + public void outcomesTest() { + // TODO: test outcomes } } diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java deleted file mode 100644 index b356d6993c5..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ReadOnlyFirst - */ -public class ReadOnlyFirstTest { - private final ReadOnlyFirst model = new ReadOnlyFirst(); - - /** - * Model tests for ReadOnlyFirst - */ - @Test - public void testReadOnlyFirst() { - // TODO: test ReadOnlyFirst - } - - /** - * Test the property 'bar' - */ - @Test - public void barTest() { - // TODO: test bar - } - - /** - * Test the property 'baz' - */ - @Test - public void bazTest() { - // TODO: test baz - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java deleted file mode 100644 index 920d02c930c..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/SingleRefTypeTest.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for SingleRefType - */ -public class SingleRefTypeTest { - /** - * Model tests for SingleRefType - */ - @Test - public void testSingleRefType() { - // TODO: test SingleRefType - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java deleted file mode 100644 index 8eb0b1bd269..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/SpecialModelNameTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for SpecialModelName - */ -public class SpecialModelNameTest { - private final SpecialModelName model = new SpecialModelName(); - - /** - * Model tests for SpecialModelName - */ - @Test - public void testSpecialModelName() { - // TODO: test SpecialModelName - } - - /** - * Test the property '$specialPropertyName' - */ - @Test - public void $specialPropertyNameTest() { - // TODO: test $specialPropertyName - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/StringEnumRefTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/StringEnumRefTest.java new file mode 100644 index 00000000000..81bf17732bd --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/StringEnumRefTest.java @@ -0,0 +1,32 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for StringEnumRef + */ +public class StringEnumRefTest { + /** + * Model tests for StringEnumRef + */ + @Test + public void testStringEnumRef() { + // TODO: test StringEnumRef + } + +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TagTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TagTest.java index 6dc0868167c..073b7aca33c 100644 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TagTest.java +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TagTest.java @@ -1,9 +1,9 @@ /* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + * Echo Server API + * Echo Server API * - * The version of the OpenAPI document: 1.0.0 - * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequestTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequestTest.java deleted file mode 100644 index 819a1e7fa9d..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestInlineFreeformAdditionalPropertiesRequestTest.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.HashMap; -import java.util.Map; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for TestInlineFreeformAdditionalPropertiesRequest - */ -public class TestInlineFreeformAdditionalPropertiesRequestTest { - private final TestInlineFreeformAdditionalPropertiesRequest model = new TestInlineFreeformAdditionalPropertiesRequest(); - - /** - * Model tests for TestInlineFreeformAdditionalPropertiesRequest - */ - @Test - public void testTestInlineFreeformAdditionalPropertiesRequest() { - // TODO: test TestInlineFreeformAdditionalPropertiesRequest - } - - /** - * Test the property 'someProperty' - */ - @Test - public void somePropertyTest() { - // TODO: test someProperty - } - -} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.java new file mode 100644 index 00000000000..8ab39f47d76 --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest.java @@ -0,0 +1,71 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + */ +public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest { + private final TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter model = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); + + /** + * Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + */ + @Test + public void testTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() { + // TODO: test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'color' + */ + @Test + public void colorTest() { + // TODO: test color + } + + /** + * Test the property 'id' + */ + @Test + public void idTest() { + // TODO: test id + } + + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java new file mode 100644 index 00000000000..f3e020346fa --- /dev/null +++ b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest.java @@ -0,0 +1,50 @@ +/* + * Echo Server API + * Echo Server API + * + * The version of the OpenAPI document: 0.1.0 + * Contact: team@openapitools.org + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package org.openapitools.client.model; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.Assert; +import org.junit.Ignore; +import org.junit.Test; + +/** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ +public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest { + private final TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter model = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter(); + + /** + * Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + */ + @Test + public void testTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() { + // TODO: test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter + } + + /** + * Test the property 'values' + */ + @Test + public void valuesTest() { + // TODO: test values + } + +} diff --git a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/UserTest.java b/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/UserTest.java deleted file mode 100644 index b029d279409..00000000000 --- a/samples/client/petstore/java/resteasy-echo/src/test/java/org/openapitools/client/model/UserTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonTypeName; -import com.fasterxml.jackson.annotation.JsonValue; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for User - */ -public class UserTest { - private final User model = new User(); - - /** - * Model tests for User - */ - @Test - public void testUser() { - // TODO: test User - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'username' - */ - @Test - public void usernameTest() { - // TODO: test username - } - - /** - * Test the property 'firstName' - */ - @Test - public void firstNameTest() { - // TODO: test firstName - } - - /** - * Test the property 'lastName' - */ - @Test - public void lastNameTest() { - // TODO: test lastName - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'phone' - */ - @Test - public void phoneTest() { - // TODO: test phone - } - - /** - * Test the property 'userStatus' - */ - @Test - public void userStatusTest() { - // TODO: test userStatus - } - -}