[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

@@ -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)

View File

@@ -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.
> <Array(String, Integer, Hash)> 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
> <Pet> test_echo_body_all_of_pet(opts)

View File

@@ -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