Update ruby httpx petstore test (#16753)

* update ruby httpx petstore test

* fix pom

* comment out ruby httpx tests
This commit is contained in:
William Cheng
2023-10-09 15:43:21 +08:00
committed by GitHub
parent e3db882ed4
commit 23c5db602f
109 changed files with 5060 additions and 655 deletions

View File

@@ -1,18 +0,0 @@
# Petstore::ChildWithNullable
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **other_property** | **String** | | [optional] |
## Example
```ruby
require 'petstore'
instance = Petstore::ChildWithNullable.new(
other_property: null
)
```

View File

@@ -12,6 +12,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**fake_outer_number_serialize**](FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number | |
| [**fake_outer_string_serialize**](FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string | |
| [**fake_property_enum_integer_serialize**](FakeApi.md#fake_property_enum_integer_serialize) | **POST** /fake/property/enum-int | |
| [**get_parameter_name_mapping**](FakeApi.md#get_parameter_name_mapping) | **GET** /fake/parameter-name-mapping | parameter name mapping test |
| [**test_body_with_binary**](FakeApi.md#test_body_with_binary) | **PUT** /fake/body-with-binary | |
| [**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema | |
| [**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params | |
@@ -22,7 +23,6 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
| [**test_inline_freeform_additional_properties**](FakeApi.md#test_inline_freeform_additional_properties) | **POST** /fake/inline-freeform-additionalProperties | test inline free-form additionalProperties |
| [**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data |
| [**test_nullable**](FakeApi.md#test_nullable) | **POST** /fake/nullable | test nullable parent property |
| [**test_query_parameter_collection_format**](FakeApi.md#test_query_parameter_collection_format) | **PUT** /fake/test-query-parameters | |
@@ -544,6 +544,73 @@ No authorization required
- **Accept**: */*
## get_parameter_name_mapping
> get_parameter_name_mapping(_type, type, type_, http_debug_option)
parameter name mapping test
### Examples
```ruby
require 'time'
require 'petstore'
api_instance = Petstore::FakeApi.new
_type = 789 # Integer | _type
type = 'type_example' # String | type
type_ = 'type__example' # String | type_
http_debug_option = 'http_debug_option_example' # String | http debug option (to test parameter naming option)
begin
# parameter name mapping test
api_instance.get_parameter_name_mapping(_type, type, type_, http_debug_option)
rescue Petstore::ApiError => e
puts "Error when calling FakeApi->get_parameter_name_mapping: #{e}"
end
```
#### Using the get_parameter_name_mapping_with_http_info variant
This returns an Array which contains the response data (`nil` in this case), status code and headers.
> <Array(nil, Integer, Hash)> get_parameter_name_mapping_with_http_info(_type, type, type_, http_debug_option)
```ruby
begin
# parameter name mapping test
data, status_code, headers = api_instance.get_parameter_name_mapping_with_http_info(_type, type, type_, http_debug_option)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Petstore::ApiError => e
puts "Error when calling FakeApi->get_parameter_name_mapping_with_http_info: #{e}"
end
```
### Parameters
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **_type** | **Integer** | _type | |
| **type** | **String** | type | |
| **type_** | **String** | type_ | |
| **http_debug_option** | **String** | http debug option (to test parameter naming option) | |
### Return type
nil (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
## test_body_with_binary
> test_body_with_binary(body)
@@ -1246,69 +1313,6 @@ No authorization required
- **Accept**: Not defined
## test_nullable
> test_nullable(child_with_nullable)
test nullable parent property
### Examples
```ruby
require 'time'
require 'petstore'
api_instance = Petstore::FakeApi.new
child_with_nullable = Petstore::ChildWithNullable.new # ChildWithNullable | request body
begin
# test nullable parent property
api_instance.test_nullable(child_with_nullable)
rescue Petstore::ApiError => e
puts "Error when calling FakeApi->test_nullable: #{e}"
end
```
#### Using the test_nullable_with_http_info variant
This returns an Array which contains the response data (`nil` in this case), status code and headers.
> <Array(nil, Integer, Hash)> test_nullable_with_http_info(child_with_nullable)
```ruby
begin
# test nullable parent property
data, status_code, headers = api_instance.test_nullable_with_http_info(child_with_nullable)
p status_code # => 2xx
p headers # => { ... }
p data # => nil
rescue Petstore::ApiError => e
puts "Error when calling FakeApi->test_nullable_with_http_info: #{e}"
end
```
### Parameters
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **child_with_nullable** | [**ChildWithNullable**](ChildWithNullable.md) | request body | |
### Return type
nil (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
## test_query_parameter_collection_format
> test_query_parameter_collection_format(pipe, ioutil, http, url, context, allow_empty, opts)

View File

@@ -0,0 +1,20 @@
# Petstore::InlineObject
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **name** | **String** | Updated name of the pet | [optional] |
| **status** | **String** | Updated status of the pet | [optional] |
## Example
```ruby
require 'petstore'
instance = Petstore::InlineObject.new(
name: null,
status: null
)
```

View File

@@ -0,0 +1,20 @@
# Petstore::InlineObject1
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **additional_metadata** | **String** | Additional data to pass to server | [optional] |
| **file** | **File** | file to upload | [optional] |
## Example
```ruby
require 'petstore'
instance = Petstore::InlineObject1.new(
additional_metadata: null,
file: null
)
```

View File

@@ -0,0 +1,20 @@
# Petstore::InlineObject2
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **enum_form_string_array** | **Array&lt;String&gt;** | Form parameter enum test (string array) | [optional] |
| **enum_form_string** | **String** | Form parameter enum test (string) | [optional][default to &#39;-efg&#39;] |
## Example
```ruby
require 'petstore'
instance = Petstore::InlineObject2.new(
enum_form_string_array: null,
enum_form_string: null
)
```

View File

@@ -0,0 +1,44 @@
# Petstore::InlineObject3
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **integer** | **Integer** | None | [optional] |
| **int32** | **Integer** | None | [optional] |
| **int64** | **Integer** | None | [optional] |
| **number** | **Float** | None | |
| **float** | **Float** | None | [optional] |
| **double** | **Float** | None | |
| **string** | **String** | None | [optional] |
| **pattern_without_delimiter** | **String** | None | |
| **byte** | **String** | None | |
| **binary** | **File** | None | [optional] |
| **date** | **Date** | None | [optional] |
| **date_time** | **Time** | None | [optional] |
| **password** | **String** | None | [optional] |
| **callback** | **String** | None | [optional] |
## Example
```ruby
require 'petstore'
instance = Petstore::InlineObject3.new(
integer: null,
int32: null,
int64: null,
number: null,
float: null,
double: null,
string: null,
pattern_without_delimiter: null,
byte: null,
binary: null,
date: null,
date_time: null,
password: null,
callback: null
)
```

View File

@@ -0,0 +1,20 @@
# Petstore::InlineObject4
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **param** | **String** | field1 | |
| **param2** | **String** | field2 | |
## Example
```ruby
require 'petstore'
instance = Petstore::InlineObject4.new(
param: null,
param2: null
)
```

View File

@@ -0,0 +1,20 @@
# Petstore::InlineObject5
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **additional_metadata** | **String** | Additional data to pass to server | [optional] |
| **required_file** | **File** | file to upload | |
## Example
```ruby
require 'petstore'
instance = Petstore::InlineObject5.new(
additional_metadata: null,
required_file: null
)
```

View File

@@ -0,0 +1,18 @@
# Petstore::InlineResponseDefault
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **string** | [**Foo**](Foo.md) | | [optional] |
## Example
```ruby
require 'petstore'
instance = Petstore::InlineResponseDefault.new(
string: null
)
```

View File

@@ -0,0 +1,63 @@
# Petstore::Mammal
## Class instance methods
### `openapi_one_of`
Returns the list of classes defined in oneOf.
#### Example
```ruby
require 'petstore'
Petstore::Mammal.openapi_one_of
# =>
# [
# :'Whale',
# :'Zebra'
# ]
```
### `openapi_discriminator_name`
Returns the discriminator's property name.
#### Example
```ruby
require 'petstore'
Petstore::Mammal.openapi_discriminator_name
# => :'classname'
```
```
### build
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
#### Example
```ruby
require 'petstore'
Petstore::Mammal.build(data)
# => #<Whale:0x00007fdd4aab02a0>
Petstore::Mammal.build(data_that_doesnt_match)
# => nil
```
#### Parameters
| Name | Type | Description |
| ---- | ---- | ----------- |
| **data** | **Mixed** | data to be matched against the list of oneOf items |
#### Return type
- `Whale`
- `Zebra`
- `nil` (if no type matches)

View File

@@ -0,0 +1,24 @@
# Petstore::MammalAnyof
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **has_baleen** | **Boolean** | | [optional] |
| **has_teeth** | **Boolean** | | [optional] |
| **classname** | **String** | | |
| **type** | **String** | | [optional] |
## Example
```ruby
require 'petstore'
instance = Petstore::MammalAnyof.new(
has_baleen: null,
has_teeth: null,
classname: null,
type: null
)
```

View File

@@ -0,0 +1,49 @@
# Petstore::MammalWithoutDiscriminator
## Class instance methods
### `openapi_one_of`
Returns the list of classes defined in oneOf.
#### Example
```ruby
require 'petstore'
Petstore::MammalWithoutDiscriminator.openapi_one_of
# =>
# [
# :'Whale',
# :'Zebra'
# ]
```
### build
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
#### Example
```ruby
require 'petstore'
Petstore::MammalWithoutDiscriminator.build(data)
# => #<Whale:0x00007fdd4aab02a0>
Petstore::MammalWithoutDiscriminator.build(data_that_doesnt_match)
# => nil
```
#### Parameters
| Name | Type | Description |
| ---- | ---- | ----------- |
| **data** | **Mixed** | data to be matched against the list of oneOf items |
#### Return type
- `Whale`
- `Zebra`
- `nil` (if no type matches)

View File

@@ -0,0 +1,24 @@
# Petstore::PropertyNameMapping
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **http_debug_operation** | **String** | | [optional] |
| **_type** | **String** | | [optional] |
| **type** | **String** | | [optional] |
| **type_** | **String** | | [optional] |
## Example
```ruby
require 'petstore'
instance = Petstore::PropertyNameMapping.new(
http_debug_operation: null,
_type: null,
type: null,
type_: null
)
```

View File

@@ -0,0 +1,22 @@
# Petstore::Whale
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **has_baleen** | **Boolean** | | [optional] |
| **has_teeth** | **Boolean** | | [optional] |
| **classname** | **String** | | |
## Example
```ruby
require 'petstore'
instance = Petstore::Whale.new(
has_baleen: null,
has_teeth: null,
classname: null
)
```

View File

@@ -1,20 +1,20 @@
# Petstore::ParentWithNullable
# Petstore::Zebra
## Properties
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **type** | **String** | | [optional] |
| **nullable_property** | **String** | | [optional] |
| **classname** | **String** | | |
## Example
```ruby
require 'petstore'
instance = Petstore::ParentWithNullable.new(
instance = Petstore::Zebra.new(
type: null,
nullable_property: null
classname: null
)
```