forked from loafle/openapi-generator-original
[Ruby] add property, parameter name mapping (#16191)
* add property, parameter name mapping support to ruby generators * update samples
This commit is contained in:
@@ -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 | |
|
||||
@@ -542,6 +543,73 @@ No authorization required
|
||||
- **Accept**: */*
|
||||
|
||||
|
||||
## get_parameter_name_mapping
|
||||
|
||||
> get_parameter_name_mapping(underscore_type, type, type_with_underscore, http_debug_option)
|
||||
|
||||
parameter name mapping test
|
||||
|
||||
### Examples
|
||||
|
||||
```ruby
|
||||
require 'time'
|
||||
require 'petstore'
|
||||
|
||||
api_instance = Petstore::FakeApi.new
|
||||
underscore_type = 789 # Integer | _type
|
||||
type = 'type_example' # String | type
|
||||
type_with_underscore = 'type_with_underscore_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(underscore_type, type, type_with_underscore, 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(underscore_type, type, type_with_underscore, http_debug_option)
|
||||
|
||||
```ruby
|
||||
begin
|
||||
# parameter name mapping test
|
||||
data, status_code, headers = api_instance.get_parameter_name_mapping_with_http_info(underscore_type, type, type_with_underscore, 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 |
|
||||
| ---- | ---- | ----------- | ----- |
|
||||
| **underscore_type** | **Integer** | _type | |
|
||||
| **type** | **String** | type | |
|
||||
| **type_with_underscore** | **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)
|
||||
|
||||
Reference in New Issue
Block a user