Update default value for Perl, Ruby, ROR generators (#265)

* rename perl genreator default

* update ruby sinatra default

* rename ror default value
This commit is contained in:
William Cheng
2018-04-29 20:37:12 +08:00
committed by GitHub
parent 861d11d010
commit c60010c965
175 changed files with 1121 additions and 2061 deletions

View File

@@ -4,18 +4,18 @@
use lib 'lib';
use strict;
use warnings;
use WWW::SwaggerClient::PetApi;
use WWW::SwaggerClient::StoreApi;
use WWW::SwaggerClient::ApiClient;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::Object::Pet;
use WWW::SwaggerClient::Object::Tag;
use WWW::SwaggerClient::Object::Category;
use WWW::OpenAPIClient::PetApi;
use WWW::OpenAPIClient::StoreApi;
use WWW::OpenAPIClient::ApiClient;
use WWW::OpenAPIClient::Configuration;
use WWW::OpenAPIClient::Object::Pet;
use WWW::OpenAPIClient::Object::Tag;
use WWW::OpenAPIClient::Object::Category;
use JSON;
use Data::Dumper;
use DateTime;
my $api = WWW::SwaggerClient::PetApi->new(
my $api = WWW::OpenAPIClient::PetApi->new(
http_user_agent => 'Perl-Swagger-Test',
api_key => { api_key => 'ZZZZZZZZZZZZZZ' },
api_key_prefix => { api_key => 'Bearer' },
@@ -34,15 +34,15 @@ my $api = WWW::SwaggerClient::PetApi->new(
my $pet_id = 10008;
my $category = WWW::SwaggerClient::Object::Category->new('id' => '2', 'name' => 'perl');
my $tag = WWW::SwaggerClient::Object::Tag->new('id' => '1', 'name' => 'just kidding');
my $pet = WWW::SwaggerClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test',
my $category = WWW::OpenAPIClient::Object::Category->new('id' => '2', 'name' => 'perl');
my $tag = WWW::OpenAPIClient::Object::Tag->new('id' => '1', 'name' => 'just kidding');
my $pet = WWW::OpenAPIClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test',
"photoUrls" => ['123', 'oop'], 'tags' => [$tag], 'status' => 'pending', 'category' => $category);
print "\npet(object)=".Dumper $pet;
my $json = JSON->new->convert_blessed;
my $new_pet = WWW::SwaggerClient::Object::Pet->new();
my $new_pet = WWW::OpenAPIClient::Object::Pet->new();
$new_pet = $new_pet->from_hash($pet->to_hash);
print "new_pet(hash):".Dumper($new_pet->to_hash);
@@ -53,7 +53,7 @@ print "\nget_pet_by_id:".Dumper $api->get_pet_by_id(pet_id => $pet_id);
print "\nupdate_pet_with_form:".Dumper $api->update_pet_with_form(pet_id => $pet_id, name => 'test_name', status => 'test status');
print "\ndelete_pet:".Dumper $api->delete_pet(pet_id => $pet_id);
my $store_api = WWW::SwaggerClient::StoreApi->new();
my $store_api = WWW::OpenAPIClient::StoreApi->new();
print "\nget_inventory:".Dumper $store_api->get_inventory();
my $pet_json = <<JSON;