[Java RESTEasy client] updating test to use the Java RESTEasy echo api client (#17367) (#17470)

* updating test to use the Java RESTEasy echo api client (#17367)

* regenerated samples

* set source and target to 1.8 to fix workflow failure, adapted parser
This commit is contained in:
Milad
2023-12-26 02:32:51 +01:00
committed by GitHub
parent a67e07e132
commit 8c014372aa
275 changed files with 9144 additions and 19842 deletions

View File

@@ -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)
<a id="testbodymultipartformdatasinglebinary"></a>
# **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<string> 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 |
|-------------|-------------|------------------|