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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
175 changed files with 1121 additions and 2061 deletions

View File

@ -17,7 +17,7 @@ import org.apache.commons.lang3.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 = "WWW::SwaggerClient";
protected String moduleName = "WWW::OpenAPIClient";
protected String modulePathPart = moduleName.replaceAll("::", Matcher.quoteReplacement(File.separator));
protected String moduleVersion = "1.0.0";
protected String apiDocPath = "docs/";
@ -89,7 +89,7 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
typeMapping.put("UUID", "string");
cliOptions.clear();
cliOptions.add(new CliOption(MODULE_NAME, "Perl module name (convention: CamelCase or Long::Module).").defaultValue("SwaggerClient"));
cliOptions.add(new CliOption(MODULE_NAME, "Perl module name (convention: CamelCase or Long::Module).").defaultValue("OpenAPIClient"));
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()));
@ -207,15 +207,15 @@ public class PerlClientCodegen extends DefaultCodegen implements CodegenConfig {
@Override
public String getSchemaType(Schema p) {
String swaggerType = super.getSchemaType(p);
String schemaType = super.getSchemaType(p);
String type = null;
if (typeMapping.containsKey(swaggerType)) {
type = typeMapping.get(swaggerType);
if (typeMapping.containsKey(schemaType)) {
type = typeMapping.get(schemaType);
if (languageSpecificPrimitives.contains(type)) {
return type;
}
} else {
type = swaggerType;
type = schemaType;
}
if (type == null) {
return null;

View File

@ -45,8 +45,8 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
protected String gemLicense = "proprietary";
protected String gemRequiredRubyVersion = ">= 1.9";
protected String gemHomepage = "http://org.openapitools";
protected String gemSummary = "A ruby wrapper for the swagger APIs";
protected String gemDescription = "This gem maps to a swagger API";
protected String gemSummary = "A ruby wrapper for the REST APIs";
protected String gemDescription = "This gem maps to a REST API";
protected String gemAuthor = "";
protected String gemAuthorEmail = "";
protected String apiDocPath = "docs/";
@ -140,9 +140,9 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
}
}
cliOptions.add(new CliOption(GEM_NAME, "gem name (convention: underscore_case).").
defaultValue("swagger_client"));
defaultValue("openapi_client"));
cliOptions.add(new CliOption(MODULE_NAME, "top module name (convention: CamelCase, usually corresponding" +
" to gem name).").defaultValue("SwaggerClient"));
" to gem name).").defaultValue("OpenAPIClient"));
cliOptions.add(new CliOption(GEM_VERSION, "gem version.").defaultValue("1.0.0"));
cliOptions.add(new CliOption(GEM_LICENSE, "gem license. ").
@ -155,10 +155,10 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
defaultValue("http://org.openapitools"));
cliOptions.add(new CliOption(GEM_SUMMARY, "gem summary. ").
defaultValue("A ruby wrapper for the swagger APIs"));
defaultValue("A ruby wrapper for the REST APIs"));
cliOptions.add(new CliOption(GEM_DESCRIPTION, "gem description. ").
defaultValue("This gem maps to a swagger API"));
defaultValue("This gem maps to a REST API"));
cliOptions.add(new CliOption(GEM_AUTHOR, "gem author (only one is supported)."));
@ -181,7 +181,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
}
if (gemName == null && moduleName == null) {
setGemName("swagger_client");
setGemName("openapi_client");
setModuleName(generateModuleName(gemName));
} else if (gemName == null) {
setGemName(generateGemName(moduleName));
@ -274,7 +274,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
}
/**
* Generate Ruby module name from the gem name, e.g. use "SwaggerClient" for "swagger_client".
* Generate Ruby module name from the gem name, e.g. use "OpenAPIClient" for "openapi_client".
*
* @param gemName Ruby gem name
* @return Ruby module naame
@ -285,7 +285,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
}
/**
* Generate Ruby gem name from the module name, e.g. use "swagger_client" for "SwaggerClient".
* Generate Ruby gem name from the module name, e.g. use "openapi_client" for "OpenAPIClient".
*
* @param moduleName Ruby module naame
* @return Ruby gem name
@ -348,7 +348,7 @@ public class RubyClientCodegen extends DefaultCodegen implements CodegenConfig {
@Override
public String toDefaultValue(Schema p) {
if (ModelUtils.isIntegerSchema(p)|| ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) {
if (ModelUtils.isIntegerSchema(p) || ModelUtils.isNumberSchema(p) || ModelUtils.isBooleanSchema(p)) {
if (p.getDefault() != null) {
return p.getDefault().toString();
}

View File

@ -241,10 +241,10 @@ public class RubyOnRailsServerCodegen extends DefaultCodegen implements CodegenC
@Override
public String getSchemaType(Schema p) {
String swaggerType = super.getSchemaType(p);
String openAPIType = super.getSchemaType(p);
String type = null;
if (typeMapping.containsKey(swaggerType)) {
return typeMapping.get(swaggerType);
if (typeMapping.containsKey(openAPIType)) {
return typeMapping.get(openAPIType);
}
return "string";
}

View File

@ -83,11 +83,11 @@ public class RubySinatraServerCodegen extends DefaultCodegen implements CodegenC
setApiPackage("api");
supportingFiles.add(new SupportingFile("my_app.mustache", "", "my_app.rb"));
supportingFiles.add(new SupportingFile("Swaggering.rb", libFolder, "swaggering.rb"));
supportingFiles.add(new SupportingFile("OpenAPIing.rb", libFolder, "openapiing.rb"));
supportingFiles.add(new SupportingFile("config.ru", "", "config.ru"));
supportingFiles.add(new SupportingFile("Gemfile", "", "Gemfile"));
supportingFiles.add(new SupportingFile("README.md", "", "README.md"));
supportingFiles.add(new SupportingFile("openapi.mustache","","openapi.yaml"));
supportingFiles.add(new SupportingFile("openapi.mustache", "", "openapi.yaml"));
}
@Override
@ -106,8 +106,8 @@ public class RubySinatraServerCodegen extends DefaultCodegen implements CodegenC
}
@Override
public String escapeReservedWord(String name) {
if(this.reservedWordsMappings().containsKey(name)) {
public String escapeReservedWord(String name) {
if (this.reservedWordsMappings().containsKey(name)) {
return this.reservedWordsMappings().get(name);
}
return "_" + name;

View File

@ -1,6 +1,6 @@
# Swagger for Rails 5
# OpenAPI for Rails 5
This is a project to provide Swagger support inside the [Ruby on Rails](http://rubyonrails.org/) framework.
This is a project to provide OpenAPI support inside the [Ruby on Rails](http://rubyonrails.org/) framework.
## Prerequisites
You need to install ruby >= 2.2.2 and run:
@ -11,7 +11,7 @@ bundle install
## Getting started
This sample was generated with the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project.
This sample was generated with [openapi-generator](https://github.com/openapitools/openapi-generator) project.
```
bin/rake db:create db:migrate

View File

@ -6,6 +6,10 @@
{{{appDescription}}}
{{/appDescription}}
{{#version}}OpenAPI spec version: {{version}}{{/version}}
{{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
Generated by: https://github.com/swagger-api/swagger-codegen.git
{{#version}}
OpenAPI spec version: {{version}}
{{/version}}
{{#infoEmail}}
Contact: {{{infoEmail}}}
{{/infoEmail}}
Generated by: https://github.com/openapitools/openapi-generator.git

View File

@ -3,7 +3,7 @@
=end
Rails.application.routes.draw do
def add_swagger_route http_method, path, opts = {}
def add_openapi_route http_method, path, opts = {}
full_path = path.gsub(/{(.*?)}/, ':\1')
match full_path, to: "#{opts.fetch(:controller_name)}##{opts[:action_name]}", via: http_method
end
@ -12,7 +12,7 @@ Rails.application.routes.draw do
{{#apis}}
{{#operations}}
{{#operation}}
add_swagger_route '{{httpMethod}}', '{{basePathWithoutHost}}{{path}}', controller_name: '{{classVarName}}', action_name: {{#isRestfulIndex}}'index'{{/isRestfulIndex}}{{#isRestfulCreate}}'create'{{/isRestfulCreate}}{{#isRestfulUpdate}}'update'{{/isRestfulUpdate}}{{#isRestfulShow}}'show'{{/isRestfulShow}}{{#isRestfulDestroy}}'destroy'{{/isRestfulDestroy}}{{^isRestful}}'{{nickname}}'{{/isRestful}}
add_openapi_route '{{httpMethod}}', '{{basePathWithoutHost}}{{path}}', controller_name: '{{classVarName}}', action_name: {{#isRestfulIndex}}'index'{{/isRestfulIndex}}{{#isRestfulCreate}}'create'{{/isRestfulCreate}}{{#isRestfulUpdate}}'update'{{/isRestfulUpdate}}{{#isRestfulShow}}'show'{{/isRestfulShow}}{{#isRestfulDestroy}}'destroy'{{/isRestfulDestroy}}{{^isRestful}}'{{nickname}}'{{/isRestful}}
{{/operation}}
{{/operations}}
{{/apis}}

View File

@ -3,17 +3,17 @@ require 'sinatra/base'
require 'sinatra/cross_origin'
class Configuration
attr_accessor :base_path, :api_version, :swagger_version, :format_specifier
attr_accessor :base_path, :api_version, :openapi_version, :format_specifier
def initialize
@api_version = '1.0'
@base_path = 'http://localhost:4567'
@swagger_version = '1.1'
@openapi_version = '1.1'
@format_specifier = ".json"
end
end
class Swaggering < Sinatra::Base
class OpenAPIing < Sinatra::Base
register Sinatra::CrossOrigin
@@routes = {}
@ -24,13 +24,13 @@ class Swaggering < Sinatra::Base
def self.configure
get("/resources" + @@configuration.format_specifier) {
cross_origin
Swaggering.to_resource_listing
OpenAPIing.to_resource_listing
}
# for swagger.yaml
get("/swagger.yaml") {
# for openapi.yaml
get("/openapi.yaml") {
cross_origin
File.read("./swagger.yaml");
File.read("./openapi.yaml");
}
@@configuration ||= Configuration.new
@ -68,7 +68,7 @@ class Swaggering < Sinatra::Base
get(resourcePath + @@configuration.format_specifier) do
cross_origin
Swaggering.to_api(resourcePath)
OpenAPIing.to_api(resourcePath)
end
end
@ -89,7 +89,7 @@ class Swaggering < Sinatra::Base
resource = {
"apiVersion" => @@configuration.api_version,
"swaggerVersion" => @@configuration.swagger_version,
"openapiVersion" => @@configuration.openapi_version,
"apis" => apis
}
@ -152,7 +152,7 @@ class Swaggering < Sinatra::Base
api_listing = {
"apiVersion" => @@configuration.api_version,
"swaggerVersion" => @@configuration.swagger_version,
"openapiVersion" => @@configuration.openapi_version,
"basePath" => @@configuration.base_path,
"resourcePath" => resourcePath,
"apis" => apis.values,

View File

@ -1,7 +1,7 @@
require './lib/swaggering'
require './lib/openapiing'
# only need to extend if you want special configuration!
class MyApp < Swaggering
class MyApp < OpenAPIing
self.configure do |config|
config.api_version = '{{version}}'
end

View File

@ -1,6 +1,6 @@
# NAME
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore
WWW::OpenAPIClient::Role - a Moose role for the Swagger Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
@ -15,7 +15,7 @@ Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/
## A note on Moose
This role is the only component of the library that uses Moose. See
WWW::SwaggerClient::ApiFactory for non-Moosey usage.
WWW::OpenAPIClient::ApiFactory for non-Moosey usage.
# SYNOPSIS
@ -29,7 +29,7 @@ role.
package MyApp;
use Moose;
with 'WWW::SwaggerClient::Role';
with 'WWW::OpenAPIClient::Role';
package main;
@ -88,7 +88,7 @@ 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 a L<WWW::SwaggerClient::Configuration> instance
The tokens will be placed in a L<WWW::OpenAPIClient::Configuration> instance
as follows, but you don't need to know about this.
- `$cfg->{username}`
@ -133,7 +133,7 @@ returns 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::SwaggerClient::PetApi instance
$self->api_factory('Pet'); # returns a WWW::OpenAPIClient::PetApi instance
$self->pet_api; # the same
@ -221,53 +221,50 @@ Each of these calls returns a hashref with various useful pieces of information.
To load the API packages:
```perl
use WWW::SwaggerClient::AnotherFakeApi;
use WWW::SwaggerClient::FakeApi;
use WWW::SwaggerClient::FakeClassnameTags123Api;
use WWW::SwaggerClient::PetApi;
use WWW::SwaggerClient::StoreApi;
use WWW::SwaggerClient::UserApi;
use WWW::OpenAPIClient::AnotherFakeApi;
use WWW::OpenAPIClient::FakeApi;
use WWW::OpenAPIClient::FakeClassnameTags123Api;
use WWW::OpenAPIClient::PetApi;
use WWW::OpenAPIClient::StoreApi;
use WWW::OpenAPIClient::UserApi;
```
To load the models:
```perl
use WWW::SwaggerClient::Object::AdditionalPropertiesClass;
use WWW::SwaggerClient::Object::Animal;
use WWW::SwaggerClient::Object::AnimalFarm;
use WWW::SwaggerClient::Object::ApiResponse;
use WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly;
use WWW::SwaggerClient::Object::ArrayOfNumberOnly;
use WWW::SwaggerClient::Object::ArrayTest;
use WWW::SwaggerClient::Object::Capitalization;
use WWW::SwaggerClient::Object::Cat;
use WWW::SwaggerClient::Object::Category;
use WWW::SwaggerClient::Object::ClassModel;
use WWW::SwaggerClient::Object::Client;
use WWW::SwaggerClient::Object::Dog;
use WWW::SwaggerClient::Object::EnumArrays;
use WWW::SwaggerClient::Object::EnumClass;
use WWW::SwaggerClient::Object::EnumTest;
use WWW::SwaggerClient::Object::FormatTest;
use WWW::SwaggerClient::Object::HasOnlyReadOnly;
use WWW::SwaggerClient::Object::List;
use WWW::SwaggerClient::Object::MapTest;
use WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::SwaggerClient::Object::Model200Response;
use WWW::SwaggerClient::Object::ModelReturn;
use WWW::SwaggerClient::Object::Name;
use WWW::SwaggerClient::Object::NumberOnly;
use WWW::SwaggerClient::Object::Order;
use WWW::SwaggerClient::Object::OuterBoolean;
use WWW::SwaggerClient::Object::OuterComposite;
use WWW::SwaggerClient::Object::OuterEnum;
use WWW::SwaggerClient::Object::OuterNumber;
use WWW::SwaggerClient::Object::OuterString;
use WWW::SwaggerClient::Object::Pet;
use WWW::SwaggerClient::Object::ReadOnlyFirst;
use WWW::SwaggerClient::Object::SpecialModelName;
use WWW::SwaggerClient::Object::Tag;
use WWW::SwaggerClient::Object::User;
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Animal;
use WWW::OpenAPIClient::Object::AnimalFarm;
use WWW::OpenAPIClient::Object::ApiResponse;
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayTest;
use WWW::OpenAPIClient::Object::Capitalization;
use WWW::OpenAPIClient::Object::Cat;
use WWW::OpenAPIClient::Object::Category;
use WWW::OpenAPIClient::Object::ClassModel;
use WWW::OpenAPIClient::Object::Client;
use WWW::OpenAPIClient::Object::Dog;
use WWW::OpenAPIClient::Object::EnumArrays;
use WWW::OpenAPIClient::Object::EnumClass;
use WWW::OpenAPIClient::Object::EnumTest;
use WWW::OpenAPIClient::Object::FormatTest;
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
use WWW::OpenAPIClient::Object::List;
use WWW::OpenAPIClient::Object::MapTest;
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Model200Response;
use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::Pet;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::SpecialModelName;
use WWW::OpenAPIClient::Object::Tag;
use WWW::OpenAPIClient::Object::User;
````
@ -279,59 +276,56 @@ use lib 'lib';
use strict;
use warnings;
# load the API package
use WWW::SwaggerClient::AnotherFakeApi;
use WWW::SwaggerClient::FakeApi;
use WWW::SwaggerClient::FakeClassnameTags123Api;
use WWW::SwaggerClient::PetApi;
use WWW::SwaggerClient::StoreApi;
use WWW::SwaggerClient::UserApi;
use WWW::OpenAPIClient::AnotherFakeApi;
use WWW::OpenAPIClient::FakeApi;
use WWW::OpenAPIClient::FakeClassnameTags123Api;
use WWW::OpenAPIClient::PetApi;
use WWW::OpenAPIClient::StoreApi;
use WWW::OpenAPIClient::UserApi;
# load the models
use WWW::SwaggerClient::Object::AdditionalPropertiesClass;
use WWW::SwaggerClient::Object::Animal;
use WWW::SwaggerClient::Object::AnimalFarm;
use WWW::SwaggerClient::Object::ApiResponse;
use WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly;
use WWW::SwaggerClient::Object::ArrayOfNumberOnly;
use WWW::SwaggerClient::Object::ArrayTest;
use WWW::SwaggerClient::Object::Capitalization;
use WWW::SwaggerClient::Object::Cat;
use WWW::SwaggerClient::Object::Category;
use WWW::SwaggerClient::Object::ClassModel;
use WWW::SwaggerClient::Object::Client;
use WWW::SwaggerClient::Object::Dog;
use WWW::SwaggerClient::Object::EnumArrays;
use WWW::SwaggerClient::Object::EnumClass;
use WWW::SwaggerClient::Object::EnumTest;
use WWW::SwaggerClient::Object::FormatTest;
use WWW::SwaggerClient::Object::HasOnlyReadOnly;
use WWW::SwaggerClient::Object::List;
use WWW::SwaggerClient::Object::MapTest;
use WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::SwaggerClient::Object::Model200Response;
use WWW::SwaggerClient::Object::ModelReturn;
use WWW::SwaggerClient::Object::Name;
use WWW::SwaggerClient::Object::NumberOnly;
use WWW::SwaggerClient::Object::Order;
use WWW::SwaggerClient::Object::OuterBoolean;
use WWW::SwaggerClient::Object::OuterComposite;
use WWW::SwaggerClient::Object::OuterEnum;
use WWW::SwaggerClient::Object::OuterNumber;
use WWW::SwaggerClient::Object::OuterString;
use WWW::SwaggerClient::Object::Pet;
use WWW::SwaggerClient::Object::ReadOnlyFirst;
use WWW::SwaggerClient::Object::SpecialModelName;
use WWW::SwaggerClient::Object::Tag;
use WWW::SwaggerClient::Object::User;
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Animal;
use WWW::OpenAPIClient::Object::AnimalFarm;
use WWW::OpenAPIClient::Object::ApiResponse;
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayTest;
use WWW::OpenAPIClient::Object::Capitalization;
use WWW::OpenAPIClient::Object::Cat;
use WWW::OpenAPIClient::Object::Category;
use WWW::OpenAPIClient::Object::ClassModel;
use WWW::OpenAPIClient::Object::Client;
use WWW::OpenAPIClient::Object::Dog;
use WWW::OpenAPIClient::Object::EnumArrays;
use WWW::OpenAPIClient::Object::EnumClass;
use WWW::OpenAPIClient::Object::EnumTest;
use WWW::OpenAPIClient::Object::FormatTest;
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
use WWW::OpenAPIClient::Object::List;
use WWW::OpenAPIClient::Object::MapTest;
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::Model200Response;
use WWW::OpenAPIClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::Name;
use WWW::OpenAPIClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::Order;
use WWW::OpenAPIClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::Pet;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::SpecialModelName;
use WWW::OpenAPIClient::Object::Tag;
use WWW::OpenAPIClient::Object::User;
# for displaying the API response data
use Data::Dumper;
use WWW::SwaggerClient::;
use WWW::OpenAPIClient::;
my $api_instance = WWW::SwaggerClient::->new(
my $api_instance = WWW::OpenAPIClient::->new(
);
my $client = WWW::SwaggerClient::Object::Client->new(); # Client | client model
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->test_special_tags(client => $client);
@ -354,6 +348,7 @@ Class | Method | HTTP request | Description
*FakeApi* | [**fake_outer_composite_serialize**](docs/FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
*FakeApi* | [**fake_outer_number_serialize**](docs/FakeApi.md#fake_outer_number_serialize) | **POST** /fake/outer/number |
*FakeApi* | [**fake_outer_string_serialize**](docs/FakeApi.md#fake_outer_string_serialize) | **POST** /fake/outer/string |
*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \&quot;client\&quot; model
*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
@ -383,42 +378,39 @@ Class | Method | HTTP request | Description
# DOCUMENTATION FOR MODELS
- [WWW::SwaggerClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [WWW::SwaggerClient::Object::Animal](docs/Animal.md)
- [WWW::SwaggerClient::Object::AnimalFarm](docs/AnimalFarm.md)
- [WWW::SwaggerClient::Object::ApiResponse](docs/ApiResponse.md)
- [WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [WWW::SwaggerClient::Object::ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [WWW::SwaggerClient::Object::ArrayTest](docs/ArrayTest.md)
- [WWW::SwaggerClient::Object::Capitalization](docs/Capitalization.md)
- [WWW::SwaggerClient::Object::Cat](docs/Cat.md)
- [WWW::SwaggerClient::Object::Category](docs/Category.md)
- [WWW::SwaggerClient::Object::ClassModel](docs/ClassModel.md)
- [WWW::SwaggerClient::Object::Client](docs/Client.md)
- [WWW::SwaggerClient::Object::Dog](docs/Dog.md)
- [WWW::SwaggerClient::Object::EnumArrays](docs/EnumArrays.md)
- [WWW::SwaggerClient::Object::EnumClass](docs/EnumClass.md)
- [WWW::SwaggerClient::Object::EnumTest](docs/EnumTest.md)
- [WWW::SwaggerClient::Object::FormatTest](docs/FormatTest.md)
- [WWW::SwaggerClient::Object::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [WWW::SwaggerClient::Object::List](docs/List.md)
- [WWW::SwaggerClient::Object::MapTest](docs/MapTest.md)
- [WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [WWW::SwaggerClient::Object::Model200Response](docs/Model200Response.md)
- [WWW::SwaggerClient::Object::ModelReturn](docs/ModelReturn.md)
- [WWW::SwaggerClient::Object::Name](docs/Name.md)
- [WWW::SwaggerClient::Object::NumberOnly](docs/NumberOnly.md)
- [WWW::SwaggerClient::Object::Order](docs/Order.md)
- [WWW::SwaggerClient::Object::OuterBoolean](docs/OuterBoolean.md)
- [WWW::SwaggerClient::Object::OuterComposite](docs/OuterComposite.md)
- [WWW::SwaggerClient::Object::OuterEnum](docs/OuterEnum.md)
- [WWW::SwaggerClient::Object::OuterNumber](docs/OuterNumber.md)
- [WWW::SwaggerClient::Object::OuterString](docs/OuterString.md)
- [WWW::SwaggerClient::Object::Pet](docs/Pet.md)
- [WWW::SwaggerClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [WWW::SwaggerClient::Object::SpecialModelName](docs/SpecialModelName.md)
- [WWW::SwaggerClient::Object::Tag](docs/Tag.md)
- [WWW::SwaggerClient::Object::User](docs/User.md)
- [WWW::OpenAPIClient::Object::AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [WWW::OpenAPIClient::Object::Animal](docs/Animal.md)
- [WWW::OpenAPIClient::Object::AnimalFarm](docs/AnimalFarm.md)
- [WWW::OpenAPIClient::Object::ApiResponse](docs/ApiResponse.md)
- [WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [WWW::OpenAPIClient::Object::ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [WWW::OpenAPIClient::Object::ArrayTest](docs/ArrayTest.md)
- [WWW::OpenAPIClient::Object::Capitalization](docs/Capitalization.md)
- [WWW::OpenAPIClient::Object::Cat](docs/Cat.md)
- [WWW::OpenAPIClient::Object::Category](docs/Category.md)
- [WWW::OpenAPIClient::Object::ClassModel](docs/ClassModel.md)
- [WWW::OpenAPIClient::Object::Client](docs/Client.md)
- [WWW::OpenAPIClient::Object::Dog](docs/Dog.md)
- [WWW::OpenAPIClient::Object::EnumArrays](docs/EnumArrays.md)
- [WWW::OpenAPIClient::Object::EnumClass](docs/EnumClass.md)
- [WWW::OpenAPIClient::Object::EnumTest](docs/EnumTest.md)
- [WWW::OpenAPIClient::Object::FormatTest](docs/FormatTest.md)
- [WWW::OpenAPIClient::Object::HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [WWW::OpenAPIClient::Object::List](docs/List.md)
- [WWW::OpenAPIClient::Object::MapTest](docs/MapTest.md)
- [WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [WWW::OpenAPIClient::Object::Model200Response](docs/Model200Response.md)
- [WWW::OpenAPIClient::Object::ModelReturn](docs/ModelReturn.md)
- [WWW::OpenAPIClient::Object::Name](docs/Name.md)
- [WWW::OpenAPIClient::Object::NumberOnly](docs/NumberOnly.md)
- [WWW::OpenAPIClient::Object::Order](docs/Order.md)
- [WWW::OpenAPIClient::Object::OuterComposite](docs/OuterComposite.md)
- [WWW::OpenAPIClient::Object::OuterEnum](docs/OuterEnum.md)
- [WWW::OpenAPIClient::Object::Pet](docs/Pet.md)
- [WWW::OpenAPIClient::Object::ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [WWW::OpenAPIClient::Object::SpecialModelName](docs/SpecialModelName.md)
- [WWW::OpenAPIClient::Object::Tag](docs/Tag.md)
- [WWW::OpenAPIClient::Object::User](docs/User.md)
# DOCUMENTATION FOR AUTHORIZATION

View File

@ -15,14 +15,14 @@ my $my_app = $options{c} || 'My::App';
if ($options{c}) {
eval <<LOAD;
use $my_app;
apply_all_roles($my_app, "WWW::SwaggerClient::Role::AutoDoc");
apply_all_roles($my_app, "WWW::OpenAPIClient::Role::AutoDoc");
LOAD
die $@ if $@;
}
else {
package My::App;
use Moose;
with ('WWW::SwaggerClient::Role', 'WWW::SwaggerClient::Role::AutoDoc');
with ('WWW::OpenAPIClient::Role', 'WWW::OpenAPIClient::Role::AutoDoc');
}
package main;

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::AdditionalPropertiesClass
# WWW::OpenAPIClient::Object::AdditionalPropertiesClass
## Load the model package
```perl
use WWW::SwaggerClient::Object::AdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Animal
# WWW::OpenAPIClient::Object::Animal
## Load the model package
```perl
use WWW::SwaggerClient::Object::Animal;
use WWW::OpenAPIClient::Object::Animal;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::AnimalFarm
# WWW::OpenAPIClient::Object::AnimalFarm
## Load the model package
```perl
use WWW::SwaggerClient::Object::AnimalFarm;
use WWW::OpenAPIClient::Object::AnimalFarm;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::AnotherFakeApi
# WWW::OpenAPIClient::AnotherFakeApi
## Load the API package
```perl
use WWW::SwaggerClient::Object::AnotherFakeApi;
use WWW::OpenAPIClient::Object::AnotherFakeApi;
```
All URIs are relative to *http://petstore.swagger.io:80/v2*
@ -22,11 +22,11 @@ To test special tags
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::AnotherFakeApi;
my $api_instance = WWW::SwaggerClient::AnotherFakeApi->new(
use WWW::OpenAPIClient::AnotherFakeApi;
my $api_instance = WWW::OpenAPIClient::AnotherFakeApi->new(
);
my $client = WWW::SwaggerClient::Object::Client->new(); # Client | client model
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->test_special_tags(client => $client);

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ApiResponse
# WWW::OpenAPIClient::Object::ApiResponse
## Load the model package
```perl
use WWW::SwaggerClient::Object::ApiResponse;
use WWW::OpenAPIClient::Object::ApiResponse;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly
# WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly
## Load the model package
```perl
use WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ArrayOfNumberOnly
# WWW::OpenAPIClient::Object::ArrayOfNumberOnly
## Load the model package
```perl
use WWW::SwaggerClient::Object::ArrayOfNumberOnly;
use WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ArrayTest
# WWW::OpenAPIClient::Object::ArrayTest
## Load the model package
```perl
use WWW::SwaggerClient::Object::ArrayTest;
use WWW::OpenAPIClient::Object::ArrayTest;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Body4
# WWW::OpenAPIClient::Object::Body4
## Load the model package
```perl
use WWW::SwaggerClient::Object::Body4;
use WWW::OpenAPIClient::Object::Body4;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Capitalization
# WWW::OpenAPIClient::Object::Capitalization
## Load the model package
```perl
use WWW::SwaggerClient::Object::Capitalization;
use WWW::OpenAPIClient::Object::Capitalization;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Cat
# WWW::OpenAPIClient::Object::Cat
## Load the model package
```perl
use WWW::SwaggerClient::Object::Cat;
use WWW::OpenAPIClient::Object::Cat;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Category
# WWW::OpenAPIClient::Object::Category
## Load the model package
```perl
use WWW::SwaggerClient::Object::Category;
use WWW::OpenAPIClient::Object::Category;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ClassModel
# WWW::OpenAPIClient::Object::ClassModel
## Load the model package
```perl
use WWW::SwaggerClient::Object::ClassModel;
use WWW::OpenAPIClient::Object::ClassModel;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Client
# WWW::OpenAPIClient::Object::Client
## Load the model package
```perl
use WWW::SwaggerClient::Object::Client;
use WWW::OpenAPIClient::Object::Client;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Dog
# WWW::OpenAPIClient::Object::Dog
## Load the model package
```perl
use WWW::SwaggerClient::Object::Dog;
use WWW::OpenAPIClient::Object::Dog;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::EnumArrays
# WWW::OpenAPIClient::Object::EnumArrays
## Load the model package
```perl
use WWW::SwaggerClient::Object::EnumArrays;
use WWW::OpenAPIClient::Object::EnumArrays;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::EnumClass
# WWW::OpenAPIClient::Object::EnumClass
## Load the model package
```perl
use WWW::SwaggerClient::Object::EnumClass;
use WWW::OpenAPIClient::Object::EnumClass;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::EnumTest
# WWW::OpenAPIClient::Object::EnumTest
## Load the model package
```perl
use WWW::SwaggerClient::Object::EnumTest;
use WWW::OpenAPIClient::Object::EnumTest;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::FakeApi
# WWW::OpenAPIClient::FakeApi
## Load the API package
```perl
use WWW::SwaggerClient::Object::FakeApi;
use WWW::OpenAPIClient::Object::FakeApi;
```
All URIs are relative to *http://petstore.swagger.io:80/v2*
@ -13,6 +13,7 @@ Method | HTTP request | Description
[**fake_outer_composite_serialize**](FakeApi.md#fake_outer_composite_serialize) | **POST** /fake/outer/composite |
[**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 |
[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \&quot;client\&quot; model
[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
@ -21,7 +22,7 @@ Method | HTTP request | Description
# **fake_outer_boolean_serialize**
> OuterBoolean fake_outer_boolean_serialize(body => $body)
> boolean fake_outer_boolean_serialize(body => $body)
@ -30,11 +31,11 @@ Test serialization of outer boolean types
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $body = WWW::SwaggerClient::Object::boolean->new(); # boolean | Input boolean as post body
my $body = WWW::OpenAPIClient::Object::boolean->new(); # boolean | Input boolean as post body
eval {
my $result = $api_instance->fake_outer_boolean_serialize(body => $body);
@ -53,7 +54,7 @@ Name | Type | Description | Notes
### Return type
[**OuterBoolean**](OuterBoolean.md)
**boolean**
### Authorization
@ -61,7 +62,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -76,11 +77,11 @@ Test serialization of object with outer number type
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $outer_composite = WWW::SwaggerClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
my $outer_composite = WWW::OpenAPIClient::Object::OuterComposite->new(); # OuterComposite | Input composite as post body
eval {
my $result = $api_instance->fake_outer_composite_serialize(outer_composite => $outer_composite);
@ -107,13 +108,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **fake_outer_number_serialize**
> OuterNumber fake_outer_number_serialize(body => $body)
> double fake_outer_number_serialize(body => $body)
@ -122,11 +123,11 @@ Test serialization of outer number types
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $body = WWW::SwaggerClient::Object::double->new(); # double | Input number as post body
my $body = WWW::OpenAPIClient::Object::double->new(); # double | Input number as post body
eval {
my $result = $api_instance->fake_outer_number_serialize(body => $body);
@ -145,7 +146,7 @@ Name | Type | Description | Notes
### Return type
[**OuterNumber**](OuterNumber.md)
**double**
### Authorization
@ -153,13 +154,13 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **fake_outer_string_serialize**
> OuterString fake_outer_string_serialize(body => $body)
> string fake_outer_string_serialize(body => $body)
@ -168,11 +169,11 @@ Test serialization of outer string types
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $body = WWW::SwaggerClient::Object::string->new(); # string | Input string as post body
my $body = WWW::OpenAPIClient::Object::string->new(); # string | Input string as post body
eval {
my $result = $api_instance->fake_outer_string_serialize(body => $body);
@ -191,7 +192,52 @@ Name | Type | Description | Notes
### Return type
[**OuterString**](OuterString.md)
**string**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: */*
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_body_with_query_params**
> test_body_with_query_params(query => $query, user => $user)
### Example
```perl
use Data::Dumper;
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $query = "query_example"; # string |
my $user = WWW::OpenAPIClient::Object::User->new(); # User |
eval {
$api_instance->test_body_with_query_params(query => $query, user => $user);
};
if ($@) {
warn "Exception when calling FakeApi->test_body_with_query_params: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**query** | **string**| |
**user** | [**User**](User.md)| |
### Return type
void (empty response body)
### Authorization
@ -200,7 +246,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: */*
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -214,11 +260,11 @@ To test \"client\" model
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $client = WWW::SwaggerClient::Object::Client->new(); # Client | client model
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->test_client_model(client => $client);
@ -260,8 +306,8 @@ Fake endpoint for testing various parameters 假端點 偽のエンドポイン
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
# Configure HTTP basic authorization: http_basic_test
username => 'YOUR_USERNAME',
@ -335,8 +381,8 @@ To test enum parameters
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $enum_header_string_array = [("'$'")]; # ARRAY[string] | Header parameter enum test (string array)
@ -385,21 +431,21 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **test_inline_additional_properties**
> test_inline_additional_properties(UNKNOWN_PARAM_NAME => $UNKNOWN_PARAM_NAME)
> test_inline_additional_properties(request_body => $request_body)
test inline additionalProperties
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $UNKNOWN_PARAM_NAME = WWW::SwaggerClient::Object::->new(); # | request body
my $request_body = WWW::OpenAPIClient::Object::string->new(); # string | request body
eval {
$api_instance->test_inline_additional_properties(UNKNOWN_PARAM_NAME => $UNKNOWN_PARAM_NAME);
$api_instance->test_inline_additional_properties(request_body => $request_body);
};
if ($@) {
warn "Exception when calling FakeApi->test_inline_additional_properties: $@\n";
@ -410,7 +456,7 @@ if ($@) {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**UNKNOWN_PARAM_NAME** | [****](.md)| request body |
**request_body** | [**string**](string.md)| request body |
### Return type
@ -435,8 +481,8 @@ test json serialization of form data
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeApi;
my $api_instance = WWW::SwaggerClient::FakeApi->new(
use WWW::OpenAPIClient::FakeApi;
my $api_instance = WWW::OpenAPIClient::FakeApi->new(
);
my $param = "param_example"; # string | field1

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::FakeClassnameTags123Api
# WWW::OpenAPIClient::FakeClassnameTags123Api
## Load the API package
```perl
use WWW::SwaggerClient::Object::FakeClassnameTags123Api;
use WWW::OpenAPIClient::Object::FakeClassnameTags123Api;
```
All URIs are relative to *http://petstore.swagger.io:80/v2*
@ -22,8 +22,8 @@ To test class name in snake case
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::FakeClassnameTags123Api;
my $api_instance = WWW::SwaggerClient::FakeClassnameTags123Api->new(
use WWW::OpenAPIClient::FakeClassnameTags123Api;
my $api_instance = WWW::OpenAPIClient::FakeClassnameTags123Api->new(
# Configure API key authorization: api_key_query
api_key => {'api_key_query' => 'YOUR_API_KEY'},
@ -31,7 +31,7 @@ my $api_instance = WWW::SwaggerClient::FakeClassnameTags123Api->new(
#api_key_prefix => {'api_key_query' => 'Bearer'},
);
my $client = WWW::SwaggerClient::Object::Client->new(); # Client | client model
my $client = WWW::OpenAPIClient::Object::Client->new(); # Client | client model
eval {
my $result = $api_instance->test_classname(client => $client);

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::FormatTest
# WWW::OpenAPIClient::Object::FormatTest
## Load the model package
```perl
use WWW::SwaggerClient::Object::FormatTest;
use WWW::OpenAPIClient::Object::FormatTest;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::HasOnlyReadOnly
# WWW::OpenAPIClient::Object::HasOnlyReadOnly
## Load the model package
```perl
use WWW::SwaggerClient::Object::HasOnlyReadOnly;
use WWW::OpenAPIClient::Object::HasOnlyReadOnly;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::InlineResponse200
# WWW::OpenAPIClient::Object::InlineResponse200
## Load the model package
```perl
use WWW::SwaggerClient::Object::InlineResponse200;
use WWW::OpenAPIClient::Object::InlineResponse200;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::List
# WWW::OpenAPIClient::Object::List
## Load the model package
```perl
use WWW::SwaggerClient::Object::List;
use WWW::OpenAPIClient::Object::List;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::MapTest
# WWW::OpenAPIClient::Object::MapTest
## Load the model package
```perl
use WWW::SwaggerClient::Object::MapTest;
use WWW::OpenAPIClient::Object::MapTest;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass
# WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass
## Load the model package
```perl
use WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
use WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Model200Response
# WWW::OpenAPIClient::Object::Model200Response
## Load the model package
```perl
use WWW::SwaggerClient::Object::Model200Response;
use WWW::OpenAPIClient::Object::Model200Response;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ModelReturn
# WWW::OpenAPIClient::Object::ModelReturn
## Load the model package
```perl
use WWW::SwaggerClient::Object::ModelReturn;
use WWW::OpenAPIClient::Object::ModelReturn;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Name
# WWW::OpenAPIClient::Object::Name
## Load the model package
```perl
use WWW::SwaggerClient::Object::Name;
use WWW::OpenAPIClient::Object::Name;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::NumberOnly
# WWW::OpenAPIClient::Object::NumberOnly
## Load the model package
```perl
use WWW::SwaggerClient::Object::NumberOnly;
use WWW::OpenAPIClient::Object::NumberOnly;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ObjectReturn
# WWW::OpenAPIClient::Object::ObjectReturn
## Import the module
```perl
use WWW::SwaggerClient::Object::ObjectReturn;
use WWW::OpenAPIClient::Object::ObjectReturn;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Order
# WWW::OpenAPIClient::Object::Order
## Load the model package
```perl
use WWW::SwaggerClient::Object::Order;
use WWW::OpenAPIClient::Object::Order;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::OuterBoolean
# WWW::OpenAPIClient::Object::OuterBoolean
## Load the model package
```perl
use WWW::SwaggerClient::Object::OuterBoolean;
use WWW::OpenAPIClient::Object::OuterBoolean;
```
## Properties

View File

@ -1,16 +1,16 @@
# WWW::SwaggerClient::Object::OuterComposite
# WWW::OpenAPIClient::Object::OuterComposite
## Load the model package
```perl
use WWW::SwaggerClient::Object::OuterComposite;
use WWW::OpenAPIClient::Object::OuterComposite;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**my_number** | [**OuterNumber**](OuterNumber.md) | | [optional]
**my_string** | [**OuterString**](OuterString.md) | | [optional]
**my_boolean** | [**OuterBoolean**](OuterBoolean.md) | | [optional]
**my_number** | **double** | | [optional]
**my_string** | **string** | | [optional]
**my_boolean** | **boolean** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::OuterEnum
# WWW::OpenAPIClient::Object::OuterEnum
## Load the model package
```perl
use WWW::SwaggerClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::OuterEnum;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::OuterNumber
# WWW::OpenAPIClient::Object::OuterNumber
## Load the model package
```perl
use WWW::SwaggerClient::Object::OuterNumber;
use WWW::OpenAPIClient::Object::OuterNumber;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::OuterString
# WWW::OpenAPIClient::Object::OuterString
## Load the model package
```perl
use WWW::SwaggerClient::Object::OuterString;
use WWW::OpenAPIClient::Object::OuterString;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Pet
# WWW::OpenAPIClient::Object::Pet
## Load the model package
```perl
use WWW::SwaggerClient::Object::Pet;
use WWW::OpenAPIClient::Object::Pet;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::PetApi
# WWW::OpenAPIClient::PetApi
## Load the API package
```perl
use WWW::SwaggerClient::Object::PetApi;
use WWW::OpenAPIClient::Object::PetApi;
```
All URIs are relative to *http://petstore.swagger.io:80/v2*
@ -27,14 +27,14 @@ Add a new pet to the store
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $pet = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
$api_instance->add_pet(pet => $pet);
@ -73,8 +73,8 @@ Deletes a pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
@ -123,8 +123,8 @@ Multiple status values can be provided with comma separated strings
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
@ -172,8 +172,8 @@ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
@ -221,8 +221,8 @@ Returns a single pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure API key authorization: api_key
api_key => {'api_key' => 'YOUR_API_KEY'},
@ -270,14 +270,14 @@ Update an existing pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
);
my $pet = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
my $pet = WWW::OpenAPIClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
eval {
$api_instance->update_pet(pet => $pet);
@ -316,8 +316,8 @@ Updates a pet in the store with form data
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',
@ -366,8 +366,8 @@ uploads an image
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::PetApi;
my $api_instance = WWW::SwaggerClient::PetApi->new(
use WWW::OpenAPIClient::PetApi;
my $api_instance = WWW::OpenAPIClient::PetApi->new(
# Configure OAuth2 access token for authorization: petstore_auth
access_token => 'YOUR_ACCESS_TOKEN',

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::ReadOnlyFirst
# WWW::OpenAPIClient::Object::ReadOnlyFirst
## Load the model package
```perl
use WWW::SwaggerClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::SpecialModelName
# WWW::OpenAPIClient::Object::SpecialModelName
## Load the model package
```perl
use WWW::SwaggerClient::Object::SpecialModelName;
use WWW::OpenAPIClient::Object::SpecialModelName;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::SpecialModelName_
# WWW::OpenAPIClient::Object::SpecialModelName_
## Load the model package
```perl
use WWW::SwaggerClient::Object::SpecialModelName_;
use WWW::OpenAPIClient::Object::SpecialModelName_;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::StoreApi
# WWW::OpenAPIClient::StoreApi
## Load the API package
```perl
use WWW::SwaggerClient::Object::StoreApi;
use WWW::OpenAPIClient::Object::StoreApi;
```
All URIs are relative to *http://petstore.swagger.io:80/v2*
@ -25,8 +25,8 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
use WWW::OpenAPIClient::StoreApi;
my $api_instance = WWW::OpenAPIClient::StoreApi->new(
);
my $order_id = "order_id_example"; # string | ID of the order that needs to be deleted
@ -70,8 +70,8 @@ Returns a map of status codes to quantities
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
use WWW::OpenAPIClient::StoreApi;
my $api_instance = WWW::OpenAPIClient::StoreApi->new(
# Configure API key authorization: api_key
api_key => {'api_key' => 'YOUR_API_KEY'},
@ -117,8 +117,8 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
use WWW::OpenAPIClient::StoreApi;
my $api_instance = WWW::OpenAPIClient::StoreApi->new(
);
my $order_id = 789; # int | ID of pet that needs to be fetched
@ -161,11 +161,11 @@ Place an order for a pet
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::StoreApi;
my $api_instance = WWW::SwaggerClient::StoreApi->new(
use WWW::OpenAPIClient::StoreApi;
my $api_instance = WWW::OpenAPIClient::StoreApi->new(
);
my $order = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet
my $order = WWW::OpenAPIClient::Object::Order->new(); # Order | order placed for purchasing the pet
eval {
my $result = $api_instance->place_order(order => $order);
@ -192,7 +192,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::Tag
# WWW::OpenAPIClient::Object::Tag
## Load the model package
```perl
use WWW::SwaggerClient::Object::Tag;
use WWW::OpenAPIClient::Object::Tag;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::Object::User
# WWW::OpenAPIClient::Object::User
## Load the model package
```perl
use WWW::SwaggerClient::Object::User;
use WWW::OpenAPIClient::Object::User;
```
## Properties

View File

@ -1,8 +1,8 @@
# WWW::SwaggerClient::UserApi
# WWW::OpenAPIClient::UserApi
## Load the API package
```perl
use WWW::SwaggerClient::Object::UserApi;
use WWW::OpenAPIClient::Object::UserApi;
```
All URIs are relative to *http://petstore.swagger.io:80/v2*
@ -29,11 +29,11 @@ This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $user = WWW::SwaggerClient::Object::User->new(); # User | Created user object
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Created user object
eval {
$api_instance->create_user(user => $user);
@ -59,7 +59,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -72,11 +72,11 @@ Creates list of users with given input array
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $user = [WWW::SwaggerClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
$api_instance->create_users_with_array_input(user => $user);
@ -102,7 +102,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -115,11 +115,11 @@ Creates list of users with given input array
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $user = [WWW::SwaggerClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
my $user = [WWW::OpenAPIClient::Object::ARRAY[User]->new()]; # ARRAY[User] | List of user object
eval {
$api_instance->create_users_with_list_input(user => $user);
@ -145,7 +145,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
@ -160,8 +160,8 @@ This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $username = "username_example"; # string | The name that needs to be deleted
@ -203,8 +203,8 @@ Get user by user name
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $username = "username_example"; # string | The name that needs to be fetched. Use user1 for testing.
@ -247,8 +247,8 @@ Logs user into the system
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $username = "username_example"; # string | The user name for login
@ -293,8 +293,8 @@ Logs out current logged in user session
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
@ -334,12 +334,12 @@ This can only be done by the logged in user.
### Example
```perl
use Data::Dumper;
use WWW::SwaggerClient::UserApi;
my $api_instance = WWW::SwaggerClient::UserApi->new(
use WWW::OpenAPIClient::UserApi;
my $api_instance = WWW::OpenAPIClient::UserApi->new(
);
my $username = "username_example"; # string | name that need to be deleted
my $user = WWW::SwaggerClient::Object::User->new(); # User | Updated user object
my $user = WWW::OpenAPIClient::Object::User->new(); # User | Updated user object
eval {
$api_instance->update_user(username => $username, user => $user);
@ -366,7 +366,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::AnotherFakeApi;
package WWW::OpenAPIClient::AnotherFakeApi;
require 5.6.0;
use strict;
@ -27,7 +27,7 @@ use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use WWW::SwaggerClient::ApiClient;
use WWW::OpenAPIClient::ApiClient;
use base "Class::Data::Inheritable";
@ -37,10 +37,10 @@ sub new {
my $class = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::SwaggerClient::ApiClient' ) {
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::OpenAPIClient::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = WWW::SwaggerClient::ApiClient->new(@_);
$api_client = WWW::OpenAPIClient::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::ApiClient;
package WWW::OpenAPIClient::ApiClient;
use strict;
use warnings;
@ -37,17 +37,17 @@ use Log::Any qw($log);
use Carp;
use Module::Runtime qw(use_module);
use WWW::SwaggerClient::Configuration;
use WWW::OpenAPIClient::Configuration;
sub new {
my $class = shift;
my $config;
if ( $_[0] && ref $_[0] && ref $_[0] eq 'WWW::SwaggerClient::Configuration' ) {
if ( $_[0] && ref $_[0] && ref $_[0] eq 'WWW::OpenAPIClient::Configuration' ) {
$config = $_[0];
} else {
$config = WWW::SwaggerClient::Configuration->new(@_);
$config = WWW::OpenAPIClient::Configuration->new(@_);
}
my (%args) = (
@ -265,7 +265,7 @@ sub deserialize
} elsif (grep /^$class$/, ('string', 'int', 'float', 'bool', 'object')) {
return $data;
} else { # model
my $_instance = use_module("WWW::SwaggerClient::Object::$class")->new;
my $_instance = use_module("WWW::OpenAPIClient::Object::$class")->new;
if (ref $data eq "HASH") {
return $_instance->from_hash($data);
} else { # string, need to json decode first

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::ApiFactory;
package WWW::OpenAPIClient::ApiFactory;
use strict;
use warnings;
@ -26,26 +26,26 @@ use utf8;
use Carp;
use Module::Find;
usesub WWW::SwaggerClient::Object;
usesub WWW::OpenAPIClient::Object;
use WWW::SwaggerClient::ApiClient;
use WWW::OpenAPIClient::ApiClient;
=head1 Name
WWW::SwaggerClient::ApiFactory - constructs APIs to retrieve WWW::SwaggerClient objects
WWW::OpenAPIClient::ApiFactory - constructs APIs to retrieve WWW::OpenAPIClient objects
=head1 Synopsis
package My::Petstore::App;
use WWW::SwaggerClient::ApiFactory;
use WWW::OpenAPIClient::ApiFactory;
my $api_factory = WWW::SwaggerClient::ApiFactory->new( ... ); # any args for ApiClient constructor
my $api_factory = WWW::OpenAPIClient::ApiFactory->new( ... ); # any args for ApiClient constructor
# later...
my $pet_api = $api_factory->get_api('Pet');
# $pet_api isa WWW::SwaggerClient::PetApi
# $pet_api isa WWW::OpenAPIClient::PetApi
my $pet = $pet_api->get_pet_by_id(pet_id => $pet_id);
@ -58,19 +58,19 @@ use WWW::SwaggerClient::ApiClient;
=cut
# Load all the API classes and construct a lookup table at startup time
my %_apis = map { $_ =~ /^WWW::SwaggerClient::(.*)$/; $1 => $_ }
my %_apis = map { $_ =~ /^WWW::OpenAPIClient::(.*)$/; $1 => $_ }
grep {$_ =~ /Api$/}
usesub 'WWW::SwaggerClient';
usesub 'WWW::OpenAPIClient';
=head1 new($api_client)
create a new WWW::SwaggerClient::ApiFactory instance with the given WWW::SwaggerClient::ApiClient instance.
create a new WWW::OpenAPIClient::ApiFactory instance with the given WWW::OpenAPIClient::ApiClient instance.
=head1 new(%parameters)
Any parameters are optional, and are passed to and stored on the api_client object.
See L<WWW::SwaggerClient::ApiClient> and L<WWW::SwaggerClient::Configuration> for valid parameters
See L<WWW::OpenAPIClient::ApiClient> and L<WWW::OpenAPIClient::Configuration> for valid parameters
=cut
@ -78,10 +78,10 @@ sub new {
my ($class) = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::SwaggerClient::ApiClient' ) {
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::OpenAPIClient::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = WWW::SwaggerClient::ApiClient->new(@_);
$api_client = WWW::OpenAPIClient::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Configuration;
package WWW::OpenAPIClient::Configuration;
use strict;
use warnings;
@ -30,7 +30,7 @@ use constant VERSION => '1.0.0';
=head1 Name
WWW::SwaggerClient::Configuration - holds the configuration for all WWW::SwaggerClient Modules
WWW::OpenAPIClient::Configuration - holds the configuration for all WWW::OpenAPIClient Modules
=head1 new(%parameters)

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::FakeApi;
package WWW::OpenAPIClient::FakeApi;
require 5.6.0;
use strict;
@ -27,7 +27,7 @@ use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use WWW::SwaggerClient::ApiClient;
use WWW::OpenAPIClient::ApiClient;
use base "Class::Data::Inheritable";
@ -37,10 +37,10 @@ sub new {
my $class = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::SwaggerClient::ApiClient' ) {
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::OpenAPIClient::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = WWW::SwaggerClient::ApiClient->new(@_);
$api_client = WWW::OpenAPIClient::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;
@ -65,10 +65,10 @@ sub new {
__PACKAGE__->method_documentation->{ 'fake_outer_boolean_serialize' } = {
summary => '',
params => $params,
returns => 'OuterBoolean',
returns => 'boolean',
};
}
# @return OuterBoolean
# @return boolean
#
sub fake_outer_boolean_serialize {
my ($self, %args) = @_;
@ -86,7 +86,7 @@ sub fake_outer_boolean_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
my $_body_data;
# body params
@ -104,7 +104,7 @@ sub fake_outer_boolean_serialize {
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('OuterBoolean', $response);
my $_response_object = $self->{api_client}->deserialize('boolean', $response);
return $_response_object;
}
@ -146,7 +146,7 @@ sub fake_outer_composite_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
my $_body_data;
# body params
@ -185,10 +185,10 @@ sub fake_outer_composite_serialize {
__PACKAGE__->method_documentation->{ 'fake_outer_number_serialize' } = {
summary => '',
params => $params,
returns => 'OuterNumber',
returns => 'double',
};
}
# @return OuterNumber
# @return double
#
sub fake_outer_number_serialize {
my ($self, %args) = @_;
@ -206,7 +206,7 @@ sub fake_outer_number_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
my $_body_data;
# body params
@ -224,7 +224,7 @@ sub fake_outer_number_serialize {
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('OuterNumber', $response);
my $_response_object = $self->{api_client}->deserialize('double', $response);
return $_response_object;
}
@ -245,10 +245,10 @@ sub fake_outer_number_serialize {
__PACKAGE__->method_documentation->{ 'fake_outer_string_serialize' } = {
summary => '',
params => $params,
returns => 'OuterString',
returns => 'string',
};
}
# @return OuterString
# @return string
#
sub fake_outer_string_serialize {
my ($self, %args) = @_;
@ -266,7 +266,7 @@ sub fake_outer_string_serialize {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
my $_body_data;
# body params
@ -284,10 +284,87 @@ sub fake_outer_string_serialize {
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('OuterString', $response);
my $_response_object = $self->{api_client}->deserialize('string', $response);
return $_response_object;
}
#
# test_body_with_query_params
#
#
#
# @param string $query (required)
# @param User $user (required)
{
my $params = {
'query' => {
data_type => 'string',
description => '',
required => '1',
},
'user' => {
data_type => 'User',
description => '',
required => '1',
},
};
__PACKAGE__->method_documentation->{ 'test_body_with_query_params' } = {
summary => '',
params => $params,
returns => undef,
};
}
# @return void
#
sub test_body_with_query_params {
my ($self, %args) = @_;
# verify the required parameter 'query' is set
unless (exists $args{'query'}) {
croak("Missing the required parameter 'query' when calling test_body_with_query_params");
}
# verify the required parameter 'user' is set
unless (exists $args{'user'}) {
croak("Missing the required parameter 'user' when calling test_body_with_query_params");
}
# parse inputs
my $_resource_path = '/fake/body-with-query-params';
my $_method = 'PUT';
my $query_params = {};
my $header_params = {};
my $form_params = {};
# 'Accept' and 'Content-Type' header
my $_header_accept = $self->{api_client}->select_header_accept();
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
# query params
if ( exists $args{'query'}) {
$query_params->{'query'} = $self->{api_client}->to_query_value($args{'query'});
}
my $_body_data;
# body params
if ( exists $args{'user'}) {
$_body_data = $args{'user'};
}
# authentication setting, if any
my $auth_settings = [qw()];
# make the API Call
$self->{api_client}->call_api($_resource_path, $_method,
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
return;
}
#
# test_client_model
#
@ -711,11 +788,11 @@ sub test_enum_parameters {
#
# test inline additionalProperties
#
# @param $UNKNOWN_PARAM_NAME request body (required)
# @param string $request_body request body (required)
{
my $params = {
'UNKNOWN_PARAM_NAME' => {
data_type => '',
'request_body' => {
data_type => 'string',
description => 'request body',
required => '1',
},
@ -731,9 +808,9 @@ sub test_enum_parameters {
sub test_inline_additional_properties {
my ($self, %args) = @_;
# verify the required parameter 'UNKNOWN_PARAM_NAME' is set
unless (exists $args{'UNKNOWN_PARAM_NAME'}) {
croak("Missing the required parameter 'UNKNOWN_PARAM_NAME' when calling test_inline_additional_properties");
# verify the required parameter 'request_body' is set
unless (exists $args{'request_body'}) {
croak("Missing the required parameter 'request_body' when calling test_inline_additional_properties");
}
# parse inputs
@ -753,8 +830,8 @@ sub test_inline_additional_properties {
my $_body_data;
# body params
if ( exists $args{'UNKNOWN_PARAM_NAME'}) {
$_body_data = $args{'UNKNOWN_PARAM_NAME'};
if ( exists $args{'request_body'}) {
$_body_data = $args{'request_body'};
}
# authentication setting, if any

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::FakeClassnameTags123Api;
package WWW::OpenAPIClient::FakeClassnameTags123Api;
require 5.6.0;
use strict;
@ -27,7 +27,7 @@ use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use WWW::SwaggerClient::ApiClient;
use WWW::OpenAPIClient::ApiClient;
use base "Class::Data::Inheritable";
@ -37,10 +37,10 @@ sub new {
my $class = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::SwaggerClient::ApiClient' ) {
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::OpenAPIClient::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = WWW::SwaggerClient::ApiClient->new(@_);
$api_client = WWW::OpenAPIClient::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::AdditionalPropertiesClass;
package WWW::OpenAPIClient::Object::AdditionalPropertiesClass;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Animal;
package WWW::OpenAPIClient::Object::Animal;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::AnimalFarm;
package WWW::OpenAPIClient::Object::AnimalFarm;
require 5.6.0;
use strict;
@ -30,7 +30,7 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::Animal;
use WWW::OpenAPIClient::Object::Animal;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -131,7 +131,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::ApiResponse;
package WWW::OpenAPIClient::Object::ApiResponse;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly;
package WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::ArrayOfNumberOnly;
package WWW::OpenAPIClient::Object::ArrayOfNumberOnly;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::ArrayTest;
package WWW::OpenAPIClient::Object::ArrayTest;
require 5.6.0;
use strict;
@ -30,7 +30,7 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::ReadOnlyFirst;
use WWW::OpenAPIClient::Object::ReadOnlyFirst;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -131,7 +131,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Capitalization;
package WWW::OpenAPIClient::Object::Capitalization;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Cat;
package WWW::OpenAPIClient::Object::Cat;
require 5.6.0;
use strict;
@ -30,7 +30,7 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::Animal;
use WWW::OpenAPIClient::Object::Animal;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -131,7 +131,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Category;
package WWW::OpenAPIClient::Object::Category;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::ClassModel;
package WWW::OpenAPIClient::Object::ClassModel;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Client;
package WWW::OpenAPIClient::Object::Client;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Dog;
package WWW::OpenAPIClient::Object::Dog;
require 5.6.0;
use strict;
@ -30,7 +30,7 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::Animal;
use WWW::OpenAPIClient::Object::Animal;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -131,7 +131,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::EnumArrays;
package WWW::OpenAPIClient::Object::EnumArrays;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::EnumClass;
package WWW::OpenAPIClient::Object::EnumClass;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::EnumTest;
package WWW::OpenAPIClient::Object::EnumTest;
require 5.6.0;
use strict;
@ -30,7 +30,7 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::OuterEnum;
use WWW::OpenAPIClient::Object::OuterEnum;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -131,7 +131,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::FormatTest;
package WWW::OpenAPIClient::Object::FormatTest;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::HasOnlyReadOnly;
package WWW::OpenAPIClient::Object::HasOnlyReadOnly;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::List;
package WWW::OpenAPIClient::Object::List;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::MapTest;
package WWW::OpenAPIClient::Object::MapTest;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
package WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass;
require 5.6.0;
use strict;
@ -30,7 +30,7 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::Animal;
use WWW::OpenAPIClient::Object::Animal;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -131,7 +131,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Model200Response;
package WWW::OpenAPIClient::Object::Model200Response;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::ModelReturn;
package WWW::OpenAPIClient::Object::ModelReturn;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Name;
package WWW::OpenAPIClient::Object::Name;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::NumberOnly;
package WWW::OpenAPIClient::Object::NumberOnly;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Order;
package WWW::OpenAPIClient::Object::Order;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::OuterComposite;
package WWW::OpenAPIClient::Object::OuterComposite;
require 5.6.0;
use strict;
@ -30,9 +30,6 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::OuterBoolean;
use WWW::SwaggerClient::Object::OuterNumber;
use WWW::SwaggerClient::Object::OuterString;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -133,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}
@ -147,21 +144,21 @@ __PACKAGE__->class_documentation({description => '',
__PACKAGE__->method_documentation({
'my_number' => {
datatype => 'OuterNumber',
datatype => 'double',
base_name => 'my_number',
description => '',
format => '',
read_only => '',
},
'my_string' => {
datatype => 'OuterString',
datatype => 'string',
base_name => 'my_string',
description => '',
format => '',
read_only => '',
},
'my_boolean' => {
datatype => 'OuterBoolean',
datatype => 'boolean',
base_name => 'my_boolean',
description => '',
format => '',
@ -170,9 +167,9 @@ __PACKAGE__->method_documentation({
});
__PACKAGE__->swagger_types( {
'my_number' => 'OuterNumber',
'my_string' => 'OuterString',
'my_boolean' => 'OuterBoolean'
'my_number' => 'double',
'my_string' => 'string',
'my_boolean' => 'boolean'
} );
__PACKAGE__->attribute_map( {

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::OuterEnum;
package WWW::OpenAPIClient::Object::OuterEnum;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Pet;
package WWW::OpenAPIClient::Object::Pet;
require 5.6.0;
use strict;
@ -30,8 +30,8 @@ use Log::Any qw($log);
use Date::Parse;
use DateTime;
use WWW::SwaggerClient::Object::Category;
use WWW::SwaggerClient::Object::Tag;
use WWW::OpenAPIClient::Object::Category;
use WWW::OpenAPIClient::Object::Tag;
use base ("Class::Accessor", "Class::Data::Inheritable");
@ -132,7 +132,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::ReadOnlyFirst;
package WWW::OpenAPIClient::Object::ReadOnlyFirst;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::SpecialModelName;
package WWW::OpenAPIClient::Object::SpecialModelName;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::Tag;
package WWW::OpenAPIClient::Object::Tag;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Object::User;
package WWW::OpenAPIClient::Object::User;
require 5.6.0;
use strict;
@ -130,7 +130,7 @@ sub _deserialize {
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "WWW::SwaggerClient::Object::$type->new()";
my $_instance = eval "WWW::OpenAPIClient::Object::$type->new()";
return $_instance->from_hash($data);
}
}

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::PetApi;
package WWW::OpenAPIClient::PetApi;
require 5.6.0;
use strict;
@ -27,7 +27,7 @@ use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use WWW::SwaggerClient::ApiClient;
use WWW::OpenAPIClient::ApiClient;
use base "Class::Data::Inheritable";
@ -37,10 +37,10 @@ sub new {
my $class = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::SwaggerClient::ApiClient' ) {
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::OpenAPIClient::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = WWW::SwaggerClient::ApiClient->new(@_);
$api_client = WWW::OpenAPIClient::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;

View File

@ -17,14 +17,14 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Role;
package WWW::OpenAPIClient::Role;
use utf8;
use Moose::Role;
use namespace::autoclean;
use Class::Inspector;
use Log::Any qw($log);
use WWW::SwaggerClient::ApiFactory;
use WWW::OpenAPIClient::ApiFactory;
has base_url => ( is => 'ro',
required => 0,
@ -33,7 +33,7 @@ has base_url => ( is => 'ro',
);
has api_factory => ( is => 'ro',
isa => 'WWW::SwaggerClient::ApiFactory',
isa => 'WWW::OpenAPIClient::ApiFactory',
builder => '_build_af',
lazy => 1,
documentation => 'Builds an instance of the endpoint API class',
@ -47,8 +47,8 @@ has tokens => ( is => 'ro',
);
has _cfg => ( is => 'ro',
isa => 'WWW::SwaggerClient::Configuration',
default => sub { WWW::SwaggerClient::Configuration->new() },
isa => 'WWW::OpenAPIClient::Configuration',
default => sub { WWW::OpenAPIClient::Configuration->new() },
);
has version_info => ( is => 'ro',
@ -106,12 +106,12 @@ sub _build_af {
my $self = shift;
my %args;
$args{base_url} = $self->base_url if $self->base_url;
return WWW::SwaggerClient::ApiFactory->new(%args);
return WWW::OpenAPIClient::ApiFactory->new(%args);
}
=head1 NAME
WWW::SwaggerClient::Role - a Moose role for the Swagger Petstore
WWW::OpenAPIClient::Role - a Moose role for the Swagger Petstore
=head2 Swagger Petstore version: 1.0.0
@ -129,7 +129,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::SwaggerClient::ApiFactory for non-Moosey usage.
WWW::OpenAPIClient::ApiFactory for non-Moosey usage.
=head1 SYNOPSIS
@ -143,7 +143,7 @@ role.
package MyApp;
use Moose;
with 'WWW::SwaggerClient::Role';
with 'WWW::OpenAPIClient::Role';
package main;
@ -201,7 +201,7 @@ you are accessing. Usually C<prefix> and C<in> will be determined by the code ge
the spec and you will not need to set them at run time. If not, C<in> will
default to 'head' and C<prefix> to the empty string.
The tokens will be placed in a L<WWW::SwaggerClient::Configuration> instance
The tokens will be placed in a L<WWW::OpenAPIClient::Configuration> instance
as follows, but you don't need to know about this.
=over 4
@ -250,7 +250,7 @@ returns the current value of C<base_url>.
Returns an API factory object. You probably won't need to call this directly.
$self->api_factory('Pet'); # returns a WWW::SwaggerClient::PetApi instance
$self->api_factory('Pet'); # returns a WWW::OpenAPIClient::PetApi instance
$self->pet_api; # the same

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::Role::AutoDoc;
package WWW::OpenAPIClient::Role::AutoDoc;
use List::MoreUtils qw(uniq);
use Moose::Role;
@ -59,7 +59,7 @@ sub _printisa {
foreach my $role (@roles) {
$rolepkg = $role->{package} || next; # some are anonymous, or something
next if $rolepkg eq 'WWW::SwaggerClient::Role::AutoDoc';
next if $rolepkg eq 'WWW::OpenAPIClient::Role::AutoDoc';
$role_reqs = join ', ', keys %{$role->{required_methods}};
$role_reqs ||= '';
$~ = $how eq 'pod' ? 'ROLES_POD' : 'ROLES';

View File

@ -17,7 +17,7 @@ Generated by: https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
# Ref: https://github.com/swagger-api/swagger-codegen
#
package WWW::SwaggerClient::StoreApi;
package WWW::OpenAPIClient::StoreApi;
require 5.6.0;
use strict;
@ -27,7 +27,7 @@ use Exporter;
use Carp qw( croak );
use Log::Any qw($log);
use WWW::SwaggerClient::ApiClient;
use WWW::OpenAPIClient::ApiClient;
use base "Class::Data::Inheritable";
@ -37,10 +37,10 @@ sub new {
my $class = shift;
my $api_client;
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::SwaggerClient::ApiClient' ) {
if ($_[0] && ref $_[0] && ref $_[0] eq 'WWW::OpenAPIClient::ApiClient' ) {
$api_client = $_[0];
} else {
$api_client = WWW::SwaggerClient::ApiClient->new(@_);
$api_client = WWW::OpenAPIClient::ApiClient->new(@_);
}
bless { api_client => $api_client }, $class;
@ -270,7 +270,7 @@ sub place_order {
if ($_header_accept) {
$header_params->{'Accept'} = $_header_accept;
}
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');
$header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type();
my $_body_data;
# body params

Some files were not shown because too many files have changed in this diff Show More