mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-06 23:50:49 +00:00
Merge pull request #2169 from xhh/ruby-nested-model-ref
[Ruby] Fix class name reference of nested model
This commit is contained in:
commit
84b4af7bfb
@ -316,7 +316,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
if (type == null) {
|
||||
return null;
|
||||
}
|
||||
return type;
|
||||
return toModelName(type);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -298,7 +298,7 @@ module Petstore
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
auth_names = ['api_key', 'petstore_auth']
|
||||
auth_names = ['petstore_auth', 'api_key']
|
||||
data, status_code, headers = @api_client.call_api(:GET, path,
|
||||
:header_params => header_params,
|
||||
:query_params => query_params,
|
||||
@ -550,7 +550,7 @@ module Petstore
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
auth_names = ['api_key', 'petstore_auth']
|
||||
auth_names = ['petstore_auth', 'api_key']
|
||||
data, status_code, headers = @api_client.call_api(:GET, path,
|
||||
:header_params => header_params,
|
||||
:query_params => query_params,
|
||||
|
@ -182,7 +182,7 @@ module Petstore
|
||||
# http body (model)
|
||||
post_body = nil
|
||||
|
||||
auth_names = ['test_api_key_header', 'test_api_key_query']
|
||||
auth_names = ['test_api_key_query', 'test_api_key_header']
|
||||
data, status_code, headers = @api_client.call_api(:GET, path,
|
||||
:header_params => header_params,
|
||||
:query_params => query_params,
|
||||
|
@ -157,26 +157,12 @@ module Petstore
|
||||
# Returns Auth Settings hash for api client.
|
||||
def auth_settings
|
||||
{
|
||||
'test_api_key_header' =>
|
||||
'petstore_auth' =>
|
||||
{
|
||||
type: 'api_key',
|
||||
type: 'oauth2',
|
||||
in: 'header',
|
||||
key: 'test_api_key_header',
|
||||
value: api_key_with_prefix('test_api_key_header')
|
||||
},
|
||||
'api_key' =>
|
||||
{
|
||||
type: 'api_key',
|
||||
in: 'header',
|
||||
key: 'api_key',
|
||||
value: api_key_with_prefix('api_key')
|
||||
},
|
||||
'test_api_client_secret' =>
|
||||
{
|
||||
type: 'api_key',
|
||||
in: 'header',
|
||||
key: 'x-test_api_client_secret',
|
||||
value: api_key_with_prefix('x-test_api_client_secret')
|
||||
key: 'Authorization',
|
||||
value: "Bearer #{access_token}"
|
||||
},
|
||||
'test_api_client_id' =>
|
||||
{
|
||||
@ -185,6 +171,20 @@ module Petstore
|
||||
key: 'x-test_api_client_id',
|
||||
value: api_key_with_prefix('x-test_api_client_id')
|
||||
},
|
||||
'test_api_client_secret' =>
|
||||
{
|
||||
type: 'api_key',
|
||||
in: 'header',
|
||||
key: 'x-test_api_client_secret',
|
||||
value: api_key_with_prefix('x-test_api_client_secret')
|
||||
},
|
||||
'api_key' =>
|
||||
{
|
||||
type: 'api_key',
|
||||
in: 'header',
|
||||
key: 'api_key',
|
||||
value: api_key_with_prefix('api_key')
|
||||
},
|
||||
'test_api_key_query' =>
|
||||
{
|
||||
type: 'api_key',
|
||||
@ -192,12 +192,12 @@ module Petstore
|
||||
key: 'test_api_key_query',
|
||||
value: api_key_with_prefix('test_api_key_query')
|
||||
},
|
||||
'petstore_auth' =>
|
||||
'test_api_key_header' =>
|
||||
{
|
||||
type: 'oauth2',
|
||||
type: 'api_key',
|
||||
in: 'header',
|
||||
key: 'Authorization',
|
||||
value: "Bearer #{access_token}"
|
||||
key: 'test_api_key_header',
|
||||
value: api_key_with_prefix('test_api_key_header')
|
||||
},
|
||||
}
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user