forked from loafle/openapi-generator-original
remove unnecessary change for ruby codegen
This commit is contained in:
@@ -156,12 +156,20 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
|
||||
cliOptions.add(new CliOption(GEM_AUTHOR_EMAIL, "gem author email (only one is supported)."));
|
||||
|
||||
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "hides the timestamp when files were generated").
|
||||
defaultValue(Boolean.TRUE.toString()));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processOpts() {
|
||||
super.processOpts();
|
||||
|
||||
// default HIDE_GENERATION_TIMESTAMP to true
|
||||
if (!additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) {
|
||||
additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, Boolean.TRUE.toString());
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(GEM_NAME)) {
|
||||
setGemName((String) additionalProperties.get(GEM_NAME));
|
||||
}
|
||||
|
||||
@@ -10,7 +10,9 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
||||
|
||||
- API version: {{appVersion}}
|
||||
- Package version: {{gemVersion}}
|
||||
{{^hideGenerationTimestamp}}
|
||||
- Build date: {{generatedDate}}
|
||||
{{/hideGenerationTimestamp}}
|
||||
- Build package: {{generatorClass}}
|
||||
{{#infoUrl}}
|
||||
For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
|
||||
|
||||
@@ -39,6 +39,7 @@ public class RubyClientOptionsProvider implements OptionsProvider {
|
||||
.put(RubyClientCodegen.GEM_AUTHOR_EMAIL, GEM_AUTHOR_EMAIL_VALUE)
|
||||
.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, SORT_PARAMS_VALUE)
|
||||
.put(CodegenConstants.ENSURE_UNIQUE_PARAMS, ENSURE_UNIQUE_PARAMS_VALUE)
|
||||
.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ This SDK is automatically generated by the [Swagger Codegen](https://github.com/
|
||||
|
||||
- API version: 1.0.0
|
||||
- Package version: 1.0.0
|
||||
- Build date: 2016-08-29T14:24:29.182-07:00
|
||||
- Build package: class io.swagger.codegen.languages.RubyClientCodegen
|
||||
|
||||
## Installation
|
||||
@@ -137,6 +136,16 @@ Class | Method | HTTP request | Description
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
### petstore_auth
|
||||
|
||||
- **Type**: OAuth
|
||||
@@ -146,13 +155,3 @@ Class | Method | HTTP request | Description
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
### http_basic_test
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
@@ -201,12 +201,12 @@ module Petstore
|
||||
# Returns Auth Settings hash for api client.
|
||||
def auth_settings
|
||||
{
|
||||
'petstore_auth' =>
|
||||
'api_key' =>
|
||||
{
|
||||
type: 'oauth2',
|
||||
type: 'api_key',
|
||||
in: 'header',
|
||||
key: 'Authorization',
|
||||
value: "Bearer #{access_token}"
|
||||
key: 'api_key',
|
||||
value: api_key_with_prefix('api_key')
|
||||
},
|
||||
'http_basic_test' =>
|
||||
{
|
||||
@@ -215,12 +215,12 @@ module Petstore
|
||||
key: 'Authorization',
|
||||
value: basic_auth_token
|
||||
},
|
||||
'api_key' =>
|
||||
'petstore_auth' =>
|
||||
{
|
||||
type: 'api_key',
|
||||
type: 'oauth2',
|
||||
in: 'header',
|
||||
key: 'api_key',
|
||||
value: api_key_with_prefix('api_key')
|
||||
key: 'Authorization',
|
||||
value: "Bearer #{access_token}"
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user