diff --git a/.gitignore b/.gitignore index 2aaad73c13f1..d84a08f7b94c 100644 --- a/.gitignore +++ b/.gitignore @@ -55,6 +55,8 @@ samples/client/petstore/php/SwaggerClient-php/vendor/ samples/client/petstore/silex/SwaggerServer/composer.lock samples/client/petstore/silex/SwaggerServer/venodr/ +samples/client/petstore/perl/deep_module_test/ + samples/client/petstore/python/.projectile samples/client/petstore/python/.venv/ diff --git a/.travis.yml b/.travis.yml index 46286b5e5cae..4adb22f693ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,12 +11,10 @@ before_install: - gem install bundler install: - - docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD script: - mvn verify -Psamples - - docker build -t $DOCKER_IMAGE_NAME ./modules/swagger-generator - - if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_IMAGE_NAME:latest $DOCKER_IMAGE_NAME:$TRAVIS_TAG; fi && docker push $DOCKER_IMAGE_NAME + - if [ ! -z "$TRAVIS_PULL_REQUEST" ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build -t $DOCKER_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_IMAGE_NAME:latest $DOCKER_IMAGE_NAME:$TRAVIS_TAG; fi && docker push $DOCKER_IMAGE_NAME; fi env: - DOCKER_IMAGE_NAME=swaggerapi/swagger-generator diff --git a/LICENSE b/LICENSE index 542991f95502..ebfd64c49317 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 243ae836dbd1..aaef6aad31c0 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Check out [Swagger-Spec](https://github.com/OAI/OpenAPI-Specification) for addit - [Docker](#docker) - [Build and run](#build-and-run-using-docker) - [Build a Node.js server stub](#build-a-nodejs-server-stub) + - [Public Docker image](#public-docker-image) - [Homebrew](#homebrew) - Generators - [To generate a sample client library](#to-generate-a-sample-client-library) @@ -117,6 +118,10 @@ cd swagger-codegen -o samples/server/petstore/nodejs ``` +#### Public Docker image + +https://hub.docker.com/r/swaggerapi/swagger-generator/ + ### Homebrew To install, run `brew install swagger-codegen` @@ -580,7 +585,7 @@ Please refer to this [page](https://github.com/swagger-api/swagger-codegen/blob/ License ------- -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/bin/perl-petstore.sh b/bin/perl-petstore.sh index 64d684e9ec80..b2eb1753d67b 100755 --- a/bin/perl-petstore.sh +++ b/bin/perl-petstore.sh @@ -26,6 +26,9 @@ fi # if you've executed sbt assembly previously it will use that instead. export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" +# complex module name used for testing ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore.json -l perl -o samples/client/petstore/perl" java $JAVA_OPTS -jar $executable $ags + +java $JAVA_OPTS -jar $executable $ags --additional-properties moduleName=Something::Deep -o samples/client/petstore/perl/deep_module_test diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java index 4f8a1fb2a9fb..421c72f80d6e 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/PerlClientCodegen.java @@ -20,7 +20,8 @@ import org.apache.commons.lang.StringUtils; public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { public static final String MODULE_NAME = "moduleName"; public static final String MODULE_VERSION = "moduleVersion"; - protected String moduleName = "SwaggerClient"; + protected String moduleName = "WWW::SwaggerClient"; + protected String modulePathPart = moduleName.replaceAll("::",String.valueOf(File.separatorChar)); protected String moduleVersion = "1.0.0"; public PerlClientCodegen() { @@ -72,7 +73,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { typeMapping.put("object", "object"); cliOptions.clear(); - cliOptions.add(new CliOption(MODULE_NAME, "Perl module name (convention: CamelCase).").defaultValue("SwaggerClient")); + cliOptions.add(new CliOption(MODULE_NAME, "Perl module name (convention: CamelCase or Long::Module).").defaultValue("SwaggerClient")); cliOptions.add(new CliOption(MODULE_VERSION, "Perl module version.").defaultValue("1.0.0")); cliOptions.add(CliOption.newBoolean(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC).defaultValue(Boolean.TRUE.toString())); @@ -94,15 +95,16 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { if (additionalProperties.containsKey(MODULE_NAME)) { setModuleName((String) additionalProperties.get(MODULE_NAME)); + setModulePathPart(moduleName.replaceAll("::",String.valueOf(File.separatorChar))); } else { additionalProperties.put(MODULE_NAME, moduleName); } - supportingFiles.add(new SupportingFile("ApiClient.mustache", ("lib/WWW/" + moduleName).replace('/', File.separatorChar), "ApiClient.pm")); - supportingFiles.add(new SupportingFile("Configuration.mustache", ("lib/WWW/" + moduleName).replace('/', File.separatorChar), "Configuration.pm")); - supportingFiles.add(new SupportingFile("ApiFactory.mustache", ("lib/WWW/" + moduleName).replace('/', File.separatorChar), "ApiFactory.pm")); - supportingFiles.add(new SupportingFile("Role.mustache", ("lib/WWW/" + moduleName).replace('/', File.separatorChar), "Role.pm")); - supportingFiles.add(new SupportingFile("AutoDoc.mustache", ("lib/WWW/" + moduleName + "/Role").replace('/', File.separatorChar), "AutoDoc.pm")); + supportingFiles.add(new SupportingFile("ApiClient.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiClient.pm")); + supportingFiles.add(new SupportingFile("Configuration.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "Configuration.pm")); + supportingFiles.add(new SupportingFile("ApiFactory.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "ApiFactory.pm")); + supportingFiles.add(new SupportingFile("Role.mustache", ("lib/" + modulePathPart).replace('/', File.separatorChar), "Role.pm")); + supportingFiles.add(new SupportingFile("AutoDoc.mustache", ("lib/" + modulePathPart + "/Role").replace('/', File.separatorChar), "AutoDoc.pm")); supportingFiles.add(new SupportingFile("autodoc.script.mustache", "bin", "autodoc")); supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); } @@ -129,12 +131,12 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { @Override public String apiFileFolder() { - return (outputFolder + "/lib/WWW/" + moduleName + apiPackage()).replace('/', File.separatorChar); + return (outputFolder + "/lib/" + modulePathPart + apiPackage()).replace('/', File.separatorChar); } @Override public String modelFileFolder() { - return (outputFolder + "/lib/WWW/" + moduleName + modelPackage()).replace('/', File.separatorChar); + return (outputFolder + "/lib/" + modulePathPart + modelPackage()).replace('/', File.separatorChar); } @Override @@ -251,6 +253,10 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { this.moduleName = moduleName; } + public void setModulePathPart(String modulePathPart) { + this.modulePathPart = modulePathPart; + } + public void setModuleVersion(String moduleVersion) { this.moduleVersion = moduleVersion; } diff --git a/modules/swagger-codegen/src/main/resources/perl/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/perl/ApiClient.mustache index 4d7d5bb70882..401a33eddad3 100644 --- a/modules/swagger-codegen/src/main/resources/perl/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/ApiClient.mustache @@ -1,4 +1,4 @@ -package WWW::{{moduleName}}::ApiClient; +package {{moduleName}}::ApiClient; use strict; use warnings; @@ -18,7 +18,7 @@ use Log::Any qw($log); use Carp; use Module::Runtime qw(use_module); -use WWW::{{moduleName}}::Configuration; +use {{moduleName}}::Configuration; use base 'Class::Singleton'; @@ -34,7 +34,7 @@ sub _new_instance return bless \%args, $class; } -sub _cfg {'WWW::{{moduleName}}::Configuration'} +sub _cfg {'{{moduleName}}::Configuration'} # Set the user agent of the API client # @@ -119,8 +119,8 @@ sub call_api { else { } - $self->{ua}->timeout($self->{http_timeout} || $WWW::{{moduleName}}::Configuration::http_timeout); - $self->{ua}->agent($self->{http_user_agent} || $WWW::{{moduleName}}::Configuration::http_user_agent); + $self->{ua}->timeout($self->{http_timeout} || ${{moduleName}}::Configuration::http_timeout); + $self->{ua}->agent($self->{http_user_agent} || ${{moduleName}}::Configuration::http_user_agent); $log->debugf("REQUEST: %s", $_request->as_string); my $_response = $self->{ua}->request($_request); @@ -243,7 +243,7 @@ sub deserialize } elsif (grep /^$class$/, ('string', 'int', 'float', 'bool', 'object')) { return $data; } else { # model - my $_instance = use_module("WWW::{{moduleName}}::Object::$class")->new; + my $_instance = use_module("{{moduleName}}::Object::$class")->new; if (ref $data eq "HASH") { return $_instance->from_hash($data); } else { # string, need to json decode first @@ -294,11 +294,11 @@ sub get_api_key_with_prefix { my ($self, $key_name) = @_; - my $api_key = $WWW::{{moduleName}}::Configuration::api_key->{$key_name}; + my $api_key = ${{moduleName}}::Configuration::api_key->{$key_name}; return unless $api_key; - my $prefix = $WWW::{{moduleName}}::Configuration::api_key_prefix->{$key_name}; + my $prefix = ${{moduleName}}::Configuration::api_key_prefix->{$key_name}; return $prefix ? "$prefix $api_key" : $api_key; } @@ -329,11 +329,11 @@ sub update_params_for_auth { if ($api_key) { $query_params->{'{{keyParamName}}'} = $api_key; }{{/isKeyInQuery}}{{/isApiKey}}{{#isBasic}} - if ($WWW::{{moduleName}}::Configuration::username || $WWW::{{moduleName}}::Configuration::password) { - $header_params->{'Authorization'} = 'Basic ' . encode_base64($WWW::{{moduleName}}::Configuration::username . ":" . $WWW::{{moduleName}}::Configuration::password); + if (${{moduleName}}::Configuration::username || ${{moduleName}}::Configuration::password) { + $header_params->{'Authorization'} = 'Basic ' . encode_base64(${{moduleName}}::Configuration::username . ":" . ${{moduleName}}::Configuration::password); }{{/isBasic}}{{#isOAuth}} - if ($WWW::{{moduleName}}::Configuration::access_token) { - $header_params->{'Authorization'} = 'Bearer ' . $WWW::{{moduleName}}::Configuration::access_token; + if (${{moduleName}}::Configuration::access_token) { + $header_params->{'Authorization'} = 'Bearer ' . ${{moduleName}}::Configuration::access_token; }{{/isOAuth}} } {{/authMethods}} diff --git a/modules/swagger-codegen/src/main/resources/perl/ApiFactory.mustache b/modules/swagger-codegen/src/main/resources/perl/ApiFactory.mustache index fc119f7a9026..ef5f322a0146 100644 --- a/modules/swagger-codegen/src/main/resources/perl/ApiFactory.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/ApiFactory.mustache @@ -1,4 +1,4 @@ -package WWW::{{moduleName}}::ApiFactory; +package {{moduleName}}::ApiFactory; use strict; use warnings; @@ -7,26 +7,26 @@ use utf8; use Carp; use Module::Find; -usesub WWW::{{moduleName}}::Object; +usesub {{moduleName}}::Object; -use WWW::{{moduleName}}::ApiClient; +use {{moduleName}}::ApiClient; =head1 Name - WWW::{{moduleName}}::ApiFactory - constructs APIs to retrieve {{moduleName}} objects + {{moduleName}}::ApiFactory - constructs APIs to retrieve {{moduleName}} objects =head1 Synopsis package My::Petstore::App; - use WWW::{{moduleName}}::ApiFactory; + use {{moduleName}}::ApiFactory; - my $api_factory = WWW::{{moduleName}}::ApiFactory->new( ... ); # any args for ApiClient constructor + my $api_factory = {{moduleName}}::ApiFactory->new( ... ); # any args for ApiClient constructor # later... my $pet_api = $api_factory->get_api('Pet'); - # $pet_api isa WWW::{{moduleName}}::PetApi + # $pet_api isa {{moduleName}}::PetApi my $pet = $pet_api->get_pet_by_id(pet_id => $pet_id); @@ -39,9 +39,9 @@ use WWW::{{moduleName}}::ApiClient; =cut # Load all the API classes and construct a lookup table at startup time -my %_apis = map { $_ =~ /^WWW::{{moduleName}}::(.*)$/; $1 => $_ } +my %_apis = map { $_ =~ /^{{moduleName}}::(.*)$/; $1 => $_ } grep {$_ =~ /Api$/} - usesub 'WWW::{{moduleName}}'; + usesub '{{moduleName}}'; =head1 new() @@ -54,7 +54,7 @@ my %_apis = map { $_ =~ /^WWW::{{moduleName}}::(.*)$/; $1 => $_ } sub new { my ($class, %p) = (shift, @_); - $p{api_client} = WWW::{{moduleName}}::ApiClient->instance(%p); + $p{api_client} = {{moduleName}}::ApiClient->instance(%p); return bless \%p, $class; } @@ -64,7 +64,7 @@ sub new { $which is a nickname for the class: - WWW::FooBarClient::BazApi has nickname 'Baz' + FooBarClient::BazApi has nickname 'Baz' =cut diff --git a/modules/swagger-codegen/src/main/resources/perl/AutoDoc.mustache b/modules/swagger-codegen/src/main/resources/perl/AutoDoc.mustache index 76da048b0693..3c10c2450feb 100644 --- a/modules/swagger-codegen/src/main/resources/perl/AutoDoc.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/AutoDoc.mustache @@ -1,4 +1,4 @@ -package WWW::{{moduleName}}::Role::AutoDoc; +package {{moduleName}}::Role::AutoDoc; use List::MoreUtils qw(uniq); use Moose::Role; @@ -40,7 +40,7 @@ sub _printisa { foreach my $role (@roles) { $rolepkg = $role->{package} || next; # some are anonymous, or something - next if $rolepkg eq 'WWW::{{moduleName}}::Role::AutoDoc'; + next if $rolepkg eq '{{moduleName}}::Role::AutoDoc'; $role_reqs = join ', ', keys %{$role->{required_methods}}; $role_reqs ||= ''; $~ = $how eq 'pod' ? 'ROLES_POD' : 'ROLES'; @@ -424,4 +424,4 @@ $attrname -1; \ No newline at end of file +1; diff --git a/modules/swagger-codegen/src/main/resources/perl/BaseObject.mustache b/modules/swagger-codegen/src/main/resources/perl/BaseObject.mustache index aed1aec3118a..9f262543acd2 100644 --- a/modules/swagger-codegen/src/main/resources/perl/BaseObject.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/BaseObject.mustache @@ -68,7 +68,7 @@ sub _deserialize { } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { return $data; } else { # hash(model) - my $_instance = eval "WWW::{{moduleName}}::Object::$type->new()"; + my $_instance = eval "{{moduleName}}::Object::$type->new()"; return $_instance->from_hash($data); } } diff --git a/modules/swagger-codegen/src/main/resources/perl/Configuration.mustache b/modules/swagger-codegen/src/main/resources/perl/Configuration.mustache index 75a1ba7f61a6..e0ed9bf32956 100644 --- a/modules/swagger-codegen/src/main/resources/perl/Configuration.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/Configuration.mustache @@ -1,4 +1,4 @@ -package WWW::{{moduleName}}::Configuration; +package {{moduleName}}::Configuration; use strict; use warnings; diff --git a/modules/swagger-codegen/src/main/resources/perl/README.mustache b/modules/swagger-codegen/src/main/resources/perl/README.mustache index ac94b5b06380..d6a7b3797167 100644 --- a/modules/swagger-codegen/src/main/resources/perl/README.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/README.mustache @@ -1,6 +1,6 @@ # NAME -WWW::{{moduleName}}::Role - a Moose role for the {{appName}} +{{moduleName}}::Role - a Moose role for the {{appName}} ## {{appName}} version: {{appVersion}} @@ -15,7 +15,7 @@ Automatically generated by the Perl Swagger Codegen project: ## A note on Moose This role is the only component of the library that uses Moose. See -WWW::{{moduleName}}::ApiFactory for non-Moosey usage. +{{moduleName}}::ApiFactory for non-Moosey usage. # SYNOPSIS @@ -29,7 +29,7 @@ role. package MyApp; use Moose; - with 'WWW::{{moduleName}}::Role'; + with '{{moduleName}}::Role'; package main; @@ -88,37 +88,37 @@ you are accessing. Usually `prefix` and `in` will be determined by the code gene the spec and you will not need to set them at run time. If not, `in` will default to 'head' and `prefix` to the empty string. -The tokens will be placed in the `WWW::{{moduleName}}::Configuration` namespace +The tokens will be placed in the `{{moduleName}}::Configuration` namespace as follows, but you don't need to know about this. -- `$WWW::{{moduleName}}::Configuration::username` +- `${{moduleName}}::Configuration::username` String. The username for basic auth. -- `$WWW::{{moduleName}}::Configuration::password` +- `${{moduleName}}::Configuration::password` String. The password for basic auth. -- `$WWW::{{moduleName}}::Configuration::api_key` +- `${{moduleName}}::Configuration::api_key` Hashref. Keyed on the name of each key (there can be multiple tokens). - $WWW::{{moduleName}}::Configuration::api_key = { + ${{moduleName}}::Configuration::api_key = { secretKey => 'aaaabbbbccccdddd', anotherKey => '1111222233334444', }; -- `$WWW::{{moduleName}}::Configuration::api_key_prefix` +- `${{moduleName}}::Configuration::api_key_prefix` Hashref. Keyed on the name of each key (there can be multiple tokens). Note not all api keys require a prefix. - $WWW::{{moduleName}}::Configuration::api_key_prefix = { + ${{moduleName}}::Configuration::api_key_prefix = { secretKey => 'string', anotherKey => 'same or some other string', }; -- `$WWW::{{moduleName}}::Configuration::access_token` +- `${{moduleName}}::Configuration::access_token` String. The OAuth access token. @@ -134,7 +134,7 @@ created yet) the current value of `base_url`. Returns an API factory object. You probably won't need to call this directly. - $self->api_factory('Pet'); # returns a WWW::{{moduleName}}::PetApi instance + $self->api_factory('Pet'); # returns a {{moduleName}}::PetApi instance $self->pet_api; # the same @@ -167,7 +167,7 @@ maven 3.0.3 or better already installed. The config file should specify the project name for the generated library: - {"moduleName":"MyProjectName"} + {"moduleName":"WWW::MyProjectName"} Your library files will be built under `WWW::MyProjectName`. diff --git a/modules/swagger-codegen/src/main/resources/perl/Role.mustache b/modules/swagger-codegen/src/main/resources/perl/Role.mustache index ac2298a08e9f..499037dfea82 100644 --- a/modules/swagger-codegen/src/main/resources/perl/Role.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/Role.mustache @@ -1,11 +1,11 @@ -package WWW::{{moduleName}}::Role; +package {{moduleName}}::Role; use utf8; use Moose::Role; use namespace::autoclean; use Class::Inspector; use Log::Any qw($log); -use WWW::{{moduleName}}::ApiFactory; +use {{moduleName}}::ApiFactory; has base_url => ( is => 'ro', required => 0, @@ -14,7 +14,7 @@ has base_url => ( is => 'ro', ); has api_factory => ( is => 'ro', - isa => 'WWW::{{moduleName}}::ApiFactory', + isa => '{{moduleName}}::ApiFactory', builder => '_build_af', lazy => 1, documentation => 'Builds an instance of the endpoint API class', @@ -29,7 +29,7 @@ has tokens => ( is => 'ro', has _cfg => ( is => 'ro', isa => 'Str', - default => 'WWW::{{moduleName}}::Configuration', + default => '{{moduleName}}::Configuration', ); has version_info => ( is => 'ro', @@ -88,12 +88,12 @@ sub _build_af { my $self = shift; my %args; $args{base_url} = $self->base_url if $self->base_url; - return WWW::{{moduleName}}::ApiFactory->new(%args); + return {{moduleName}}::ApiFactory->new(%args); } =head1 NAME -WWW::{{moduleName}}::Role - a Moose role for the {{appName}} +{{moduleName}}::Role - a Moose role for the {{appName}} =head2 {{appName}} version: {{appVersion}} @@ -114,7 +114,7 @@ Automatically generated by the Perl Swagger Codegen project: =head2 A note on Moose This role is the only component of the library that uses Moose. See -WWW::{{moduleName}}::ApiFactory for non-Moosey usage. +{{moduleName}}::ApiFactory for non-Moosey usage. =head1 SYNOPSIS @@ -128,7 +128,7 @@ role. package MyApp; use Moose; - with 'WWW::{{moduleName}}::Role'; + with '{{moduleName}}::Role'; package main; @@ -186,39 +186,39 @@ you are accessing. Usually C and C will be determined by the code ge the spec and you will not need to set them at run time. If not, C will default to 'head' and C to the empty string. -The tokens will be placed in the C namespace +The tokens will be placed in the C<{{moduleName}}::Configuration> namespace as follows, but you don't need to know about this. =over 4 -=item C<$WWW::{{moduleName}}::Configuration::username> +=item C<${{moduleName}}::Configuration::username> String. The username for basic auth. -=item C<$WWW::{{moduleName}}::Configuration::password> +=item C<${{moduleName}}::Configuration::password> String. The password for basic auth. -=item C<$WWW::{{moduleName}}::Configuration::api_key> +=item C<${{moduleName}}::Configuration::api_key> Hashref. Keyed on the name of each key (there can be multiple tokens). - $WWW::{{moduleName}}::Configuration::api_key = { + ${{moduleName}}::Configuration::api_key = { secretKey => 'aaaabbbbccccdddd', anotherKey => '1111222233334444', }; -=item C<$WWW::{{moduleName}}::Configuration::api_key_prefix> +=item C<${{moduleName}}::Configuration::api_key_prefix> Hashref. Keyed on the name of each key (there can be multiple tokens). Note not all api keys require a prefix. - $WWW::{{moduleName}}::Configuration::api_key_prefix = { + ${{moduleName}}::Configuration::api_key_prefix = { secretKey => 'string', anotherKey => 'same or some other string', }; -=item C<$WWW::{{moduleName}}::Configuration::access_token> +=item C<${{moduleName}}::Configuration::access_token> String. The OAuth access token. @@ -236,7 +236,7 @@ created yet) the current value of C. Returns an API factory object. You probably won't need to call this directly. - $self->api_factory('Pet'); # returns a WWW::{{moduleName}}::PetApi instance + $self->api_factory('Pet'); # returns a {{moduleName}}::PetApi instance $self->pet_api; # the same @@ -269,7 +269,7 @@ maven 3.0.3 or better already installed. The config file should specify the project name for the generated library: - {"moduleName":"MyProjectName"} + {"moduleName":"WWW::MyProjectName"} Your library files will be built under C. diff --git a/modules/swagger-codegen/src/main/resources/perl/api.mustache b/modules/swagger-codegen/src/main/resources/perl/api.mustache index f25c63a528cc..dcebb0bb5187 100644 --- a/modules/swagger-codegen/src/main/resources/perl/api.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/api.mustache @@ -1,5 +1,5 @@ # -# Copyright 2015 SmartBear Software +# Copyright 2016 SmartBear Software # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ # NOTE: This class is auto generated by the swagger code generator program. # Do not edit the class manually. # -package WWW::{{moduleName}}::{{classname}}; +package {{moduleName}}::{{classname}}; require 5.6.0; use strict; @@ -27,8 +27,8 @@ use Exporter; use Carp qw( croak ); use Log::Any qw($log); -use WWW::{{moduleName}}::ApiClient; -use WWW::{{moduleName}}::Configuration; +use {{moduleName}}::ApiClient; +use {{moduleName}}::Configuration; use base "Class::Data::Inheritable"; @@ -37,7 +37,7 @@ __PACKAGE__->mk_classdata('method_documentation' => {}); sub new { my $class = shift; my (%self) = ( - 'api_client' => WWW::{{moduleName}}::ApiClient->instance, + 'api_client' => {{moduleName}}::ApiClient->instance, @_ ); diff --git a/modules/swagger-codegen/src/main/resources/perl/autodoc.script.mustache b/modules/swagger-codegen/src/main/resources/perl/autodoc.script.mustache index 240936d9b510..35f8f65fc9f7 100644 --- a/modules/swagger-codegen/src/main/resources/perl/autodoc.script.mustache +++ b/modules/swagger-codegen/src/main/resources/perl/autodoc.script.mustache @@ -15,14 +15,14 @@ my $my_app = $options{c} || 'My::App'; if ($options{c}) { eval <2.5 1.3.2 9.2.9.v20150224 - 2.4.1 + 2.6 diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java b/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java index 7d1c46c4362e..995fc8c80e7d 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/Bootstrap.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/ApiException.java b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/ApiException.java index fe8b455ecb0e..4ffc2348c27a 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/ApiException.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/ApiException.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java index 7cab512b58cf..14093f536d2e 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/BadRequestException.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java index b84985d51e1f..cdae50ce9b65 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/exception/NotFoundException.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java index 8fe9d41fb7ec..424b9dd2b0a5 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/ApiResponse.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java index 614adcc61bc7..f48be6a77da7 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/Generated.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java b/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java index 45b3b7b7bbff..33df1bc50713 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/model/InputOption.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ApiOriginFilter.java b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ApiOriginFilter.java index 07ee795f5884..aca470bd89b3 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ApiOriginFilter.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ApiOriginFilter.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java index ca0a0e620182..c63f161b7020 100644 --- a/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java +++ b/modules/swagger-generator/src/main/java/io/swagger/generator/util/ZipUtil.java @@ -1,5 +1,5 @@ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software *

* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/pom.xml b/pom.xml index 0f0e35a38c3c..4badf5b42d61 100644 --- a/pom.xml +++ b/pom.xml @@ -151,54 +151,43 @@ maven-release-plugin 2.1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.3 + + true + 1.7 + UTF-8 + 1g + ${javadoc.package.exclude} + + + + attach-javadocs + verify + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.1.2 + + + attach-sources + verify + + jar-no-fork + + + + - - - - net.alchim31.maven - scala-maven-plugin - ${scala-maven-plugin-version} - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9 - - true - 1.6 - UTF-8 - 1g - - http://java.sun.com/javase/6/docs/api/ - - ${javadoc.package.exclude} - - - - attach-javadocs - verify - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.1.2 - - - attach-sources - verify - - jar-no-fork - - - - - - @@ -530,10 +519,10 @@ - 1.0.15-SNAPSHOT + 1.0.15 2.11.1 2.3.4 - 1.5.5 + 1.5.6 2.4 1.2 4.8.1 diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index e50a07a54183..576fadf5900c 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -8,7 +8,7 @@ WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore Automatically generated by the Perl Swagger Codegen project: -- Build date: 2015-12-29T16:27:28.775+08:00 +- Build date: 2016-01-04T20:36:07.450-08:00 - Build package: class io.swagger.codegen.languages.PerlClientCodegen - Codegen version: @@ -167,7 +167,7 @@ maven 3.0.3 or better already installed. The config file should specify the project name for the generated library: - {"moduleName":"MyProjectName"} + {"moduleName":"WWW::MyProjectName"} Your library files will be built under `WWW::MyProjectName`. diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm index 11f2ab3f2366..cf596a9918df 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm @@ -319,6 +319,12 @@ sub update_params_for_auth { if (!defined($auth)) { # TODO show warning about auth setting not defined } + elsif ($auth eq 'petstore_auth') { + + if ($WWW::SwaggerClient::Configuration::access_token) { + $header_params->{'Authorization'} = 'Bearer ' . $WWW::SwaggerClient::Configuration::access_token; + } + } elsif ($auth eq 'api_key') { my $api_key = $self->get_api_key_with_prefix('api_key'); @@ -326,12 +332,6 @@ sub update_params_for_auth { $header_params->{'api_key'} = $api_key; } } - elsif ($auth eq 'petstore_auth') { - - if ($WWW::SwaggerClient::Configuration::access_token) { - $header_params->{'Authorization'} = 'Bearer ' . $WWW::SwaggerClient::Configuration::access_token; - } - } else { # TODO show warning about security definition not found @@ -341,7 +341,7 @@ sub update_params_for_auth { # The endpoint API class has not found any settings for auth. This may be deliberate, # in which case update_params_for_auth() will be a no-op. But it may also be that the -# swagger spec does not describe the intended authorization. So we check in the config for any +# OpenAPI Spec does not describe the intended authorization. So we check in the config for any # auth tokens and if we find any, we use them for all endpoints; sub _global_auth_setup { my ($self, $header_params, $query_params) = @_; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiFactory.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiFactory.pm index f0846a9b5944..0ffd54984209 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiFactory.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiFactory.pm @@ -13,7 +13,7 @@ use WWW::SwaggerClient::ApiClient; =head1 Name - WWW::SwaggerClient::ApiFactory - constructs APIs to retrieve SwaggerClient objects + WWW::SwaggerClient::ApiFactory - constructs APIs to retrieve WWW::SwaggerClient objects =head1 Synopsis @@ -64,7 +64,7 @@ sub new { $which is a nickname for the class: - WWW::FooBarClient::BazApi has nickname 'Baz' + FooBarClient::BazApi has nickname 'Baz' =cut diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm index 06ccfca98e80..e6182c4e9525 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm @@ -1,5 +1,5 @@ # -# Copyright 2015 SmartBear Software +# Copyright 2016 SmartBear Software # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm index 8c9e85ed5063..8ad294d399dc 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm @@ -37,7 +37,7 @@ has version_info => ( is => 'ro', default => sub { { app_name => 'Swagger Petstore', app_version => '1.0.0', - generated_date => '2015-12-29T16:27:28.775+08:00', + generated_date => '2016-01-04T20:36:07.450-08:00', generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen', } }, documentation => 'Information about the application version and the codegen codebase version' @@ -103,7 +103,7 @@ Automatically generated by the Perl Swagger Codegen project: =over 4 -=item Build date: 2015-12-29T16:27:28.775+08:00 +=item Build date: 2016-01-04T20:36:07.450-08:00 =item Build package: class io.swagger.codegen.languages.PerlClientCodegen @@ -119,7 +119,7 @@ WWW::SwaggerClient::ApiFactory for non-Moosey usage. =head1 SYNOPSIS The Perl Swagger Codegen project builds a library of Perl modules to interact with -a web service defined by a Swagger specification. See below for how to build the +a web service defined by a OpenAPI Specification. See below for how to build the library. This module provides an interface to the generated library. All the classes, @@ -154,7 +154,7 @@ For documentation of all these methods, see AUTOMATIC DOCUMENTATION below. =head2 Configuring authentication -In the normal case, the Swagger spec will describe what parameters are +In the normal case, the OpenAPI Spec will describe what parameters are required and where to put them. You just need to supply the tokens. my $tokens = { @@ -269,7 +269,7 @@ maven 3.0.3 or better already installed. The config file should specify the project name for the generated library: - {"moduleName":"MyProjectName"} + {"moduleName":"WWW::MyProjectName"} Your library files will be built under C. @@ -304,7 +304,7 @@ output formats are supported: The C<-c> option allows you to load and inspect your own application. A dummy namespace is used if you don't supply your own class. -=head1 DOCUMENTATION FROM THE SWAGGER SPEC +=head1 DOCUMENTATION FROM THE OpenAPI Spec Additional documentation for each class and method may be provided by the Swagger spec. If so, this is available via the C and diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role/AutoDoc.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role/AutoDoc.pm index 0dc30dbfb902..d57c96c1798d 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role/AutoDoc.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role/AutoDoc.pm @@ -424,4 +424,4 @@ $attrname -1; \ No newline at end of file +1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm index abe936573e7c..e28f8a6b260c 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm @@ -1,5 +1,5 @@ # -# Copyright 2015 SmartBear Software +# Copyright 2016 SmartBear Software # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm index 9ba45815c8ce..5e983e1aa7c6 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm @@ -1,5 +1,5 @@ # -# Copyright 2015 SmartBear Software +# Copyright 2016 SmartBear Software # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/perl/t/05_long_module_name.t b/samples/client/petstore/perl/t/05_long_module_name.t new file mode 100644 index 000000000000..5663e15e5ff3 --- /dev/null +++ b/samples/client/petstore/perl/t/05_long_module_name.t @@ -0,0 +1,96 @@ +use Test::More; +use Test::Exception; + +use lib 'deep_module_test/lib'; +use strict; +use warnings; + +if (! -d 'deep_module_test/lib' ) { + plan skip_all => 'bin/perl-petstore.sh needs to be run first'; +} +else { + plan tests => 38; +} + +use_ok('Something::Deep::PetApi'); +use_ok('Something::Deep::ApiClient'); +use_ok('Something::Deep::Object::Pet'); +use_ok('Something::Deep::Object::Tag'); +use_ok('Something::Deep::Object::Category'); + +my $api_client = Something::Deep::ApiClient->instance('base_url' => 'http://testing'); +my $pet_api = Something::Deep::PetApi->new('api_client' => $api_client); +is $pet_api->{api_client}->{base_url}, 'http://testing', 'get the proper base URL from api client'; + +my $api = Something::Deep::PetApi->new(); + +is $api->{api_client}->{base_url}, 'http://testing', 'we still get the original base URL from api client, because it\'s a singleton'; + +# reset the base_url - no direct access because an application shouldn't be changing +# its base URL halfway through +$api->{api_client}->{base_url} = 'http://petstore.swagger.io/v2'; + +is $api->{api_client}->{base_url}, 'http://petstore.swagger.io/v2', 'get the default base URL from api client'; + +# test select_header_content_type +is $api->{api_client}->select_header_content_type('application/xml', 'Application/JSON'), 'application/json', 'get the proper content type application/json but not application/xml'; +is $api->{api_client}->select_header_content_type('application/xml'), 'application/xml', 'get the proper content type application/json'; +is $api->{api_client}->select_header_content_type(''), 'application/json', 'get the proper content type application/json (default)'; + +# test select_header_accept +is $api->{api_client}->select_header_accept('application/xml', 'Application/JSON'), 'application/json', 'get the proper accept application/json but not application/xml'; +is $api->{api_client}->select_header_content_type('application/xml'), 'application/xml', 'get the proper accept application/json'; +is $api->{api_client}->select_header_accept(''), undef, 'get the proper accept "undef" (default)'; + +my $pet_id = 10008; + +my $category = Something::Deep::Object::Category->new('id' => '22', 'name' => 'perl'); +my $tag = Something::Deep::Object::Tag->new('id' => '11', 'name' => 'just kidding'); +my $pet = Something::Deep::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', + "photoUrls" => ['123', 'oop'], 'tags' => [$tag], 'status' => 'pending', 'category' => $category); + +isa_ok($api, 'Something::Deep::PetApi'); +isa_ok($category, 'Something::Deep::Object::Category'); +isa_ok($tag, 'Something::Deep::Object::Tag'); +isa_ok($pet, 'Something::Deep::Object::Pet'); + +my $pet_hash = $pet->to_hash; + +is $pet_hash->{category}->{id}, '22', 'get the proper category id'; +is $pet_hash->{category}->{name}, 'perl', 'get the proper category name'; +is $pet_hash->{tags}[0]->{name}, 'just kidding', 'get the proper tag name'; +is $pet_hash->{tags}[0]->{id}, '11', 'get the proper tag id'; + +my $add_pet = $api->add_pet(body => $pet); + +my $get_pet = $api->get_pet_by_id(pet_id => $pet_id); +my $get_pet_hash = $get_pet->to_hash; +is $get_pet_hash->{name}, 'perl test', 'get the proper pet name from get_pet_by_id'; +is $get_pet_hash->{id}, '10008', 'get the proper pet id from get_pet_by_id'; +is $get_pet_hash->{category}->{name}, 'perl', 'get the proper category name from get_pet_by_id'; +is $get_pet_hash->{category}->{id}, '22', 'get the proper category id from get_pet_by_id'; +is $get_pet_hash->{category}->{name}, 'perl', 'get the proper category from get_pet_by_id'; +is $get_pet_hash->{tags}[0]->{name}, 'just kidding', 'get the proper tag from get_pet_by_id'; +is $get_pet_hash->{tags}[0]->{id}, '11', 'get the proper tag id from get_pet_by_id'; +is $get_pet_hash->{photoUrls}->[0], '123', 'get the proper photoUrl from get_pet_by_id'; +is $get_pet_hash->{photoUrls}->[1], 'oop', 'get the proper photoUrl from get_pet_by_id'; + + +my $update_pet_with_form = $api->update_pet_with_form(pet_id => $pet_id, name => 'test_name', status => 'sold'); +is $update_pet_with_form, undef, 'get the null response from update_pet_wth_form'; + +my $get_pet_after_update = $api->get_pet_by_id(pet_id => $pet_id); +is $get_pet_after_update->{status}, 'sold', 'get the updated status after update_pet_with_form'; + +my $upload_pet = $api->upload_file(pet_id => $pet_id, additional_metadata => 'testabc', file => 'test.pl'); +is $upload_pet, undef, 'get the null response from upload_pet'; + +my $delete_pet = $api->delete_pet(pet_id => $pet_id); +is $delete_pet, undef, 'get the null response from delete_pet'; +throws_ok{$api->get_pet_by_id(pet_id => $pet_id)} qr/API Exception\(404\): Not Found/, "throw 404 error about pet not found after delete"; +#is $get_pet_after_delete->{status}, undef, 'get the updated status after update_pet_with_form'; + +my $pets; +lives_ok {$pets = $api->find_pets_by_status(status => [qw(sold available)])} 'array query param processed correctly'; +isa_ok($pets->[0], 'Something::Deep::Object::Pet'); + diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php index a2ce3cac04bb..53871de29ef2 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/PetApi.php @@ -10,7 +10,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php index 6a03542dfb04..a9d9d7a3f831 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/StoreApi.php @@ -10,7 +10,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php index 18d39efea28d..3d4cdca78b98 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Api/UserApi.php @@ -10,7 +10,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php index 8730a8c0601f..97c82f0051e0 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiClient.php @@ -11,7 +11,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php b/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php index 0b8f5892a350..d6040a0ff201 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ApiException.php @@ -10,7 +10,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php index 7281f7299851..108092f91b1b 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Configuration.php @@ -11,7 +11,7 @@ */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php index 444c3c1ed7e1..ae4d3e39db0a 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Category.php @@ -11,7 +11,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php index b803bd7325e7..c9f2629e31bc 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Order.php @@ -11,7 +11,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php index 6871ea9d9be5..543041b01150 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php @@ -11,7 +11,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php index bcecb32fa7e2..91bfa6aece96 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/Tag.php @@ -11,7 +11,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php index 1650635d8cec..8268f6da2b1e 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php @@ -11,7 +11,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php index 04b5cd0861b8..de3c8e0a10c1 100644 --- a/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php +++ b/samples/client/petstore/php/SwaggerClient-php/lib/ObjectSerializer.php @@ -11,7 +11,7 @@ * @link https://github.com/swagger-api/swagger-codegen */ /** - * Copyright 2015 SmartBear Software + * Copyright 2016 SmartBear Software * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/api_client.py b/samples/client/petstore/python/swagger_client/api_client.py index 63740a087454..00b901f3c4ae 100644 --- a/samples/client/petstore/python/swagger_client/api_client.py +++ b/samples/client/petstore/python/swagger_client/api_client.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/apis/pet_api.py b/samples/client/petstore/python/swagger_client/apis/pet_api.py index d7bc11daaafe..8e50474658c6 100644 --- a/samples/client/petstore/python/swagger_client/apis/pet_api.py +++ b/samples/client/petstore/python/swagger_client/apis/pet_api.py @@ -2,7 +2,7 @@ """ PetApi.py -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/apis/store_api.py b/samples/client/petstore/python/swagger_client/apis/store_api.py index e3835990a306..af6e56d69283 100644 --- a/samples/client/petstore/python/swagger_client/apis/store_api.py +++ b/samples/client/petstore/python/swagger_client/apis/store_api.py @@ -2,7 +2,7 @@ """ StoreApi.py -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/apis/user_api.py b/samples/client/petstore/python/swagger_client/apis/user_api.py index 4394941b1d52..98111a84d9dc 100644 --- a/samples/client/petstore/python/swagger_client/apis/user_api.py +++ b/samples/client/petstore/python/swagger_client/apis/user_api.py @@ -2,7 +2,7 @@ """ UserApi.py -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/configuration.py b/samples/client/petstore/python/swagger_client/configuration.py index ecbecf7e9f91..fe38630927e4 100644 --- a/samples/client/petstore/python/swagger_client/configuration.py +++ b/samples/client/petstore/python/swagger_client/configuration.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/models/category.py b/samples/client/petstore/python/swagger_client/models/category.py index 7c36ea3ec476..d5156eee4ffe 100644 --- a/samples/client/petstore/python/swagger_client/models/category.py +++ b/samples/client/petstore/python/swagger_client/models/category.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/models/order.py b/samples/client/petstore/python/swagger_client/models/order.py index 39081233b11f..93126d98a86f 100644 --- a/samples/client/petstore/python/swagger_client/models/order.py +++ b/samples/client/petstore/python/swagger_client/models/order.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/models/pet.py b/samples/client/petstore/python/swagger_client/models/pet.py index eafb352f2d06..d7c425e3e0e4 100644 --- a/samples/client/petstore/python/swagger_client/models/pet.py +++ b/samples/client/petstore/python/swagger_client/models/pet.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/models/tag.py b/samples/client/petstore/python/swagger_client/models/tag.py index 2041940dadfb..81d27fa5e631 100644 --- a/samples/client/petstore/python/swagger_client/models/tag.py +++ b/samples/client/petstore/python/swagger_client/models/tag.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/models/user.py b/samples/client/petstore/python/swagger_client/models/user.py index a3ad99fa4c59..6af36592c02e 100644 --- a/samples/client/petstore/python/swagger_client/models/user.py +++ b/samples/client/petstore/python/swagger_client/models/user.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/samples/client/petstore/python/swagger_client/rest.py b/samples/client/petstore/python/swagger_client/rest.py index 0d1f4ce1da8c..c5b9a4e6f910 100644 --- a/samples/client/petstore/python/swagger_client/rest.py +++ b/samples/client/petstore/python/swagger_client/rest.py @@ -1,7 +1,7 @@ # coding: utf-8 """ -Copyright 2015 SmartBear Software +Copyright 2016 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.