From c60010c965c0ed4cc041f56fc44fff8f1c218c4f Mon Sep 17 00:00:00 2001 From: William Cheng Date: Sun, 29 Apr 2018 20:37:12 +0800 Subject: [PATCH] Update default value for Perl, Ruby, ROR generators (#265) * rename perl genreator default * update ruby sinatra default * rename ror default value --- .../codegen/languages/PerlClientCodegen.java | 12 +- .../codegen/languages/RubyClientCodegen.java | 20 +- .../languages/RubyOnRailsServerCodegen.java | 6 +- .../languages/RubySinatraServerCodegen.java | 8 +- .../src/main/resources/rails5/README.md | 6 +- .../src/main/resources/rails5/info.mustache | 10 +- .../src/main/resources/rails5/routes.mustache | 4 +- .../sinatra/{Swaggering.rb => OpenAPIing.rb} | 20 +- .../main/resources/sinatra/my_app.mustache | 4 +- samples/client/petstore/perl/README.md | 248 +++++++++--------- samples/client/petstore/perl/bin/autodoc | 4 +- .../perl/docs/AdditionalPropertiesClass.md | 4 +- samples/client/petstore/perl/docs/Animal.md | 4 +- .../client/petstore/perl/docs/AnimalFarm.md | 4 +- .../petstore/perl/docs/AnotherfakeApi.md | 10 +- .../client/petstore/perl/docs/ApiResponse.md | 4 +- .../perl/docs/ArrayOfArrayOfNumberOnly.md | 4 +- .../petstore/perl/docs/ArrayOfNumberOnly.md | 4 +- .../client/petstore/perl/docs/ArrayTest.md | 4 +- samples/client/petstore/perl/docs/Body4.md | 4 +- .../petstore/perl/docs/Capitalization.md | 4 +- samples/client/petstore/perl/docs/Cat.md | 4 +- samples/client/petstore/perl/docs/Category.md | 4 +- .../client/petstore/perl/docs/ClassModel.md | 4 +- samples/client/petstore/perl/docs/Client.md | 4 +- samples/client/petstore/perl/docs/Dog.md | 4 +- .../client/petstore/perl/docs/EnumArrays.md | 4 +- .../client/petstore/perl/docs/EnumClass.md | 4 +- samples/client/petstore/perl/docs/EnumTest.md | 4 +- samples/client/petstore/perl/docs/FakeApi.md | 124 ++++++--- .../perl/docs/FakeClassnameTags123Api.md | 10 +- .../client/petstore/perl/docs/FormatTest.md | 4 +- .../petstore/perl/docs/HasOnlyReadOnly.md | 4 +- .../petstore/perl/docs/InlineResponse200.md | 4 +- samples/client/petstore/perl/docs/List.md | 4 +- samples/client/petstore/perl/docs/MapTest.md | 4 +- ...dPropertiesAndAdditionalPropertiesClass.md | 4 +- .../petstore/perl/docs/Model200Response.md | 4 +- .../client/petstore/perl/docs/ModelReturn.md | 4 +- samples/client/petstore/perl/docs/Name.md | 4 +- .../client/petstore/perl/docs/NumberOnly.md | 4 +- .../client/petstore/perl/docs/ObjectReturn.md | 4 +- samples/client/petstore/perl/docs/Order.md | 4 +- .../client/petstore/perl/docs/OuterBoolean.md | 4 +- .../petstore/perl/docs/OuterComposite.md | 10 +- .../client/petstore/perl/docs/OuterEnum.md | 4 +- .../client/petstore/perl/docs/OuterNumber.md | 4 +- .../client/petstore/perl/docs/OuterString.md | 4 +- samples/client/petstore/perl/docs/Pet.md | 4 +- samples/client/petstore/perl/docs/PetApi.md | 40 +-- .../petstore/perl/docs/ReadOnlyFirst.md | 4 +- .../petstore/perl/docs/SpecialModelName.md | 4 +- .../petstore/perl/docs/SpecialModelName_.md | 4 +- samples/client/petstore/perl/docs/StoreApi.md | 24 +- samples/client/petstore/perl/docs/Tag.md | 4 +- samples/client/petstore/perl/docs/User.md | 4 +- samples/client/petstore/perl/docs/UserApi.md | 52 ++-- .../AnotherFakeApi.pm} | 8 +- .../ApiClient.pm | 10 +- .../ApiFactory.pm | 26 +- .../Configuration.pm | 4 +- .../FakeApi.pm | 127 +++++++-- .../FakeClassnameTags123Api.pm | 8 +- .../Object/AdditionalPropertiesClass.pm | 4 +- .../Object/Animal.pm | 4 +- .../Object/AnimalFarm.pm | 6 +- .../Object/ApiResponse.pm | 4 +- .../Object/ArrayOfArrayOfNumberOnly.pm | 4 +- .../Object/ArrayOfNumberOnly.pm | 4 +- .../Object/ArrayTest.pm | 6 +- .../Object/Capitalization.pm | 4 +- .../Object/Cat.pm | 6 +- .../Object/Category.pm | 4 +- .../Object/ClassModel.pm | 4 +- .../Object/Client.pm | 4 +- .../Object/Dog.pm | 6 +- .../Object/EnumArrays.pm | 4 +- .../Object/EnumClass.pm | 4 +- .../Object/EnumTest.pm | 6 +- .../Object/FormatTest.pm | 4 +- .../Object/HasOnlyReadOnly.pm | 4 +- .../Object/List.pm | 4 +- .../Object/MapTest.pm | 4 +- ...dPropertiesAndAdditionalPropertiesClass.pm | 6 +- .../Object/Model200Response.pm | 4 +- .../Object/ModelReturn.pm | 4 +- .../Object/Name.pm | 4 +- .../Object/NumberOnly.pm | 4 +- .../Object/Order.pm | 4 +- .../Object/OuterComposite.pm | 19 +- .../Object/OuterEnum.pm | 4 +- .../Object/Pet.pm | 8 +- .../Object/ReadOnlyFirst.pm | 4 +- .../Object/SpecialModelName.pm | 4 +- .../Object/Tag.pm | 4 +- .../Object/User.pm | 4 +- .../PetApi.pm | 8 +- .../{SwaggerClient => OpenAPIClient}/Role.pm | 22 +- .../Role/AutoDoc.pm | 4 +- .../StoreApi.pm | 10 +- .../UserApi.pm | 16 +- .../WWW/SwaggerClient/Object/BaseObject.pm | 98 ------- .../lib/WWW/SwaggerClient/Object/Body4.pm | 175 ------------ .../SwaggerClient/Object/InlineResponse200.pm | 171 ------------ .../WWW/SwaggerClient/Object/ObjectReturn.pm | 127 --------- .../WWW/SwaggerClient/Object/OuterBoolean.pm | 159 ----------- .../WWW/SwaggerClient/Object/OuterNumber.pm | 159 ----------- .../WWW/SwaggerClient/Object/OuterString.pm | 159 ----------- .../SwaggerClient/Object/SpecialModelName_.pm | 166 ------------ .../perl/t/AdditionalPropertiesClassTest.t | 6 +- .../client/petstore/perl/t/AnimalFarmTest.t | 6 +- samples/client/petstore/perl/t/AnimalTest.t | 6 +- .../petstore/perl/t/AnotherfakeApiTest.t | 6 +- .../client/petstore/perl/t/ApiResponseTest.t | 6 +- .../perl/t/ArrayOfArrayOfNumberOnlyTest.t | 6 +- .../petstore/perl/t/ArrayOfNumberOnlyTest.t | 6 +- .../client/petstore/perl/t/ArrayTestTest.t | 6 +- samples/client/petstore/perl/t/Body4Test.t | 6 +- .../petstore/perl/t/CapitalizationTest.t | 6 +- samples/client/petstore/perl/t/CatTest.t | 6 +- samples/client/petstore/perl/t/CategoryTest.t | 6 +- .../client/petstore/perl/t/ClassModelTest.t | 6 +- samples/client/petstore/perl/t/ClientTest.t | 6 +- samples/client/petstore/perl/t/DogTest.t | 6 +- .../client/petstore/perl/t/EnumArraysTest.t | 6 +- .../client/petstore/perl/t/EnumClassTest.t | 6 +- samples/client/petstore/perl/t/EnumTestTest.t | 6 +- samples/client/petstore/perl/t/FakeApiTest.t | 6 +- .../perl/t/FakeClassnameTags123ApiTest.t | 6 +- .../client/petstore/perl/t/FormatTestTest.t | 6 +- .../petstore/perl/t/HasOnlyReadOnlyTest.t | 6 +- .../petstore/perl/t/InlineResponse200Test.t | 6 +- samples/client/petstore/perl/t/ListTest.t | 6 +- samples/client/petstore/perl/t/MapTestTest.t | 6 +- ...opertiesAndAdditionalPropertiesClassTest.t | 6 +- .../petstore/perl/t/Model200ResponseTest.t | 6 +- .../client/petstore/perl/t/ModelReturnTest.t | 6 +- samples/client/petstore/perl/t/NameTest.t | 6 +- .../client/petstore/perl/t/NumberOnlyTest.t | 6 +- .../client/petstore/perl/t/ObjectReturnTest.t | 6 +- samples/client/petstore/perl/t/OrderTest.t | 6 +- .../client/petstore/perl/t/OuterBooleanTest.t | 6 +- .../petstore/perl/t/OuterCompositeTest.t | 6 +- .../client/petstore/perl/t/OuterEnumTest.t | 6 +- .../client/petstore/perl/t/OuterNumberTest.t | 6 +- .../client/petstore/perl/t/OuterStringTest.t | 6 +- samples/client/petstore/perl/t/PetApiTest.t | 6 +- samples/client/petstore/perl/t/PetTest.t | 6 +- .../petstore/perl/t/ReadOnlyFirstTest.t | 6 +- .../petstore/perl/t/SpecialModelNameTest.t | 6 +- .../petstore/perl/t/SpecialModelName_Test.t | 6 +- samples/client/petstore/perl/t/StoreApiTest.t | 6 +- samples/client/petstore/perl/t/TagTest.t | 6 +- samples/client/petstore/perl/t/UserApiTest.t | 6 +- samples/client/petstore/perl/t/UserTest.t | 6 +- samples/client/petstore/perl/test.pl | 26 +- .../client/petstore/perl/tests/01_pet_api.t | 32 +-- .../client/petstore/perl/tests/02_store_api.t | 38 +-- .../petstore/perl/tests/03_api_factory.t | 14 +- samples/client/petstore/perl/tests/04_role.t | 8 +- samples/server/petstore/rails5/README.md | 6 +- .../rails5/app/controllers/pet_controller.rb | 2 +- .../app/controllers/store_controller.rb | 2 +- .../rails5/app/controllers/user_controller.rb | 2 +- .../rails5/app/models/api_response.rb | 2 +- .../petstore/rails5/app/models/category.rb | 2 +- .../petstore/rails5/app/models/order.rb | 2 +- .../server/petstore/rails5/app/models/pet.rb | 2 +- .../server/petstore/rails5/app/models/tag.rb | 2 +- .../server/petstore/rails5/app/models/user.rb | 2 +- .../server/petstore/rails5/config/routes.rb | 44 ++-- .../rails5/db/migrate/0_init_tables.rb | 2 +- .../server/petstore/sinatra/lib/openapiing.rb | 163 ++++++++++++ samples/server/petstore/sinatra/my_app.rb | 4 +- samples/server/petstore/sinatra/openapi.yaml | 163 ++++++------ 175 files changed, 1121 insertions(+), 2061 deletions(-) rename modules/openapi-generator/src/main/resources/sinatra/{Swaggering.rb => OpenAPIing.rb} (90%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient/AnotherfakeApi.pm => OpenAPIClient/AnotherFakeApi.pm} (92%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/ApiClient.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/ApiFactory.pm (74%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Configuration.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/FakeApi.pm (88%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/FakeClassnameTags123Api.pm (92%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/AdditionalPropertiesClass.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Animal.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/AnimalFarm.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/ApiResponse.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/ArrayOfArrayOfNumberOnly.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/ArrayOfNumberOnly.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/ArrayTest.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Capitalization.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Cat.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Category.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/ClassModel.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Client.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Dog.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/EnumArrays.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/EnumClass.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/EnumTest.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/FormatTest.pm (98%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/HasOnlyReadOnly.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/List.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/MapTest.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/MixedPropertiesAndAdditionalPropertiesClass.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Model200Response.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/ModelReturn.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Name.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/NumberOnly.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Order.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/OuterComposite.pm (90%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/OuterEnum.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Pet.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/ReadOnlyFirst.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/SpecialModelName.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/Tag.pm (97%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Object/User.pm (98%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/PetApi.pm (98%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Role.pm (94%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/Role/AutoDoc.pm (98%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/StoreApi.pm (96%) rename samples/client/petstore/perl/lib/WWW/{SwaggerClient => OpenAPIClient}/UserApi.pm (97%) delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/BaseObject.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Body4.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ObjectReturn.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterBoolean.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterNumber.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterString.pm delete mode 100644 samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName_.pm create mode 100644 samples/server/petstore/sinatra/lib/openapiing.rb diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java index 06ba248303b..70780fe31c8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PerlClientCodegen.java @@ -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; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 6bcf6946a7e..f2cbf895fe5 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -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(); } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java index feb1bead368..f2a9aeb4857 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyOnRailsServerCodegen.java @@ -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"; } diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java index 1253b5fef63..efa1551ed0a 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubySinatraServerCodegen.java @@ -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; diff --git a/modules/openapi-generator/src/main/resources/rails5/README.md b/modules/openapi-generator/src/main/resources/rails5/README.md index 91fe3051c49..cf74536c5a4 100644 --- a/modules/openapi-generator/src/main/resources/rails5/README.md +++ b/modules/openapi-generator/src/main/resources/rails5/README.md @@ -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 diff --git a/modules/openapi-generator/src/main/resources/rails5/info.mustache b/modules/openapi-generator/src/main/resources/rails5/info.mustache index ec6e5a322aa..753d583f24d 100644 --- a/modules/openapi-generator/src/main/resources/rails5/info.mustache +++ b/modules/openapi-generator/src/main/resources/rails5/info.mustache @@ -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 diff --git a/modules/openapi-generator/src/main/resources/rails5/routes.mustache b/modules/openapi-generator/src/main/resources/rails5/routes.mustache index 76d745d3606..520fa841b34 100644 --- a/modules/openapi-generator/src/main/resources/rails5/routes.mustache +++ b/modules/openapi-generator/src/main/resources/rails5/routes.mustache @@ -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}} diff --git a/modules/openapi-generator/src/main/resources/sinatra/Swaggering.rb b/modules/openapi-generator/src/main/resources/sinatra/OpenAPIing.rb similarity index 90% rename from modules/openapi-generator/src/main/resources/sinatra/Swaggering.rb rename to modules/openapi-generator/src/main/resources/sinatra/OpenAPIing.rb index 69cc74556ac..ff15b54f2b9 100644 --- a/modules/openapi-generator/src/main/resources/sinatra/Swaggering.rb +++ b/modules/openapi-generator/src/main/resources/sinatra/OpenAPIing.rb @@ -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, diff --git a/modules/openapi-generator/src/main/resources/sinatra/my_app.mustache b/modules/openapi-generator/src/main/resources/sinatra/my_app.mustache index 7d4e87adffc..c339c33454a 100644 --- a/modules/openapi-generator/src/main/resources/sinatra/my_app.mustache +++ b/modules/openapi-generator/src/main/resources/sinatra/my_app.mustache @@ -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 diff --git a/samples/client/petstore/perl/README.md b/samples/client/petstore/perl/README.md index bd88c8ea382..94dbf7dbf13 100644 --- a/samples/client/petstore/perl/README.md +++ b/samples/client/petstore/perl/README.md @@ -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 instance +The tokens will be placed in a L 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 \"client\" 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 diff --git a/samples/client/petstore/perl/bin/autodoc b/samples/client/petstore/perl/bin/autodoc index 049fcf7fecf..3ca2e004344 100644 --- a/samples/client/petstore/perl/bin/autodoc +++ b/samples/client/petstore/perl/bin/autodoc @@ -15,14 +15,14 @@ my $my_app = $options{c} || 'My::App'; if ($options{c}) { eval <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); diff --git a/samples/client/petstore/perl/docs/ApiResponse.md b/samples/client/petstore/perl/docs/ApiResponse.md index 914cebf88ed..db0e50fe1c6 100644 --- a/samples/client/petstore/perl/docs/ApiResponse.md +++ b/samples/client/petstore/perl/docs/ApiResponse.md @@ -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 diff --git a/samples/client/petstore/perl/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/perl/docs/ArrayOfArrayOfNumberOnly.md index ebf92126719..b68a9a8f715 100644 --- a/samples/client/petstore/perl/docs/ArrayOfArrayOfNumberOnly.md +++ b/samples/client/petstore/perl/docs/ArrayOfArrayOfNumberOnly.md @@ -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 diff --git a/samples/client/petstore/perl/docs/ArrayOfNumberOnly.md b/samples/client/petstore/perl/docs/ArrayOfNumberOnly.md index dfcc2fb3413..4612d2abb85 100644 --- a/samples/client/petstore/perl/docs/ArrayOfNumberOnly.md +++ b/samples/client/petstore/perl/docs/ArrayOfNumberOnly.md @@ -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 diff --git a/samples/client/petstore/perl/docs/ArrayTest.md b/samples/client/petstore/perl/docs/ArrayTest.md index 635c26a893a..f41d279aa5f 100644 --- a/samples/client/petstore/perl/docs/ArrayTest.md +++ b/samples/client/petstore/perl/docs/ArrayTest.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Body4.md b/samples/client/petstore/perl/docs/Body4.md index 78c6b665305..38e2c198944 100644 --- a/samples/client/petstore/perl/docs/Body4.md +++ b/samples/client/petstore/perl/docs/Body4.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Capitalization.md b/samples/client/petstore/perl/docs/Capitalization.md index c63257baa52..f36e3db66cc 100644 --- a/samples/client/petstore/perl/docs/Capitalization.md +++ b/samples/client/petstore/perl/docs/Capitalization.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Cat.md b/samples/client/petstore/perl/docs/Cat.md index 0539f73e502..f7bb591de24 100644 --- a/samples/client/petstore/perl/docs/Cat.md +++ b/samples/client/petstore/perl/docs/Cat.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Category.md b/samples/client/petstore/perl/docs/Category.md index aa69032fc1c..1bcd862302e 100644 --- a/samples/client/petstore/perl/docs/Category.md +++ b/samples/client/petstore/perl/docs/Category.md @@ -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 diff --git a/samples/client/petstore/perl/docs/ClassModel.md b/samples/client/petstore/perl/docs/ClassModel.md index 95d325176df..0f03de51da0 100644 --- a/samples/client/petstore/perl/docs/ClassModel.md +++ b/samples/client/petstore/perl/docs/ClassModel.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Client.md b/samples/client/petstore/perl/docs/Client.md index 08f3b74f010..7eaff58ecb2 100644 --- a/samples/client/petstore/perl/docs/Client.md +++ b/samples/client/petstore/perl/docs/Client.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Dog.md b/samples/client/petstore/perl/docs/Dog.md index 16d3972d2b5..93f82b609d9 100644 --- a/samples/client/petstore/perl/docs/Dog.md +++ b/samples/client/petstore/perl/docs/Dog.md @@ -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 diff --git a/samples/client/petstore/perl/docs/EnumArrays.md b/samples/client/petstore/perl/docs/EnumArrays.md index b693b9a2641..cf4be6f11c0 100644 --- a/samples/client/petstore/perl/docs/EnumArrays.md +++ b/samples/client/petstore/perl/docs/EnumArrays.md @@ -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 diff --git a/samples/client/petstore/perl/docs/EnumClass.md b/samples/client/petstore/perl/docs/EnumClass.md index c4e40dbf06b..0d3e56a24ae 100644 --- a/samples/client/petstore/perl/docs/EnumClass.md +++ b/samples/client/petstore/perl/docs/EnumClass.md @@ -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 diff --git a/samples/client/petstore/perl/docs/EnumTest.md b/samples/client/petstore/perl/docs/EnumTest.md index 3c233a59dec..aa889b2be86 100644 --- a/samples/client/petstore/perl/docs/EnumTest.md +++ b/samples/client/petstore/perl/docs/EnumTest.md @@ -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 diff --git a/samples/client/petstore/perl/docs/FakeApi.md b/samples/client/petstore/perl/docs/FakeApi.md index d5f1f6d96e3..68c23a1f80b 100644 --- a/samples/client/petstore/perl/docs/FakeApi.md +++ b/samples/client/petstore/perl/docs/FakeApi.md @@ -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 \"client\" 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 diff --git a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md index c4eea8c0459..67c2122cb6f 100644 --- a/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md +++ b/samples/client/petstore/perl/docs/FakeClassnameTags123Api.md @@ -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); diff --git a/samples/client/petstore/perl/docs/FormatTest.md b/samples/client/petstore/perl/docs/FormatTest.md index 7681f396b38..3a1bf2c21f3 100644 --- a/samples/client/petstore/perl/docs/FormatTest.md +++ b/samples/client/petstore/perl/docs/FormatTest.md @@ -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 diff --git a/samples/client/petstore/perl/docs/HasOnlyReadOnly.md b/samples/client/petstore/perl/docs/HasOnlyReadOnly.md index 04b609cb12b..80f32953448 100644 --- a/samples/client/petstore/perl/docs/HasOnlyReadOnly.md +++ b/samples/client/petstore/perl/docs/HasOnlyReadOnly.md @@ -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 diff --git a/samples/client/petstore/perl/docs/InlineResponse200.md b/samples/client/petstore/perl/docs/InlineResponse200.md index 96d4ec3ff79..bff419cf173 100644 --- a/samples/client/petstore/perl/docs/InlineResponse200.md +++ b/samples/client/petstore/perl/docs/InlineResponse200.md @@ -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 diff --git a/samples/client/petstore/perl/docs/List.md b/samples/client/petstore/perl/docs/List.md index ea7bbed15a2..599bbd72501 100644 --- a/samples/client/petstore/perl/docs/List.md +++ b/samples/client/petstore/perl/docs/List.md @@ -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 diff --git a/samples/client/petstore/perl/docs/MapTest.md b/samples/client/petstore/perl/docs/MapTest.md index 8105d4d8756..88df848ff99 100644 --- a/samples/client/petstore/perl/docs/MapTest.md +++ b/samples/client/petstore/perl/docs/MapTest.md @@ -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 diff --git a/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md index 1238185589b..f2720cf57b5 100644 --- a/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ b/samples/client/petstore/perl/docs/MixedPropertiesAndAdditionalPropertiesClass.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Model200Response.md b/samples/client/petstore/perl/docs/Model200Response.md index 11aeb684251..54a2adc4788 100644 --- a/samples/client/petstore/perl/docs/Model200Response.md +++ b/samples/client/petstore/perl/docs/Model200Response.md @@ -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 diff --git a/samples/client/petstore/perl/docs/ModelReturn.md b/samples/client/petstore/perl/docs/ModelReturn.md index 57afb49ae53..e0bffc6eb19 100644 --- a/samples/client/petstore/perl/docs/ModelReturn.md +++ b/samples/client/petstore/perl/docs/ModelReturn.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Name.md b/samples/client/petstore/perl/docs/Name.md index 1407fb99bcb..ed4f1aa569b 100644 --- a/samples/client/petstore/perl/docs/Name.md +++ b/samples/client/petstore/perl/docs/Name.md @@ -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 diff --git a/samples/client/petstore/perl/docs/NumberOnly.md b/samples/client/petstore/perl/docs/NumberOnly.md index 5c53f67b1ef..62a325846eb 100644 --- a/samples/client/petstore/perl/docs/NumberOnly.md +++ b/samples/client/petstore/perl/docs/NumberOnly.md @@ -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 diff --git a/samples/client/petstore/perl/docs/ObjectReturn.md b/samples/client/petstore/perl/docs/ObjectReturn.md index 2bd4ff37640..a9eced23a02 100644 --- a/samples/client/petstore/perl/docs/ObjectReturn.md +++ b/samples/client/petstore/perl/docs/ObjectReturn.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Order.md b/samples/client/petstore/perl/docs/Order.md index cffb6a6af23..356ad67f45d 100644 --- a/samples/client/petstore/perl/docs/Order.md +++ b/samples/client/petstore/perl/docs/Order.md @@ -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 diff --git a/samples/client/petstore/perl/docs/OuterBoolean.md b/samples/client/petstore/perl/docs/OuterBoolean.md index 083d258299d..6d3e7c0ea0e 100644 --- a/samples/client/petstore/perl/docs/OuterBoolean.md +++ b/samples/client/petstore/perl/docs/OuterBoolean.md @@ -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 diff --git a/samples/client/petstore/perl/docs/OuterComposite.md b/samples/client/petstore/perl/docs/OuterComposite.md index 091bc68411b..be87ba10f85 100644 --- a/samples/client/petstore/perl/docs/OuterComposite.md +++ b/samples/client/petstore/perl/docs/OuterComposite.md @@ -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) diff --git a/samples/client/petstore/perl/docs/OuterEnum.md b/samples/client/petstore/perl/docs/OuterEnum.md index 7d0056d6522..92a5db8217e 100644 --- a/samples/client/petstore/perl/docs/OuterEnum.md +++ b/samples/client/petstore/perl/docs/OuterEnum.md @@ -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 diff --git a/samples/client/petstore/perl/docs/OuterNumber.md b/samples/client/petstore/perl/docs/OuterNumber.md index fc755cc362c..47ba82fbde8 100644 --- a/samples/client/petstore/perl/docs/OuterNumber.md +++ b/samples/client/petstore/perl/docs/OuterNumber.md @@ -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 diff --git a/samples/client/petstore/perl/docs/OuterString.md b/samples/client/petstore/perl/docs/OuterString.md index 2eeee7f43f1..1eef00c33bf 100644 --- a/samples/client/petstore/perl/docs/OuterString.md +++ b/samples/client/petstore/perl/docs/OuterString.md @@ -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 diff --git a/samples/client/petstore/perl/docs/Pet.md b/samples/client/petstore/perl/docs/Pet.md index 5931f6bd5f3..4b47c66b2dc 100644 --- a/samples/client/petstore/perl/docs/Pet.md +++ b/samples/client/petstore/perl/docs/Pet.md @@ -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 diff --git a/samples/client/petstore/perl/docs/PetApi.md b/samples/client/petstore/perl/docs/PetApi.md index 8ce16f10169..5ad3f6f41fa 100644 --- a/samples/client/petstore/perl/docs/PetApi.md +++ b/samples/client/petstore/perl/docs/PetApi.md @@ -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', diff --git a/samples/client/petstore/perl/docs/ReadOnlyFirst.md b/samples/client/petstore/perl/docs/ReadOnlyFirst.md index 51f643016bc..74a61f48787 100644 --- a/samples/client/petstore/perl/docs/ReadOnlyFirst.md +++ b/samples/client/petstore/perl/docs/ReadOnlyFirst.md @@ -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 diff --git a/samples/client/petstore/perl/docs/SpecialModelName.md b/samples/client/petstore/perl/docs/SpecialModelName.md index cab9c8ccef6..1b261c2d545 100644 --- a/samples/client/petstore/perl/docs/SpecialModelName.md +++ b/samples/client/petstore/perl/docs/SpecialModelName.md @@ -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 diff --git a/samples/client/petstore/perl/docs/SpecialModelName_.md b/samples/client/petstore/perl/docs/SpecialModelName_.md index 6d66785a403..ad9deccd8e9 100644 --- a/samples/client/petstore/perl/docs/SpecialModelName_.md +++ b/samples/client/petstore/perl/docs/SpecialModelName_.md @@ -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 diff --git a/samples/client/petstore/perl/docs/StoreApi.md b/samples/client/petstore/perl/docs/StoreApi.md index 32d4c7a9de8..53116f29fc4 100644 --- a/samples/client/petstore/perl/docs/StoreApi.md +++ b/samples/client/petstore/perl/docs/StoreApi.md @@ -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) diff --git a/samples/client/petstore/perl/docs/Tag.md b/samples/client/petstore/perl/docs/Tag.md index 961035e41a4..446c81e5240 100644 --- a/samples/client/petstore/perl/docs/Tag.md +++ b/samples/client/petstore/perl/docs/Tag.md @@ -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 diff --git a/samples/client/petstore/perl/docs/User.md b/samples/client/petstore/perl/docs/User.md index b0335312e6a..a33c09e22f2 100644 --- a/samples/client/petstore/perl/docs/User.md +++ b/samples/client/petstore/perl/docs/User.md @@ -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 diff --git a/samples/client/petstore/perl/docs/UserApi.md b/samples/client/petstore/perl/docs/UserApi.md index 19a60965d57..09be8a5880a 100644 --- a/samples/client/petstore/perl/docs/UserApi.md +++ b/samples/client/petstore/perl/docs/UserApi.md @@ -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) diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/AnotherfakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm similarity index 92% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/AnotherfakeApi.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm index 0b434f7323f..73c0ee93c62 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/AnotherfakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/AnotherFakeApi.pm @@ -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; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm index 40a1d3d6193..51f45a2aa19 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiClient.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiClient.pm @@ -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 diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiFactory.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm similarity index 74% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiFactory.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm index 9ce1b6af3f5..6f8d17c0a18 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/ApiFactory.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/ApiFactory.pm @@ -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 and L for valid parameters + See L and L 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; } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Configuration.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Configuration.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm index 60889be929c..e0f16b9417e 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Configuration.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Configuration.pm @@ -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) diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm similarity index 88% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm index 8a22598933a..4f7e71d8a69 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeApi.pm @@ -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 diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeClassnameTags123Api.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm similarity index 92% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeClassnameTags123Api.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm index 550387972db..9828236cb3e 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/FakeClassnameTags123Api.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/FakeClassnameTags123Api.pm @@ -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; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/AdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/AdditionalPropertiesClass.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm index 36ef2b20a78..8d6c8c9001a 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/AdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AdditionalPropertiesClass.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Animal.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Animal.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm index 22739cd6bc2..5b200c534f9 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Animal.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Animal.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/AnimalFarm.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AnimalFarm.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/AnimalFarm.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AnimalFarm.pm index 8b967bc0b57..6f553bf4035 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/AnimalFarm.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/AnimalFarm.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ApiResponse.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ApiResponse.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm index f751367d9ec..105b4bc54fa 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ApiResponse.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ApiResponse.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayOfArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayOfArrayOfNumberOnly.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm index d8493982659..a724988a91d 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayOfArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfArrayOfNumberOnly.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayOfNumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayOfNumberOnly.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm index 3dccf6fc5f5..52585373cb0 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayOfNumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayOfNumberOnly.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayTest.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm index efafb64be74..6ca1a6c5cbb 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ArrayTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ArrayTest.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Capitalization.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Capitalization.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm index e6308e686aa..011b9a3d223 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Capitalization.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Capitalization.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Cat.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Cat.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm index 382789fe043..42cc32d8ec1 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Cat.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Cat.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Category.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Category.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm index 21d978183f6..f5de6a701f2 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Category.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Category.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ClassModel.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ClassModel.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm index 9be89999e73..9bb5027ab17 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ClassModel.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ClassModel.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Client.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Client.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm index 4a0a668805b..4bdd238ba98 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Client.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Client.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Dog.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Dog.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm index 259eaa27c4f..f710eb4a883 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Dog.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Dog.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumArrays.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumArrays.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm index a4c44c93d43..6dd078c6b82 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumArrays.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumArrays.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumClass.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm index 981873845ae..57439c8a443 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumClass.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumTest.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm index 5a8e6646775..8fa09c04b0f 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/EnumTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/EnumTest.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/FormatTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm similarity index 98% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/FormatTest.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm index 5134156ad1c..a0f9ee2cedc 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/FormatTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/FormatTest.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/HasOnlyReadOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/HasOnlyReadOnly.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm index 26a049924ac..754b07ea35d 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/HasOnlyReadOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/HasOnlyReadOnly.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/List.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/List.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm index 3651bdc0d47..0cb38ad9205 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/List.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/List.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/MapTest.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/MapTest.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm index 85b3fb9f3f0..8c6d6cfd6a8 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/MapTest.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MapTest.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm index 3e26b66cc6f..fe81f7f98b1 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/MixedPropertiesAndAdditionalPropertiesClass.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Model200Response.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Model200Response.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm index 93d1debca41..de1da41a7dd 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Model200Response.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Model200Response.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ModelReturn.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ModelReturn.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm index e395f7a17e2..b844ba4b18a 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ModelReturn.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ModelReturn.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Name.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Name.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm index 7462ff05bc3..6e5eafa96b7 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Name.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Name.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/NumberOnly.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/NumberOnly.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm index 9421e5a8f88..d8b2325e379 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/NumberOnly.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/NumberOnly.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Order.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Order.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm index de5a0ca92dc..1fed2c0552b 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Order.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Order.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterComposite.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm similarity index 90% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterComposite.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm index 705ca951da9..c0545a90974 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterComposite.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterComposite.pm @@ -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( { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterEnum.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterEnum.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm index 1b078e01ac5..0a3c286ed23 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterEnum.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/OuterEnum.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Pet.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Pet.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm index 817b627b549..4b3b46e28fd 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Pet.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Pet.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ReadOnlyFirst.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ReadOnlyFirst.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm index f506c1416dc..d86a202e610 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ReadOnlyFirst.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/ReadOnlyFirst.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm index 7f73a6d0314..3510aba6fc4 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/SpecialModelName.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Tag.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Tag.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm index c3da4f655f8..9760423091e 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Tag.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/Tag.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/User.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm similarity index 98% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/User.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm index 8c02b6df99a..af592d6f0e3 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/User.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Object/User.pm @@ -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); } } diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm similarity index 98% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm index 1ed6f366ea7..723753c0a56 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/PetApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/PetApi.pm @@ -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; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm similarity index 94% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm index f23f6f2a270..3896a69227a 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role.pm @@ -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 and C will be determined by the code ge the spec and you will not need to set them at run time. If not, C will default to 'head' and C to the empty string. -The tokens will be placed in a L instance +The tokens will be placed in a L instance as follows, but you don't need to know about this. =over 4 @@ -250,7 +250,7 @@ returns the current value of C. Returns an API factory object. You probably won't need to call this directly. - $self->api_factory('Pet'); # returns a WWW::SwaggerClient::PetApi instance + $self->api_factory('Pet'); # returns a WWW::OpenAPIClient::PetApi instance $self->pet_api; # the same diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role/AutoDoc.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm similarity index 98% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/Role/AutoDoc.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm index 740cbb7773c..5eed72e557d 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Role/AutoDoc.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/Role/AutoDoc.pm @@ -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'; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm similarity index 96% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm index 49234618466..18cfc0fb328 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/StoreApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/StoreApi.pm @@ -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 diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm similarity index 97% rename from samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm rename to samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm index 71ae9cfce32..81001868e38 100644 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/UserApi.pm +++ b/samples/client/petstore/perl/lib/WWW/OpenAPIClient/UserApi.pm @@ -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::UserApi; +package WWW::OpenAPIClient::UserApi; 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; @@ -91,7 +91,7 @@ sub create_user { 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 @@ -152,7 +152,7 @@ sub create_users_with_array_input { 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 @@ -213,7 +213,7 @@ sub create_users_with_list_input { 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 @@ -541,7 +541,7 @@ sub update_user { 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(); # path params if ( exists $args{'username'}) { diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/BaseObject.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/BaseObject.pm deleted file mode 100644 index f99b7715ae8..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/BaseObject.pm +++ /dev/null @@ -1,98 +0,0 @@ -package WWW::SwaggerClient::Object::BaseObject; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# - -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - -1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Body4.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Body4.pm deleted file mode 100644 index 9b4e00c3a18..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/Body4.pm +++ /dev/null @@ -1,175 +0,0 @@ -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -package WWW::SwaggerClient::Object::Body4; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# REF: https://github.com/swagger-api/swagger-codegen -# - -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'Body4', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'param' => { - datatype => 'string', - base_name => 'param', - description => 'field1', - format => '', - read_only => '', - }, - 'param2' => { - datatype => 'string', - base_name => 'param2', - description => 'field2', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->swagger_types( { - 'param' => 'string', - 'param2' => 'string' -} ); - -__PACKAGE__->attribute_map( { - 'param' => 'param', - 'param2' => 'param2' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm deleted file mode 100644 index 2f8c7f1dacd..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/InlineResponse200.pm +++ /dev/null @@ -1,171 +0,0 @@ -package WWW::SwaggerClient::Object::InlineResponse200; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# - -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'InlineResponse200', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'tags' => { - datatype => 'ARRAY[Tag]', - base_name => 'tags', - description => '', - format => '', - read_only => '', - }, - 'id' => { - datatype => 'int', - base_name => 'id', - description => '', - format => '', - read_only => '', - }, - 'category' => { - datatype => 'object', - base_name => 'category', - description => '', - format => '', - read_only => '', - }, - 'status' => { - datatype => 'string', - base_name => 'status', - description => 'pet status in the store', - format => '', - read_only => '', - }, - 'name' => { - datatype => 'string', - base_name => 'name', - description => '', - format => '', - read_only => '', - }, - 'photo_urls' => { - datatype => 'ARRAY[string]', - base_name => 'photoUrls', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->swagger_types( { - 'tags' => 'ARRAY[Tag]', - 'id' => 'int', - 'category' => 'object', - 'status' => 'string', - 'name' => 'string', - 'photo_urls' => 'ARRAY[string]' -} ); - -__PACKAGE__->attribute_map( { - 'tags' => 'tags', - 'id' => 'id', - 'category' => 'category', - 'status' => 'status', - 'name' => 'name', - 'photo_urls' => 'photoUrls' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ObjectReturn.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ObjectReturn.pm deleted file mode 100644 index 6dec8a34c54..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/ObjectReturn.pm +++ /dev/null @@ -1,127 +0,0 @@ -package WWW::SwaggerClient::Object::ObjectReturn; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# - -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'ObjectReturn', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - 'return' => { - datatype => 'int', - base_name => 'return', - description => '', - format => '', - read_only => '', - }, - -}); - -__PACKAGE__->swagger_types( { - 'return' => 'int' -} ); - -__PACKAGE__->attribute_map( { - 'return' => 'return' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterBoolean.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterBoolean.pm deleted file mode 100644 index c7bbc5700ae..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterBoolean.pm +++ /dev/null @@ -1,159 +0,0 @@ -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -package WWW::SwaggerClient::Object::OuterBoolean; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# REF: https://github.com/swagger-api/swagger-codegen -# - -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'OuterBoolean', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ -}); - -__PACKAGE__->swagger_types( { - -} ); - -__PACKAGE__->attribute_map( { - -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterNumber.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterNumber.pm deleted file mode 100644 index 799fb19c80f..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterNumber.pm +++ /dev/null @@ -1,159 +0,0 @@ -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -package WWW::SwaggerClient::Object::OuterNumber; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# REF: https://github.com/swagger-api/swagger-codegen -# - -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'OuterNumber', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ -}); - -__PACKAGE__->swagger_types( { - -} ); - -__PACKAGE__->attribute_map( { - -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterString.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterString.pm deleted file mode 100644 index 0c02799a35f..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/OuterString.pm +++ /dev/null @@ -1,159 +0,0 @@ -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -package WWW::SwaggerClient::Object::OuterString; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# REF: https://github.com/swagger-api/swagger-codegen -# - -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'OuterString', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ -}); - -__PACKAGE__->swagger_types( { - -} ); - -__PACKAGE__->attribute_map( { - -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName_.pm b/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName_.pm deleted file mode 100644 index 9c47fb1011d..00000000000 --- a/samples/client/petstore/perl/lib/WWW/SwaggerClient/Object/SpecialModelName_.pm +++ /dev/null @@ -1,166 +0,0 @@ -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -package WWW::SwaggerClient::Object::SpecialModelName_; - -require 5.6.0; -use strict; -use warnings; -use utf8; -use JSON qw(decode_json); -use Data::Dumper; -use Module::Runtime qw(use_module); -use Log::Any qw($log); -use Date::Parse; -use DateTime; - - -use base ("Class::Accessor", "Class::Data::Inheritable"); - - -# -# -# -# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. -# REF: https://github.com/swagger-api/swagger-codegen -# - -=begin comment - -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: \" \\ - -OpenAPI spec version: 1.0.0 -Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git - -=end comment - -=cut - -# -# NOTE: This class is auto generated by the swagger code generator program. -# Do not edit the class manually. -# Ref: https://github.com/swagger-api/swagger-codegen -# -__PACKAGE__->mk_classdata('attribute_map' => {}); -__PACKAGE__->mk_classdata('swagger_types' => {}); -__PACKAGE__->mk_classdata('method_documentation' => {}); -__PACKAGE__->mk_classdata('class_documentation' => {}); - -# new object -sub new { - my ($class, %args) = @_; - - my $self = bless {}, $class; - - foreach my $attribute (keys %{$class->attribute_map}) { - my $args_key = $class->attribute_map->{$attribute}; - $self->$attribute( $args{ $args_key } ); - } - - return $self; -} - -# return perl hash -sub to_hash { - return decode_json(JSON->new->convert_blessed->encode( shift )); -} - -# used by JSON for serialization -sub TO_JSON { - my $self = shift; - my $_data = {}; - foreach my $_key (keys %{$self->attribute_map}) { - if (defined $self->{$_key}) { - $_data->{$self->attribute_map->{$_key}} = $self->{$_key}; - } - } - return $_data; -} - -# from Perl hashref -sub from_hash { - my ($self, $hash) = @_; - - # loop through attributes and use swagger_types to deserialize the data - while ( my ($_key, $_type) = each %{$self->swagger_types} ) { - my $_json_attribute = $self->attribute_map->{$_key}; - if ($_type =~ /^array\[/i) { # array - my $_subclass = substr($_type, 6, -1); - my @_array = (); - foreach my $_element (@{$hash->{$_json_attribute}}) { - push @_array, $self->_deserialize($_subclass, $_element); - } - $self->{$_key} = \@_array; - } elsif (exists $hash->{$_json_attribute}) { #hash(model), primitive, datetime - $self->{$_key} = $self->_deserialize($_type, $hash->{$_json_attribute}); - } else { - $log->debugf("Warning: %s (%s) does not exist in input hash\n", $_key, $_json_attribute); - } - } - - return $self; -} - -# deserialize non-array data -sub _deserialize { - my ($self, $type, $data) = @_; - $log->debugf("deserializing %s with %s",Dumper($data), $type); - - if ($type eq 'DateTime') { - return DateTime->from_epoch(epoch => str2time($data)); - } elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) { - return $data; - } else { # hash(model) - my $_instance = eval "WWW::SwaggerClient::Object::$type->new()"; - return $_instance->from_hash($data); - } -} - - - -__PACKAGE__->class_documentation({description => '', - class => 'SpecialModelName_', - required => [], # TODO -} ); - -__PACKAGE__->method_documentation({ - '__special[property/name]' => { - datatype => 'int', - base_name => '$special[property.name]', - description => '', - format => '', - read_only => '', - }, -}); - -__PACKAGE__->swagger_types( { - '__special[property/name]' => 'int' -} ); - -__PACKAGE__->attribute_map( { - '__special[property/name]' => '$special[property.name]' -} ); - -__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map}); - - -1; diff --git a/samples/client/petstore/perl/t/AdditionalPropertiesClassTest.t b/samples/client/petstore/perl/t/AdditionalPropertiesClassTest.t index 03aa037413f..d3ff9c4607e 100644 --- a/samples/client/petstore/perl/t/AdditionalPropertiesClassTest.t +++ b/samples/client/petstore/perl/t/AdditionalPropertiesClassTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::AdditionalPropertiesClass'); +use_ok('WWW::OpenAPIClient::Object::AdditionalPropertiesClass'); -my $instance = WWW::SwaggerClient::Object::AdditionalPropertiesClass->new(); +my $instance = WWW::OpenAPIClient::Object::AdditionalPropertiesClass->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::AdditionalPropertiesClass'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::AdditionalPropertiesClass'); diff --git a/samples/client/petstore/perl/t/AnimalFarmTest.t b/samples/client/petstore/perl/t/AnimalFarmTest.t index 4c795259eec..f346d5d556c 100644 --- a/samples/client/petstore/perl/t/AnimalFarmTest.t +++ b/samples/client/petstore/perl/t/AnimalFarmTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::AnimalFarm'); +use_ok('WWW::OpenAPIClient::Object::AnimalFarm'); -my $instance = WWW::SwaggerClient::Object::AnimalFarm->new(); +my $instance = WWW::OpenAPIClient::Object::AnimalFarm->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::AnimalFarm'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::AnimalFarm'); diff --git a/samples/client/petstore/perl/t/AnimalTest.t b/samples/client/petstore/perl/t/AnimalTest.t index 7d608e30803..740689efce2 100644 --- a/samples/client/petstore/perl/t/AnimalTest.t +++ b/samples/client/petstore/perl/t/AnimalTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Animal'); +use_ok('WWW::OpenAPIClient::Object::Animal'); -my $instance = WWW::SwaggerClient::Object::Animal->new(); +my $instance = WWW::OpenAPIClient::Object::Animal->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Animal'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Animal'); diff --git a/samples/client/petstore/perl/t/AnotherfakeApiTest.t b/samples/client/petstore/perl/t/AnotherfakeApiTest.t index 35cd58c510e..e07b4905e12 100644 --- a/samples/client/petstore/perl/t/AnotherfakeApiTest.t +++ b/samples/client/petstore/perl/t/AnotherfakeApiTest.t @@ -24,10 +24,10 @@ use lib 'lib'; use strict; use warnings; -use_ok('WWW::SwaggerClient::AnotherfakeApi'); +use_ok('WWW::OpenAPIClient::AnotherfakeApi'); -my $api = WWW::SwaggerClient::AnotherfakeApi->new(); -isa_ok($api, 'WWW::SwaggerClient::AnotherfakeApi'); +my $api = WWW::OpenAPIClient::AnotherfakeApi->new(); +isa_ok($api, 'WWW::OpenAPIClient::AnotherfakeApi'); # # test_special_tags test diff --git a/samples/client/petstore/perl/t/ApiResponseTest.t b/samples/client/petstore/perl/t/ApiResponseTest.t index 24ac730ecb9..51ffc9c659d 100644 --- a/samples/client/petstore/perl/t/ApiResponseTest.t +++ b/samples/client/petstore/perl/t/ApiResponseTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ApiResponse'); +use_ok('WWW::OpenAPIClient::Object::ApiResponse'); -my $instance = WWW::SwaggerClient::Object::ApiResponse->new(); +my $instance = WWW::OpenAPIClient::Object::ApiResponse->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ApiResponse'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ApiResponse'); diff --git a/samples/client/petstore/perl/t/ArrayOfArrayOfNumberOnlyTest.t b/samples/client/petstore/perl/t/ArrayOfArrayOfNumberOnlyTest.t index 55f3388253b..81d8fc3ec01 100644 --- a/samples/client/petstore/perl/t/ArrayOfArrayOfNumberOnlyTest.t +++ b/samples/client/petstore/perl/t/ArrayOfArrayOfNumberOnlyTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly'); +use_ok('WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly'); -my $instance = WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly->new(); +my $instance = WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ArrayOfArrayOfNumberOnly'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfArrayOfNumberOnly'); diff --git a/samples/client/petstore/perl/t/ArrayOfNumberOnlyTest.t b/samples/client/petstore/perl/t/ArrayOfNumberOnlyTest.t index 278324d0124..8f4a241aee1 100644 --- a/samples/client/petstore/perl/t/ArrayOfNumberOnlyTest.t +++ b/samples/client/petstore/perl/t/ArrayOfNumberOnlyTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ArrayOfNumberOnly'); +use_ok('WWW::OpenAPIClient::Object::ArrayOfNumberOnly'); -my $instance = WWW::SwaggerClient::Object::ArrayOfNumberOnly->new(); +my $instance = WWW::OpenAPIClient::Object::ArrayOfNumberOnly->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ArrayOfNumberOnly'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayOfNumberOnly'); diff --git a/samples/client/petstore/perl/t/ArrayTestTest.t b/samples/client/petstore/perl/t/ArrayTestTest.t index 3873ad59787..d82ad1a0276 100644 --- a/samples/client/petstore/perl/t/ArrayTestTest.t +++ b/samples/client/petstore/perl/t/ArrayTestTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ArrayTest'); +use_ok('WWW::OpenAPIClient::Object::ArrayTest'); -my $instance = WWW::SwaggerClient::Object::ArrayTest->new(); +my $instance = WWW::OpenAPIClient::Object::ArrayTest->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ArrayTest'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ArrayTest'); diff --git a/samples/client/petstore/perl/t/Body4Test.t b/samples/client/petstore/perl/t/Body4Test.t index f00adf8ce34..1d254ba9178 100644 --- a/samples/client/petstore/perl/t/Body4Test.t +++ b/samples/client/petstore/perl/t/Body4Test.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Body4'); +use_ok('WWW::OpenAPIClient::Object::Body4'); -my $instance = WWW::SwaggerClient::Object::Body4->new(); +my $instance = WWW::OpenAPIClient::Object::Body4->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Body4'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Body4'); diff --git a/samples/client/petstore/perl/t/CapitalizationTest.t b/samples/client/petstore/perl/t/CapitalizationTest.t index f55d16c468c..127f2c460ea 100644 --- a/samples/client/petstore/perl/t/CapitalizationTest.t +++ b/samples/client/petstore/perl/t/CapitalizationTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Capitalization'); +use_ok('WWW::OpenAPIClient::Object::Capitalization'); -my $instance = WWW::SwaggerClient::Object::Capitalization->new(); +my $instance = WWW::OpenAPIClient::Object::Capitalization->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Capitalization'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Capitalization'); diff --git a/samples/client/petstore/perl/t/CatTest.t b/samples/client/petstore/perl/t/CatTest.t index cc1569cab40..0509cb34eec 100644 --- a/samples/client/petstore/perl/t/CatTest.t +++ b/samples/client/petstore/perl/t/CatTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Cat'); +use_ok('WWW::OpenAPIClient::Object::Cat'); -my $instance = WWW::SwaggerClient::Object::Cat->new(); +my $instance = WWW::OpenAPIClient::Object::Cat->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Cat'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Cat'); diff --git a/samples/client/petstore/perl/t/CategoryTest.t b/samples/client/petstore/perl/t/CategoryTest.t index 495d4202ec5..b13a5021bd8 100644 --- a/samples/client/petstore/perl/t/CategoryTest.t +++ b/samples/client/petstore/perl/t/CategoryTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Category'); +use_ok('WWW::OpenAPIClient::Object::Category'); -my $instance = WWW::SwaggerClient::Object::Category->new(); +my $instance = WWW::OpenAPIClient::Object::Category->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Category'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Category'); diff --git a/samples/client/petstore/perl/t/ClassModelTest.t b/samples/client/petstore/perl/t/ClassModelTest.t index b0175148496..4711857a7f7 100644 --- a/samples/client/petstore/perl/t/ClassModelTest.t +++ b/samples/client/petstore/perl/t/ClassModelTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ClassModel'); +use_ok('WWW::OpenAPIClient::Object::ClassModel'); -my $instance = WWW::SwaggerClient::Object::ClassModel->new(); +my $instance = WWW::OpenAPIClient::Object::ClassModel->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ClassModel'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ClassModel'); diff --git a/samples/client/petstore/perl/t/ClientTest.t b/samples/client/petstore/perl/t/ClientTest.t index e5763def392..f217879ed9f 100644 --- a/samples/client/petstore/perl/t/ClientTest.t +++ b/samples/client/petstore/perl/t/ClientTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Client'); +use_ok('WWW::OpenAPIClient::Object::Client'); -my $instance = WWW::SwaggerClient::Object::Client->new(); +my $instance = WWW::OpenAPIClient::Object::Client->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Client'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Client'); diff --git a/samples/client/petstore/perl/t/DogTest.t b/samples/client/petstore/perl/t/DogTest.t index d99225a0592..8ad771656cd 100644 --- a/samples/client/petstore/perl/t/DogTest.t +++ b/samples/client/petstore/perl/t/DogTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Dog'); +use_ok('WWW::OpenAPIClient::Object::Dog'); -my $instance = WWW::SwaggerClient::Object::Dog->new(); +my $instance = WWW::OpenAPIClient::Object::Dog->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Dog'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Dog'); diff --git a/samples/client/petstore/perl/t/EnumArraysTest.t b/samples/client/petstore/perl/t/EnumArraysTest.t index 2a8edae5870..edf1c8dce4c 100644 --- a/samples/client/petstore/perl/t/EnumArraysTest.t +++ b/samples/client/petstore/perl/t/EnumArraysTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::EnumArrays'); +use_ok('WWW::OpenAPIClient::Object::EnumArrays'); -my $instance = WWW::SwaggerClient::Object::EnumArrays->new(); +my $instance = WWW::OpenAPIClient::Object::EnumArrays->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::EnumArrays'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumArrays'); diff --git a/samples/client/petstore/perl/t/EnumClassTest.t b/samples/client/petstore/perl/t/EnumClassTest.t index c1843e3bab4..fb26d776516 100644 --- a/samples/client/petstore/perl/t/EnumClassTest.t +++ b/samples/client/petstore/perl/t/EnumClassTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::EnumClass'); +use_ok('WWW::OpenAPIClient::Object::EnumClass'); -my $instance = WWW::SwaggerClient::Object::EnumClass->new(); +my $instance = WWW::OpenAPIClient::Object::EnumClass->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::EnumClass'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumClass'); diff --git a/samples/client/petstore/perl/t/EnumTestTest.t b/samples/client/petstore/perl/t/EnumTestTest.t index 6a72a3da4f7..e86171bab3d 100644 --- a/samples/client/petstore/perl/t/EnumTestTest.t +++ b/samples/client/petstore/perl/t/EnumTestTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::EnumTest'); +use_ok('WWW::OpenAPIClient::Object::EnumTest'); -my $instance = WWW::SwaggerClient::Object::EnumTest->new(); +my $instance = WWW::OpenAPIClient::Object::EnumTest->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::EnumTest'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::EnumTest'); diff --git a/samples/client/petstore/perl/t/FakeApiTest.t b/samples/client/petstore/perl/t/FakeApiTest.t index 4855c9f7057..afba6f55314 100644 --- a/samples/client/petstore/perl/t/FakeApiTest.t +++ b/samples/client/petstore/perl/t/FakeApiTest.t @@ -24,10 +24,10 @@ use lib 'lib'; use strict; use warnings; -use_ok('WWW::SwaggerClient::FakeApi'); +use_ok('WWW::OpenAPIClient::FakeApi'); -my $api = WWW::SwaggerClient::FakeApi->new(); -isa_ok($api, 'WWW::SwaggerClient::FakeApi'); +my $api = WWW::OpenAPIClient::FakeApi->new(); +isa_ok($api, 'WWW::OpenAPIClient::FakeApi'); # # test_client_model test diff --git a/samples/client/petstore/perl/t/FakeClassnameTags123ApiTest.t b/samples/client/petstore/perl/t/FakeClassnameTags123ApiTest.t index d76f7a38ed7..34c097af610 100644 --- a/samples/client/petstore/perl/t/FakeClassnameTags123ApiTest.t +++ b/samples/client/petstore/perl/t/FakeClassnameTags123ApiTest.t @@ -24,10 +24,10 @@ use lib 'lib'; use strict; use warnings; -use_ok('WWW::SwaggerClient::FakeClassnameTags123Api'); +use_ok('WWW::OpenAPIClient::FakeClassnameTags123Api'); -my $api = WWW::SwaggerClient::FakeClassnameTags123Api->new(); -isa_ok($api, 'WWW::SwaggerClient::FakeClassnameTags123Api'); +my $api = WWW::OpenAPIClient::FakeClassnameTags123Api->new(); +isa_ok($api, 'WWW::OpenAPIClient::FakeClassnameTags123Api'); # # test_classname test diff --git a/samples/client/petstore/perl/t/FormatTestTest.t b/samples/client/petstore/perl/t/FormatTestTest.t index 4d1521f906c..c3d157d2883 100644 --- a/samples/client/petstore/perl/t/FormatTestTest.t +++ b/samples/client/petstore/perl/t/FormatTestTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::FormatTest'); +use_ok('WWW::OpenAPIClient::Object::FormatTest'); -my $instance = WWW::SwaggerClient::Object::FormatTest->new(); +my $instance = WWW::OpenAPIClient::Object::FormatTest->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::FormatTest'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::FormatTest'); diff --git a/samples/client/petstore/perl/t/HasOnlyReadOnlyTest.t b/samples/client/petstore/perl/t/HasOnlyReadOnlyTest.t index ba598e0f2c4..71c2a0f877c 100644 --- a/samples/client/petstore/perl/t/HasOnlyReadOnlyTest.t +++ b/samples/client/petstore/perl/t/HasOnlyReadOnlyTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::HasOnlyReadOnly'); +use_ok('WWW::OpenAPIClient::Object::HasOnlyReadOnly'); -my $instance = WWW::SwaggerClient::Object::HasOnlyReadOnly->new(); +my $instance = WWW::OpenAPIClient::Object::HasOnlyReadOnly->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::HasOnlyReadOnly'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::HasOnlyReadOnly'); diff --git a/samples/client/petstore/perl/t/InlineResponse200Test.t b/samples/client/petstore/perl/t/InlineResponse200Test.t index 404dc64b7e3..db194960ea3 100644 --- a/samples/client/petstore/perl/t/InlineResponse200Test.t +++ b/samples/client/petstore/perl/t/InlineResponse200Test.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::InlineResponse200'); +use_ok('WWW::OpenAPIClient::Object::InlineResponse200'); -my $instance = WWW::SwaggerClient::Object::InlineResponse200->new(); +my $instance = WWW::OpenAPIClient::Object::InlineResponse200->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::InlineResponse200'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::InlineResponse200'); diff --git a/samples/client/petstore/perl/t/ListTest.t b/samples/client/petstore/perl/t/ListTest.t index 9cf167906a9..7b1d7b0b0cc 100644 --- a/samples/client/petstore/perl/t/ListTest.t +++ b/samples/client/petstore/perl/t/ListTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::List'); +use_ok('WWW::OpenAPIClient::Object::List'); -my $instance = WWW::SwaggerClient::Object::List->new(); +my $instance = WWW::OpenAPIClient::Object::List->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::List'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::List'); diff --git a/samples/client/petstore/perl/t/MapTestTest.t b/samples/client/petstore/perl/t/MapTestTest.t index acb1be0ccbd..8551d42c62b 100644 --- a/samples/client/petstore/perl/t/MapTestTest.t +++ b/samples/client/petstore/perl/t/MapTestTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::MapTest'); +use_ok('WWW::OpenAPIClient::Object::MapTest'); -my $instance = WWW::SwaggerClient::Object::MapTest->new(); +my $instance = WWW::OpenAPIClient::Object::MapTest->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::MapTest'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::MapTest'); diff --git a/samples/client/petstore/perl/t/MixedPropertiesAndAdditionalPropertiesClassTest.t b/samples/client/petstore/perl/t/MixedPropertiesAndAdditionalPropertiesClassTest.t index b6f764e8210..6ca2ef027b3 100644 --- a/samples/client/petstore/perl/t/MixedPropertiesAndAdditionalPropertiesClassTest.t +++ b/samples/client/petstore/perl/t/MixedPropertiesAndAdditionalPropertiesClassTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass'); +use_ok('WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass'); -my $instance = WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass->new(); +my $instance = WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::MixedPropertiesAndAdditionalPropertiesClass'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::MixedPropertiesAndAdditionalPropertiesClass'); diff --git a/samples/client/petstore/perl/t/Model200ResponseTest.t b/samples/client/petstore/perl/t/Model200ResponseTest.t index d6c0785519e..86bb1e353cd 100644 --- a/samples/client/petstore/perl/t/Model200ResponseTest.t +++ b/samples/client/petstore/perl/t/Model200ResponseTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Model200Response'); +use_ok('WWW::OpenAPIClient::Object::Model200Response'); -my $instance = WWW::SwaggerClient::Object::Model200Response->new(); +my $instance = WWW::OpenAPIClient::Object::Model200Response->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Model200Response'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Model200Response'); diff --git a/samples/client/petstore/perl/t/ModelReturnTest.t b/samples/client/petstore/perl/t/ModelReturnTest.t index 29753c78e5b..b56a0463856 100644 --- a/samples/client/petstore/perl/t/ModelReturnTest.t +++ b/samples/client/petstore/perl/t/ModelReturnTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ModelReturn'); +use_ok('WWW::OpenAPIClient::Object::ModelReturn'); -my $instance = WWW::SwaggerClient::Object::ModelReturn->new(); +my $instance = WWW::OpenAPIClient::Object::ModelReturn->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ModelReturn'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ModelReturn'); diff --git a/samples/client/petstore/perl/t/NameTest.t b/samples/client/petstore/perl/t/NameTest.t index 3714cb140e6..da1807978fc 100644 --- a/samples/client/petstore/perl/t/NameTest.t +++ b/samples/client/petstore/perl/t/NameTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Name'); +use_ok('WWW::OpenAPIClient::Object::Name'); -my $instance = WWW::SwaggerClient::Object::Name->new(); +my $instance = WWW::OpenAPIClient::Object::Name->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Name'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Name'); diff --git a/samples/client/petstore/perl/t/NumberOnlyTest.t b/samples/client/petstore/perl/t/NumberOnlyTest.t index 4daf60b5dfb..8ae2f178c8d 100644 --- a/samples/client/petstore/perl/t/NumberOnlyTest.t +++ b/samples/client/petstore/perl/t/NumberOnlyTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::NumberOnly'); +use_ok('WWW::OpenAPIClient::Object::NumberOnly'); -my $instance = WWW::SwaggerClient::Object::NumberOnly->new(); +my $instance = WWW::OpenAPIClient::Object::NumberOnly->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::NumberOnly'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::NumberOnly'); diff --git a/samples/client/petstore/perl/t/ObjectReturnTest.t b/samples/client/petstore/perl/t/ObjectReturnTest.t index a703141bb4e..5f247c76906 100644 --- a/samples/client/petstore/perl/t/ObjectReturnTest.t +++ b/samples/client/petstore/perl/t/ObjectReturnTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ObjectReturn'); +use_ok('WWW::OpenAPIClient::Object::ObjectReturn'); -my $instance = WWW::SwaggerClient::Object::ObjectReturn->new(); +my $instance = WWW::OpenAPIClient::Object::ObjectReturn->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ObjectReturn'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ObjectReturn'); diff --git a/samples/client/petstore/perl/t/OrderTest.t b/samples/client/petstore/perl/t/OrderTest.t index 36871c896c6..f968e1f67d7 100644 --- a/samples/client/petstore/perl/t/OrderTest.t +++ b/samples/client/petstore/perl/t/OrderTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Order'); +use_ok('WWW::OpenAPIClient::Object::Order'); -my $instance = WWW::SwaggerClient::Object::Order->new(); +my $instance = WWW::OpenAPIClient::Object::Order->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Order'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Order'); diff --git a/samples/client/petstore/perl/t/OuterBooleanTest.t b/samples/client/petstore/perl/t/OuterBooleanTest.t index 906b2e4e915..b0d1318dd31 100644 --- a/samples/client/petstore/perl/t/OuterBooleanTest.t +++ b/samples/client/petstore/perl/t/OuterBooleanTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::OuterBoolean'); +use_ok('WWW::OpenAPIClient::Object::OuterBoolean'); -my $instance = WWW::SwaggerClient::Object::OuterBoolean->new(); +my $instance = WWW::OpenAPIClient::Object::OuterBoolean->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::OuterBoolean'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::OuterBoolean'); diff --git a/samples/client/petstore/perl/t/OuterCompositeTest.t b/samples/client/petstore/perl/t/OuterCompositeTest.t index d19b2a831e1..3c31a4d720e 100644 --- a/samples/client/petstore/perl/t/OuterCompositeTest.t +++ b/samples/client/petstore/perl/t/OuterCompositeTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::OuterComposite'); +use_ok('WWW::OpenAPIClient::Object::OuterComposite'); -my $instance = WWW::SwaggerClient::Object::OuterComposite->new(); +my $instance = WWW::OpenAPIClient::Object::OuterComposite->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::OuterComposite'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::OuterComposite'); diff --git a/samples/client/petstore/perl/t/OuterEnumTest.t b/samples/client/petstore/perl/t/OuterEnumTest.t index 77c1962bb3f..4183d1831b1 100644 --- a/samples/client/petstore/perl/t/OuterEnumTest.t +++ b/samples/client/petstore/perl/t/OuterEnumTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::OuterEnum'); +use_ok('WWW::OpenAPIClient::Object::OuterEnum'); -my $instance = WWW::SwaggerClient::Object::OuterEnum->new(); +my $instance = WWW::OpenAPIClient::Object::OuterEnum->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::OuterEnum'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::OuterEnum'); diff --git a/samples/client/petstore/perl/t/OuterNumberTest.t b/samples/client/petstore/perl/t/OuterNumberTest.t index eb4fbdf9a38..a0d28218020 100644 --- a/samples/client/petstore/perl/t/OuterNumberTest.t +++ b/samples/client/petstore/perl/t/OuterNumberTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::OuterNumber'); +use_ok('WWW::OpenAPIClient::Object::OuterNumber'); -my $instance = WWW::SwaggerClient::Object::OuterNumber->new(); +my $instance = WWW::OpenAPIClient::Object::OuterNumber->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::OuterNumber'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::OuterNumber'); diff --git a/samples/client/petstore/perl/t/OuterStringTest.t b/samples/client/petstore/perl/t/OuterStringTest.t index 6fb11050540..015ee95d778 100644 --- a/samples/client/petstore/perl/t/OuterStringTest.t +++ b/samples/client/petstore/perl/t/OuterStringTest.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::OuterString'); +use_ok('WWW::OpenAPIClient::Object::OuterString'); -my $instance = WWW::SwaggerClient::Object::OuterString->new(); +my $instance = WWW::OpenAPIClient::Object::OuterString->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::OuterString'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::OuterString'); diff --git a/samples/client/petstore/perl/t/PetApiTest.t b/samples/client/petstore/perl/t/PetApiTest.t index cf0041edd12..3ef25c8c686 100644 --- a/samples/client/petstore/perl/t/PetApiTest.t +++ b/samples/client/petstore/perl/t/PetApiTest.t @@ -24,10 +24,10 @@ use lib 'lib'; use strict; use warnings; -use_ok('WWW::SwaggerClient::PetApi'); +use_ok('WWW::OpenAPIClient::PetApi'); -my $api = WWW::SwaggerClient::PetApi->new(); -isa_ok($api, 'WWW::SwaggerClient::PetApi'); +my $api = WWW::OpenAPIClient::PetApi->new(); +isa_ok($api, 'WWW::OpenAPIClient::PetApi'); # # add_pet test diff --git a/samples/client/petstore/perl/t/PetTest.t b/samples/client/petstore/perl/t/PetTest.t index 54a2888dbe8..83d197eabda 100644 --- a/samples/client/petstore/perl/t/PetTest.t +++ b/samples/client/petstore/perl/t/PetTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Pet'); +use_ok('WWW::OpenAPIClient::Object::Pet'); -my $instance = WWW::SwaggerClient::Object::Pet->new(); +my $instance = WWW::OpenAPIClient::Object::Pet->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Pet'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Pet'); diff --git a/samples/client/petstore/perl/t/ReadOnlyFirstTest.t b/samples/client/petstore/perl/t/ReadOnlyFirstTest.t index 9c35358bee1..b61b111cf0c 100644 --- a/samples/client/petstore/perl/t/ReadOnlyFirstTest.t +++ b/samples/client/petstore/perl/t/ReadOnlyFirstTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::ReadOnlyFirst'); +use_ok('WWW::OpenAPIClient::Object::ReadOnlyFirst'); -my $instance = WWW::SwaggerClient::Object::ReadOnlyFirst->new(); +my $instance = WWW::OpenAPIClient::Object::ReadOnlyFirst->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::ReadOnlyFirst'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::ReadOnlyFirst'); diff --git a/samples/client/petstore/perl/t/SpecialModelNameTest.t b/samples/client/petstore/perl/t/SpecialModelNameTest.t index 230db33bab8..28f0ca7fe2a 100644 --- a/samples/client/petstore/perl/t/SpecialModelNameTest.t +++ b/samples/client/petstore/perl/t/SpecialModelNameTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::SpecialModelName'); +use_ok('WWW::OpenAPIClient::Object::SpecialModelName'); -my $instance = WWW::SwaggerClient::Object::SpecialModelName->new(); +my $instance = WWW::OpenAPIClient::Object::SpecialModelName->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::SpecialModelName'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::SpecialModelName'); diff --git a/samples/client/petstore/perl/t/SpecialModelName_Test.t b/samples/client/petstore/perl/t/SpecialModelName_Test.t index 69c9089538c..04319cd6ea9 100644 --- a/samples/client/petstore/perl/t/SpecialModelName_Test.t +++ b/samples/client/petstore/perl/t/SpecialModelName_Test.t @@ -25,9 +25,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::SpecialModelName_'); +use_ok('WWW::OpenAPIClient::Object::SpecialModelName_'); -my $instance = WWW::SwaggerClient::Object::SpecialModelName_->new(); +my $instance = WWW::OpenAPIClient::Object::SpecialModelName_->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::SpecialModelName_'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::SpecialModelName_'); diff --git a/samples/client/petstore/perl/t/StoreApiTest.t b/samples/client/petstore/perl/t/StoreApiTest.t index 98c11bb5839..3b10c2f84b9 100644 --- a/samples/client/petstore/perl/t/StoreApiTest.t +++ b/samples/client/petstore/perl/t/StoreApiTest.t @@ -24,10 +24,10 @@ use lib 'lib'; use strict; use warnings; -use_ok('WWW::SwaggerClient::StoreApi'); +use_ok('WWW::OpenAPIClient::StoreApi'); -my $api = WWW::SwaggerClient::StoreApi->new(); -isa_ok($api, 'WWW::SwaggerClient::StoreApi'); +my $api = WWW::OpenAPIClient::StoreApi->new(); +isa_ok($api, 'WWW::OpenAPIClient::StoreApi'); # # delete_order test diff --git a/samples/client/petstore/perl/t/TagTest.t b/samples/client/petstore/perl/t/TagTest.t index bde9da8c69e..32e1d62ad1b 100644 --- a/samples/client/petstore/perl/t/TagTest.t +++ b/samples/client/petstore/perl/t/TagTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::Tag'); +use_ok('WWW::OpenAPIClient::Object::Tag'); -my $instance = WWW::SwaggerClient::Object::Tag->new(); +my $instance = WWW::OpenAPIClient::Object::Tag->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::Tag'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::Tag'); diff --git a/samples/client/petstore/perl/t/UserApiTest.t b/samples/client/petstore/perl/t/UserApiTest.t index 57a830412c0..816b460e4f6 100644 --- a/samples/client/petstore/perl/t/UserApiTest.t +++ b/samples/client/petstore/perl/t/UserApiTest.t @@ -24,10 +24,10 @@ use lib 'lib'; use strict; use warnings; -use_ok('WWW::SwaggerClient::UserApi'); +use_ok('WWW::OpenAPIClient::UserApi'); -my $api = WWW::SwaggerClient::UserApi->new(); -isa_ok($api, 'WWW::SwaggerClient::UserApi'); +my $api = WWW::OpenAPIClient::UserApi->new(); +isa_ok($api, 'WWW::OpenAPIClient::UserApi'); # # create_user test diff --git a/samples/client/petstore/perl/t/UserTest.t b/samples/client/petstore/perl/t/UserTest.t index 260595540be..197b3b2bcaf 100644 --- a/samples/client/petstore/perl/t/UserTest.t +++ b/samples/client/petstore/perl/t/UserTest.t @@ -9,9 +9,9 @@ use strict; use warnings; -use_ok('WWW::SwaggerClient::Object::User'); +use_ok('WWW::OpenAPIClient::Object::User'); -my $instance = WWW::SwaggerClient::Object::User->new(); +my $instance = WWW::OpenAPIClient::Object::User->new(); -isa_ok($instance, 'WWW::SwaggerClient::Object::User'); +isa_ok($instance, 'WWW::OpenAPIClient::Object::User'); diff --git a/samples/client/petstore/perl/test.pl b/samples/client/petstore/perl/test.pl index 47d2946cc32..b1690b09973 100755 --- a/samples/client/petstore/perl/test.pl +++ b/samples/client/petstore/perl/test.pl @@ -4,18 +4,18 @@ use lib 'lib'; use strict; use warnings; -use WWW::SwaggerClient::PetApi; -use WWW::SwaggerClient::StoreApi; -use WWW::SwaggerClient::ApiClient; -use WWW::SwaggerClient::Configuration; -use WWW::SwaggerClient::Object::Pet; -use WWW::SwaggerClient::Object::Tag; -use WWW::SwaggerClient::Object::Category; +use WWW::OpenAPIClient::PetApi; +use WWW::OpenAPIClient::StoreApi; +use WWW::OpenAPIClient::ApiClient; +use WWW::OpenAPIClient::Configuration; +use WWW::OpenAPIClient::Object::Pet; +use WWW::OpenAPIClient::Object::Tag; +use WWW::OpenAPIClient::Object::Category; use JSON; use Data::Dumper; use DateTime; -my $api = WWW::SwaggerClient::PetApi->new( +my $api = WWW::OpenAPIClient::PetApi->new( http_user_agent => 'Perl-Swagger-Test', api_key => { api_key => 'ZZZZZZZZZZZZZZ' }, api_key_prefix => { api_key => 'Bearer' }, @@ -34,15 +34,15 @@ my $api = WWW::SwaggerClient::PetApi->new( my $pet_id = 10008; -my $category = WWW::SwaggerClient::Object::Category->new('id' => '2', 'name' => 'perl'); -my $tag = WWW::SwaggerClient::Object::Tag->new('id' => '1', 'name' => 'just kidding'); -my $pet = WWW::SwaggerClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', +my $category = WWW::OpenAPIClient::Object::Category->new('id' => '2', 'name' => 'perl'); +my $tag = WWW::OpenAPIClient::Object::Tag->new('id' => '1', 'name' => 'just kidding'); +my $pet = WWW::OpenAPIClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', "photoUrls" => ['123', 'oop'], 'tags' => [$tag], 'status' => 'pending', 'category' => $category); print "\npet(object)=".Dumper $pet; my $json = JSON->new->convert_blessed; -my $new_pet = WWW::SwaggerClient::Object::Pet->new(); +my $new_pet = WWW::OpenAPIClient::Object::Pet->new(); $new_pet = $new_pet->from_hash($pet->to_hash); print "new_pet(hash):".Dumper($new_pet->to_hash); @@ -53,7 +53,7 @@ print "\nget_pet_by_id:".Dumper $api->get_pet_by_id(pet_id => $pet_id); print "\nupdate_pet_with_form:".Dumper $api->update_pet_with_form(pet_id => $pet_id, name => 'test_name', status => 'test status'); print "\ndelete_pet:".Dumper $api->delete_pet(pet_id => $pet_id); -my $store_api = WWW::SwaggerClient::StoreApi->new(); +my $store_api = WWW::OpenAPIClient::StoreApi->new(); print "\nget_inventory:".Dumper $store_api->get_inventory(); my $pet_json = <new('base_url' => 'http://testing'); -my $api = WWW::SwaggerClient::PetApi->new($api_client); +my $api_client = WWW::OpenAPIClient::ApiClient->new('base_url' => 'http://testing'); +my $api = WWW::OpenAPIClient::PetApi->new($api_client); is $api->{api_client}{config}{base_url}, 'http://testing', 'get the proper base URL from api client'; # reset the base_url - no direct access because an application shouldn't be changing @@ -33,15 +33,15 @@ is $api->{api_client}->select_header_accept(''), undef, 'get the proper accept " my $pet_id = 10008; -my $category = WWW::SwaggerClient::Object::Category->new('id' => '22', 'name' => 'perl'); -my $tag = WWW::SwaggerClient::Object::Tag->new('id' => '11', 'name' => 'just kidding'); -my $pet = WWW::SwaggerClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', +my $category = WWW::OpenAPIClient::Object::Category->new('id' => '22', 'name' => 'perl'); +my $tag = WWW::OpenAPIClient::Object::Tag->new('id' => '11', 'name' => 'just kidding'); +my $pet = WWW::OpenAPIClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', "photoUrls" => ['123', 'oop'], 'tags' => [$tag], 'status' => 'pending', 'category' => $category); -isa_ok($api, 'WWW::SwaggerClient::PetApi'); -isa_ok($category, 'WWW::SwaggerClient::Object::Category'); -isa_ok($tag, 'WWW::SwaggerClient::Object::Tag'); -isa_ok($pet, 'WWW::SwaggerClient::Object::Pet'); +isa_ok($api, 'WWW::OpenAPIClient::PetApi'); +isa_ok($category, 'WWW::OpenAPIClient::Object::Category'); +isa_ok($tag, 'WWW::OpenAPIClient::Object::Tag'); +isa_ok($pet, 'WWW::OpenAPIClient::Object::Pet'); my $pet_hash = $pet->to_hash; @@ -72,7 +72,7 @@ my $get_pet_after_update = $api->get_pet_by_id(pet_id => $pet_id); is $get_pet_after_update->{status}, 'sold', 'get the updated status after update_pet_with_form'; my $upload_pet = $api->upload_file(pet_id => $pet_id, additional_metadata => 'testabc', file => 'test.pl'); -isa_ok($upload_pet, 'WWW::SwaggerClient::Object::ApiResponse'); +isa_ok($upload_pet, 'WWW::OpenAPIClient::Object::ApiResponse'); my $delete_pet = $api->delete_pet(pet_id => $pet_id); is $delete_pet, undef, 'get the null response from delete_pet'; @@ -81,5 +81,5 @@ throws_ok{$api->get_pet_by_id(pet_id => $pet_id)} qr/API Exception\(404\): Not F my $pets; lives_ok {$pets = $api->find_pets_by_status(status => [qw(sold available)])} 'array query param processed correctly'; -isa_ok($pets->[0], 'WWW::SwaggerClient::Object::Pet'); +isa_ok($pets->[0], 'WWW::OpenAPIClient::Object::Pet'); diff --git a/samples/client/petstore/perl/tests/02_store_api.t b/samples/client/petstore/perl/tests/02_store_api.t index 1528830a811..ee721210cdd 100644 --- a/samples/client/petstore/perl/tests/02_store_api.t +++ b/samples/client/petstore/perl/tests/02_store_api.t @@ -7,16 +7,16 @@ use warnings; use JSON; -use_ok('WWW::SwaggerClient::StoreApi'); -use_ok('WWW::SwaggerClient::ApiClient'); -use_ok('WWW::SwaggerClient::Object::Pet'); -use_ok('WWW::SwaggerClient::Object::Tag'); -use_ok('WWW::SwaggerClient::Object::Category'); -use_ok('WWW::SwaggerClient::Object::User'); +use_ok('WWW::OpenAPIClient::StoreApi'); +use_ok('WWW::OpenAPIClient::ApiClient'); +use_ok('WWW::OpenAPIClient::Object::Pet'); +use_ok('WWW::OpenAPIClient::Object::Tag'); +use_ok('WWW::OpenAPIClient::Object::Category'); +use_ok('WWW::OpenAPIClient::Object::User'); -my $api_client = WWW::SwaggerClient::ApiClient->new(); -my $store_api = WWW::SwaggerClient::StoreApi->new($api_client); +my $api_client = WWW::OpenAPIClient::ApiClient->new(); +my $store_api = WWW::OpenAPIClient::StoreApi->new($api_client); is $store_api->{api_client}{config}{base_url}, 'http://petstore.swagger.io:80/v2', 'get the default base URL from api client'; @@ -50,11 +50,11 @@ my $pet_json = <deserialize("HASH[string,Pet]", $pet_json)->{pet}, "WWW::SwaggerClient::Object::Pet", "get Pet object from hash"; +is ref $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}, "WWW::OpenAPIClient::Object::Pet", "get Pet object from hash"; is $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{name}, "doggie", "get the name of the Pet object"; is $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{category}->{name}, "string", "get the category name of the Pet object"; -is ref $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{category}, "WWW::SwaggerClient::Object::Category", "get the Category the Pet object"; -is ref $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{tags}[0], "WWW::SwaggerClient::Object::Tag", "get the Tag of the Pet object"; +is ref $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{category}, "WWW::OpenAPIClient::Object::Category", "get the Category the Pet object"; +is ref $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{tags}[0], "WWW::OpenAPIClient::Object::Tag", "get the Tag of the Pet object"; is $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{tags}[0]->{name}, "tag string", "get the Tag name of the Pet object"; is $api_client->deserialize("HASH[string,Pet]", $pet_json)->{pet}->{photo_urls}->[0], "string", "get the photoUrl from the Pet object"; @@ -82,11 +82,11 @@ my $array_json = <deserialize("ARRAY[Pet]", $array_json)->[0], "WWW::SwaggerClient::Object::Pet", "get Pet object from hash"; +is ref $api_client->deserialize("ARRAY[Pet]", $array_json)->[0], "WWW::OpenAPIClient::Object::Pet", "get Pet object from hash"; is $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{name}, "doggie", "get the name of the Pet object"; is $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{category}->{name}, "string", "get the category name of the Pet object"; -is ref $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{category}, "WWW::SwaggerClient::Object::Category", "get the Category the Pet object"; -is ref $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{tags}->[0], "WWW::SwaggerClient::Object::Tag", "get the Tag[0] the Pet object"; +is ref $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{category}, "WWW::OpenAPIClient::Object::Category", "get the Category the Pet object"; +is ref $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{tags}->[0], "WWW::OpenAPIClient::Object::Tag", "get the Tag[0] the Pet object"; is $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{tags}->[0]->{name}, "tag string", "get the tag name the Pet object"; is $api_client->deserialize("ARRAY[Pet]", $array_json)->[0]->{photo_urls}->[0], "string", "get the photoUrl from the Pet object"; @@ -112,11 +112,11 @@ my $pet_json_nopet = <deserialize("Pet", $pet_json_nopet), "WWW::SwaggerClient::Object::Pet", "get Pet object via from_hash()"; +is ref $api_client->deserialize("Pet", $pet_json_nopet), "WWW::OpenAPIClient::Object::Pet", "get Pet object via from_hash()"; is $api_client->deserialize("Pet", $pet_json_nopet)->{name}, "doggie", "get the name of the Pet object"; is $api_client->deserialize("Pet", $pet_json_nopet)->{category}->{name}, "string", "get the category name of the Pet object"; -is ref $api_client->deserialize("Pet", $pet_json_nopet)->{category}, "WWW::SwaggerClient::Object::Category", "get the Category the Pet object"; -is ref $api_client->deserialize("Pet", $pet_json_nopet)->{tags}->[0], "WWW::SwaggerClient::Object::Tag", "get the Tag[0] the Pet object"; +is ref $api_client->deserialize("Pet", $pet_json_nopet)->{category}, "WWW::OpenAPIClient::Object::Category", "get the Category the Pet object"; +is ref $api_client->deserialize("Pet", $pet_json_nopet)->{tags}->[0], "WWW::OpenAPIClient::Object::Tag", "get the Tag[0] the Pet object"; is $api_client->deserialize("Pet", $pet_json_nopet)->{tags}->[0]->{name}, "tag string", "get the tag name the Pet object"; is $api_client->deserialize("Pet", $pet_json_nopet)->{photo_urls}->[0], "string", "get the photoUrl from the Pet object"; @@ -132,8 +132,8 @@ my %userdata = ( userStatus => 1, ); -my $user = WWW::SwaggerClient::Object::User->new->from_hash(\%userdata); -is ref $user, 'WWW::SwaggerClient::Object::User', "built a User object via from_hash()"; +my $user = WWW::OpenAPIClient::Object::User->new->from_hash(\%userdata); +is ref $user, 'WWW::OpenAPIClient::Object::User', "built a User object via from_hash()"; is $user->{id}, $userdata{id}, "got the id of the User object"; is $user->{username}, $userdata{username}, "got the username of the User object"; is $user->{first_name}, $userdata{firstName}, "got the firstName of the User object"; diff --git a/samples/client/petstore/perl/tests/03_api_factory.t b/samples/client/petstore/perl/tests/03_api_factory.t index 3fb5dc9d334..ac6f7f0085d 100644 --- a/samples/client/petstore/perl/tests/03_api_factory.t +++ b/samples/client/petstore/perl/tests/03_api_factory.t @@ -5,14 +5,14 @@ use lib 'lib'; use strict; use warnings; -use_ok('WWW::SwaggerClient::ApiFactory'); +use_ok('WWW::OpenAPIClient::ApiFactory'); -my $api_factory = WWW::SwaggerClient::ApiFactory->new('base_url' => 'http://testing'); +my $api_factory = WWW::OpenAPIClient::ApiFactory->new('base_url' => 'http://testing'); my $pet_api = $api_factory->get_api('Pet'); -isa_ok($pet_api, 'WWW::SwaggerClient::PetApi'); +isa_ok($pet_api, 'WWW::OpenAPIClient::PetApi'); is $pet_api->{api_client}{config}{base_url}, 'http://testing', 'get the proper base URL from api client'; -$api_factory = WWW::SwaggerClient::ApiFactory->new; +$api_factory = WWW::OpenAPIClient::ApiFactory->new; $pet_api = $api_factory->get_api('Pet'); # reset the base_url - no direct access because an application shouldn't be changing @@ -24,9 +24,9 @@ is $pet_api->{api_client}{config}{base_url}, 'http://petstore.swagger.io/v2', 'g my $pet_id = 10008; # note - we don't need to 'use' these modules because they've already been loaded by ApiFactory my ($category, $tag, $pet); -lives_ok { $category = WWW::SwaggerClient::Object::Category->new('id' => '22', 'name' => 'perl') } 'Category.pm loaded OK'; -lives_ok { $tag = WWW::SwaggerClient::Object::Tag->new('id' => '11', 'name' => 'just kidding') } 'Tag.pm loaded OK'; -lives_ok { $pet = WWW::SwaggerClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', +lives_ok { $category = WWW::OpenAPIClient::Object::Category->new('id' => '22', 'name' => 'perl') } 'Category.pm loaded OK'; +lives_ok { $tag = WWW::OpenAPIClient::Object::Tag->new('id' => '11', 'name' => 'just kidding') } 'Tag.pm loaded OK'; +lives_ok { $pet = WWW::OpenAPIClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', "photoUrls" => ['123', 'oop'], 'tags' => [$tag], 'status' => 'pending', 'category' => $category) } 'Pet.pm loaded OK'; is $pet->id, '10008', 'got the proper pet id'; diff --git a/samples/client/petstore/perl/tests/04_role.t b/samples/client/petstore/perl/tests/04_role.t index fcd7f90688c..2e074dfdc21 100644 --- a/samples/client/petstore/perl/tests/04_role.t +++ b/samples/client/petstore/perl/tests/04_role.t @@ -11,7 +11,7 @@ SKIP: { eval " package MyApp; use Moose; - with 'WWW::SwaggerClient::Role'; + with 'WWW::OpenAPIClient::Role'; sub auth_setup_handler {} "; @@ -23,9 +23,9 @@ my $api = MyApp->new; my $pet_id = 10008; # note - we don't need to 'use' these modules because they've already been loaded by ApiFactory my ($category, $tag, $pet); -lives_ok { $category = WWW::SwaggerClient::Object::Category->new('id' => '22', 'name' => 'perl') } 'Category.pm loaded OK'; -lives_ok { $tag = WWW::SwaggerClient::Object::Tag->new('id' => '11', 'name' => 'just kidding') } 'Tag.pm loaded OK'; -lives_ok { $pet = WWW::SwaggerClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', +lives_ok { $category = WWW::OpenAPIClient::Object::Category->new('id' => '22', 'name' => 'perl') } 'Category.pm loaded OK'; +lives_ok { $tag = WWW::OpenAPIClient::Object::Tag->new('id' => '11', 'name' => 'just kidding') } 'Tag.pm loaded OK'; +lives_ok { $pet = WWW::OpenAPIClient::Object::Pet->new('id' => $pet_id, 'name' => 'perl test', "photoUrls" => ['123', 'oop'], 'tags' => [$tag], 'status' => 'pending', 'category' => $category) } 'Pet.pm loaded OK'; is $pet->id, '10008', 'got the proper pet id'; diff --git a/samples/server/petstore/rails5/README.md b/samples/server/petstore/rails5/README.md index 91fe3051c49..cf74536c5a4 100644 --- a/samples/server/petstore/rails5/README.md +++ b/samples/server/petstore/rails5/README.md @@ -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 diff --git a/samples/server/petstore/rails5/app/controllers/pet_controller.rb b/samples/server/petstore/rails5/app/controllers/pet_controller.rb index 03f31c51084..d41529455b5 100644 --- a/samples/server/petstore/rails5/app/controllers/pet_controller.rb +++ b/samples/server/petstore/rails5/app/controllers/pet_controller.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end class PetController < ApplicationController diff --git a/samples/server/petstore/rails5/app/controllers/store_controller.rb b/samples/server/petstore/rails5/app/controllers/store_controller.rb index 4e2c2bb8cf0..d68e3196420 100644 --- a/samples/server/petstore/rails5/app/controllers/store_controller.rb +++ b/samples/server/petstore/rails5/app/controllers/store_controller.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end class StoreController < ApplicationController diff --git a/samples/server/petstore/rails5/app/controllers/user_controller.rb b/samples/server/petstore/rails5/app/controllers/user_controller.rb index 56c87b138e7..99e50ad044f 100644 --- a/samples/server/petstore/rails5/app/controllers/user_controller.rb +++ b/samples/server/petstore/rails5/app/controllers/user_controller.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end class UserController < ApplicationController diff --git a/samples/server/petstore/rails5/app/models/api_response.rb b/samples/server/petstore/rails5/app/models/api_response.rb index 1ee6585117f..c45d25dc238 100644 --- a/samples/server/petstore/rails5/app/models/api_response.rb +++ b/samples/server/petstore/rails5/app/models/api_response.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end diff --git a/samples/server/petstore/rails5/app/models/category.rb b/samples/server/petstore/rails5/app/models/category.rb index 478c7bc88d7..657bce42a59 100644 --- a/samples/server/petstore/rails5/app/models/category.rb +++ b/samples/server/petstore/rails5/app/models/category.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end diff --git a/samples/server/petstore/rails5/app/models/order.rb b/samples/server/petstore/rails5/app/models/order.rb index 06d6985c3e9..4284e908814 100644 --- a/samples/server/petstore/rails5/app/models/order.rb +++ b/samples/server/petstore/rails5/app/models/order.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end diff --git a/samples/server/petstore/rails5/app/models/pet.rb b/samples/server/petstore/rails5/app/models/pet.rb index ca6ae49aa31..d84012aa762 100644 --- a/samples/server/petstore/rails5/app/models/pet.rb +++ b/samples/server/petstore/rails5/app/models/pet.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end diff --git a/samples/server/petstore/rails5/app/models/tag.rb b/samples/server/petstore/rails5/app/models/tag.rb index 6e14caf1986..808e0d5cb9a 100644 --- a/samples/server/petstore/rails5/app/models/tag.rb +++ b/samples/server/petstore/rails5/app/models/tag.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end diff --git a/samples/server/petstore/rails5/app/models/user.rb b/samples/server/petstore/rails5/app/models/user.rb index 14ecc988d29..1f1d02b612f 100644 --- a/samples/server/petstore/rails5/app/models/user.rb +++ b/samples/server/petstore/rails5/app/models/user.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end diff --git a/samples/server/petstore/rails5/config/routes.rb b/samples/server/petstore/rails5/config/routes.rb index 3d62abfab77..5efcc4aff72 100644 --- a/samples/server/petstore/rails5/config/routes.rb +++ b/samples/server/petstore/rails5/config/routes.rb @@ -5,34 +5,34 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =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 - add_swagger_route 'POST', '/v2/pet', controller_name: 'pet', action_name: 'create' - add_swagger_route 'DELETE', '/v2/pet/{petId}', controller_name: 'pet', action_name: 'destroy' - add_swagger_route 'GET', '/v2/pet/findByStatus', controller_name: 'pet', action_name: 'find_pets_by_status' - add_swagger_route 'GET', '/v2/pet/findByTags', controller_name: 'pet', action_name: 'find_pets_by_tags' - add_swagger_route 'GET', '/v2/pet/{petId}', controller_name: 'pet', action_name: 'show' - add_swagger_route 'PUT', '/v2/pet', controller_name: 'pet', action_name: 'update_pet' - add_swagger_route 'POST', '/v2/pet/{petId}', controller_name: 'pet', action_name: 'update_pet_with_form' - add_swagger_route 'POST', '/v2/pet/{petId}/uploadImage', controller_name: 'pet', action_name: 'upload_file' - add_swagger_route 'DELETE', '/v2/store/order/{orderId}', controller_name: 'store', action_name: 'delete_order' - add_swagger_route 'GET', '/v2/store/inventory', controller_name: 'store', action_name: 'get_inventory' - add_swagger_route 'GET', '/v2/store/order/{orderId}', controller_name: 'store', action_name: 'get_order_by_id' - add_swagger_route 'POST', '/v2/store/order', controller_name: 'store', action_name: 'place_order' - add_swagger_route 'POST', '/v2/user', controller_name: 'user', action_name: 'create' - add_swagger_route 'POST', '/v2/user/createWithArray', controller_name: 'user', action_name: 'create_users_with_array_input' - add_swagger_route 'POST', '/v2/user/createWithList', controller_name: 'user', action_name: 'create_users_with_list_input' - add_swagger_route 'DELETE', '/v2/user/{username}', controller_name: 'user', action_name: 'destroy' - add_swagger_route 'GET', '/v2/user/{username}', controller_name: 'user', action_name: 'show' - add_swagger_route 'GET', '/v2/user/login', controller_name: 'user', action_name: 'login_user' - add_swagger_route 'GET', '/v2/user/logout', controller_name: 'user', action_name: 'logout_user' - add_swagger_route 'PUT', '/v2/user/{username}', controller_name: 'user', action_name: 'update' + add_openapi_route 'POST', '/v2/pet', controller_name: 'pet', action_name: 'create' + add_openapi_route 'DELETE', '/v2/pet/{petId}', controller_name: 'pet', action_name: 'destroy' + add_openapi_route 'GET', '/v2/pet/findByStatus', controller_name: 'pet', action_name: 'find_pets_by_status' + add_openapi_route 'GET', '/v2/pet/findByTags', controller_name: 'pet', action_name: 'find_pets_by_tags' + add_openapi_route 'GET', '/v2/pet/{petId}', controller_name: 'pet', action_name: 'show' + add_openapi_route 'PUT', '/v2/pet', controller_name: 'pet', action_name: 'update_pet' + add_openapi_route 'POST', '/v2/pet/{petId}', controller_name: 'pet', action_name: 'update_pet_with_form' + add_openapi_route 'POST', '/v2/pet/{petId}/uploadImage', controller_name: 'pet', action_name: 'upload_file' + add_openapi_route 'DELETE', '/v2/store/order/{orderId}', controller_name: 'store', action_name: 'delete_order' + add_openapi_route 'GET', '/v2/store/inventory', controller_name: 'store', action_name: 'get_inventory' + add_openapi_route 'GET', '/v2/store/order/{orderId}', controller_name: 'store', action_name: 'get_order_by_id' + add_openapi_route 'POST', '/v2/store/order', controller_name: 'store', action_name: 'place_order' + add_openapi_route 'POST', '/v2/user', controller_name: 'user', action_name: 'create' + add_openapi_route 'POST', '/v2/user/createWithArray', controller_name: 'user', action_name: 'create_users_with_array_input' + add_openapi_route 'POST', '/v2/user/createWithList', controller_name: 'user', action_name: 'create_users_with_list_input' + add_openapi_route 'DELETE', '/v2/user/{username}', controller_name: 'user', action_name: 'destroy' + add_openapi_route 'GET', '/v2/user/{username}', controller_name: 'user', action_name: 'show' + add_openapi_route 'GET', '/v2/user/login', controller_name: 'user', action_name: 'login_user' + add_openapi_route 'GET', '/v2/user/logout', controller_name: 'user', action_name: 'logout_user' + add_openapi_route 'PUT', '/v2/user/{username}', controller_name: 'user', action_name: 'update' end diff --git a/samples/server/petstore/rails5/db/migrate/0_init_tables.rb b/samples/server/petstore/rails5/db/migrate/0_init_tables.rb index 8df8a57ac37..8a9b8256fe9 100644 --- a/samples/server/petstore/rails5/db/migrate/0_init_tables.rb +++ b/samples/server/petstore/rails5/db/migrate/0_init_tables.rb @@ -5,7 +5,7 @@ This is a sample server Petstore server. You can find out more about Swagger at OpenAPI spec version: 1.0.0 Contact: apiteam@swagger.io -Generated by: https://github.com/swagger-api/swagger-codegen.git +Generated by: https://github.com/openapitools/openapi-generator.git =end diff --git a/samples/server/petstore/sinatra/lib/openapiing.rb b/samples/server/petstore/sinatra/lib/openapiing.rb new file mode 100644 index 00000000000..ff15b54f2b9 --- /dev/null +++ b/samples/server/petstore/sinatra/lib/openapiing.rb @@ -0,0 +1,163 @@ +require 'json' +require 'sinatra/base' +require 'sinatra/cross_origin' + +class Configuration + attr_accessor :base_path, :api_version, :openapi_version, :format_specifier + + def initialize + @api_version = '1.0' + @base_path = 'http://localhost:4567' + @openapi_version = '1.1' + @format_specifier = ".json" + end +end + +class OpenAPIing < Sinatra::Base + register Sinatra::CrossOrigin + + @@routes = {} + @@configuration = Configuration.new + + attr_accessor :configuration + + def self.configure + get("/resources" + @@configuration.format_specifier) { + cross_origin + OpenAPIing.to_resource_listing + } + + # for openapi.yaml + get("/openapi.yaml") { + cross_origin + File.read("./openapi.yaml"); + } + + @@configuration ||= Configuration.new + yield(@@configuration) if block_given? + end + + def self.add_route(method, path, swag={}, opts={}, &block) + #fullPath = swag["resourcePath"].to_s + @@configuration.format_specifier + path + fullPath = path.gsub(/{(.*?)}/, ':\1') + + accepted = case method.to_s.downcase + when 'get' + get(fullPath, opts, &block) + true + when 'post' + post(fullPath, opts, &block) + true + when 'delete' + delete(fullPath, opts, &block) + true + when 'put' + put(fullPath, opts, &block) + true + else + puts "Error adding route: #{method} #{fullPath}" + false + end + + if accepted then + resourcePath = swag["resourcePath"].to_s + ops = @@routes[resourcePath] + if ops.nil? + ops = Array.new + @@routes.merge!(resourcePath => ops) + + get(resourcePath + @@configuration.format_specifier) do + cross_origin + OpenAPIing.to_api(resourcePath) + end + end + + swag.merge!("httpMethod" => method.to_s.upcase) + ops.push(swag) + end + end + + def self.to_resource_listing + apis = Array.new + (@@routes.keys).each do |key| + api = { + "path" => (key + ".{format}"), + "description" => "no description" + } + apis.push api + end + + resource = { + "apiVersion" => @@configuration.api_version, + "openapiVersion" => @@configuration.openapi_version, + "apis" => apis + } + + resource.to_json + end + + def self.to_api(resourcePath) + apis = {} + models = [] + + @@routes[resourcePath].each do |route| + endpoint = route["endpoint"].gsub(/:(\w+)(\/?)/,'{\1}\2') + path = (resourcePath + ".{format}" + endpoint) + api = apis[path] + if api.nil? + api = {"path" => path, "description" => "description", "operations" => []} + apis.merge!(path => api) + end + + parameters = route["parameters"] + + unless parameters.nil? then + parameters.each do |param| + av_string = param["allowableValues"] + unless av_string.nil? + if av_string.count('[') > 0 + pattern = /^([A-Z]*)\[(.*)\]/ + match = pattern.match av_string + case match.to_a[1] + when "LIST" + allowables = match.to_a[2].split(',') + param["allowableValues"] = { + "valueType" => "LIST", + "values" => allowables + } + when "RANGE" + allowables = match.to_a[2].split(',') + param["allowableValues"] = { + "valueType" => "RANGE", + "min" => allowables[0], + "max" => allowables[1] + } + end + end + end + end + end + + op = { + "httpMethod" => route["httpMethod"], + "description" => route["summary"], + "responseClass" => route["responseClass"], + "notes" => route["notes"], + "nickname" => route["nickname"], + "summary" => route["summary"], + "parameters" => route["parameters"] + } + api["operations"].push(op) + end + + api_listing = { + "apiVersion" => @@configuration.api_version, + "openapiVersion" => @@configuration.openapi_version, + "basePath" => @@configuration.base_path, + "resourcePath" => resourcePath, + "apis" => apis.values, + "models" => models + } + api_listing.to_json + end +end diff --git a/samples/server/petstore/sinatra/my_app.rb b/samples/server/petstore/sinatra/my_app.rb index 33376ef311d..47bc4d8b512 100644 --- a/samples/server/petstore/sinatra/my_app.rb +++ b/samples/server/petstore/sinatra/my_app.rb @@ -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 = '1.0.0' end diff --git a/samples/server/petstore/sinatra/openapi.yaml b/samples/server/petstore/sinatra/openapi.yaml index 3c412357c80..3609e47afcf 100644 --- a/samples/server/petstore/sinatra/openapi.yaml +++ b/samples/server/petstore/sinatra/openapi.yaml @@ -1,4 +1,4 @@ -openapi: 3.0.0 +openapi: 3.0.1 info: title: Swagger Petstore description: 'This is a sample server Petstore server. You can find out more about @@ -37,14 +37,25 @@ paths: summary: Update an existing pet operationId: updatePet requestBody: - $ref: '#/components/requestBodies/Pet' + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + required: true responses: 400: description: Invalid ID supplied + content: {} 404: description: Pet not found + content: {} 405: description: Validation exception + content: {} security: - petstore_auth: - write:pets @@ -55,10 +66,19 @@ paths: summary: Add a new pet to the store operationId: addPet requestBody: - $ref: '#/components/requestBodies/Pet' + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + required: true responses: 405: description: Invalid input + content: {} security: - petstore_auth: - write:pets @@ -75,7 +95,6 @@ paths: in: query description: Status values that need to be considered for filter required: true - style: form explode: false schema: type: array @@ -102,6 +121,7 @@ paths: $ref: '#/components/schemas/Pet' 400: description: Invalid status value + content: {} security: - petstore_auth: - write:pets @@ -118,7 +138,6 @@ paths: in: query description: Tags to filter by required: true - style: form explode: false schema: type: array @@ -140,6 +159,7 @@ paths: $ref: '#/components/schemas/Pet' 400: description: Invalid tag value + content: {} deprecated: true security: - petstore_auth: @@ -157,8 +177,6 @@ paths: in: path description: ID of pet to return required: true - style: simple - explode: false schema: type: integer format: int64 @@ -174,8 +192,10 @@ paths: $ref: '#/components/schemas/Pet' 400: description: Invalid ID supplied + content: {} 404: description: Pet not found + content: {} security: - api_key: [] post: @@ -188,8 +208,6 @@ paths: in: path description: ID of pet that needs to be updated required: true - style: simple - explode: false schema: type: integer format: int64 @@ -197,10 +215,17 @@ paths: content: application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/body' + properties: + name: + type: string + description: Updated name of the pet + status: + type: string + description: Updated status of the pet responses: 405: description: Invalid input + content: {} security: - petstore_auth: - write:pets @@ -213,23 +238,19 @@ paths: parameters: - name: api_key in: header - required: false - style: simple - explode: false schema: type: string - name: petId in: path description: Pet id to delete required: true - style: simple - explode: false schema: type: integer format: int64 responses: 400: description: Invalid pet value + content: {} security: - petstore_auth: - write:pets @@ -245,8 +266,6 @@ paths: in: path description: ID of pet to update required: true - style: simple - explode: false schema: type: integer format: int64 @@ -254,7 +273,14 @@ paths: content: multipart/form-data: schema: - $ref: '#/components/schemas/body_1' + properties: + additionalMetadata: + type: string + description: Additional data to pass to server + file: + type: string + description: file to upload + format: binary responses: 200: description: successful operation @@ -294,7 +320,7 @@ paths: requestBody: description: order placed for purchasing the pet content: - application/json: + '*/*': schema: $ref: '#/components/schemas/Order' required: true @@ -310,6 +336,7 @@ paths: $ref: '#/components/schemas/Order' 400: description: Invalid Order + content: {} /store/order/{orderId}: get: tags: @@ -322,8 +349,6 @@ paths: in: path description: ID of pet that needs to be fetched required: true - style: simple - explode: false schema: maximum: 5 minimum: 1 @@ -341,8 +366,10 @@ paths: $ref: '#/components/schemas/Order' 400: description: Invalid ID supplied + content: {} 404: description: Order not found + content: {} delete: tags: - store @@ -354,15 +381,15 @@ paths: in: path description: ID of the order that needs to be deleted required: true - style: simple - explode: false schema: type: string responses: 400: description: Invalid ID supplied + content: {} 404: description: Order not found + content: {} /user: post: tags: @@ -373,13 +400,14 @@ paths: requestBody: description: Created user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' required: true responses: default: description: successful operation + content: {} /user/createWithArray: post: tags: @@ -387,10 +415,18 @@ paths: summary: Creates list of users with given input array operationId: createUsersWithArrayInput requestBody: - $ref: '#/components/requestBodies/UserArray' + description: List of user object + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/User' + required: true responses: default: description: successful operation + content: {} /user/createWithList: post: tags: @@ -398,10 +434,18 @@ paths: summary: Creates list of users with given input array operationId: createUsersWithListInput requestBody: - $ref: '#/components/requestBodies/UserArray' + description: List of user object + content: + '*/*': + schema: + type: array + items: + $ref: '#/components/schemas/User' + required: true responses: default: description: successful operation + content: {} /user/login: get: tags: @@ -413,16 +457,12 @@ paths: in: query description: The user name for login required: true - style: form - explode: true schema: type: string - name: password in: query description: The password for login in clear text required: true - style: form - explode: true schema: type: string responses: @@ -431,15 +471,11 @@ paths: headers: X-Rate-Limit: description: calls per hour allowed by the user - style: simple - explode: false schema: type: integer format: int32 X-Expires-After: description: date in UTC when toekn expires - style: simple - explode: false schema: type: string format: date-time @@ -452,6 +488,7 @@ paths: type: string 400: description: Invalid username/password supplied + content: {} /user/logout: get: tags: @@ -461,6 +498,7 @@ paths: responses: default: description: successful operation + content: {} /user/{username}: get: tags: @@ -472,8 +510,6 @@ paths: in: path description: The name that needs to be fetched. Use user1 for testing. required: true - style: simple - explode: false schema: type: string responses: @@ -488,8 +524,10 @@ paths: $ref: '#/components/schemas/User' 400: description: Invalid username supplied + content: {} 404: description: User not found + content: {} put: tags: - user @@ -501,22 +539,22 @@ paths: in: path description: name that need to be deleted required: true - style: simple - explode: false schema: type: string requestBody: description: Updated user object content: - application/json: + '*/*': schema: $ref: '#/components/schemas/User' required: true responses: 400: description: Invalid user supplied + content: {} 404: description: User not found + content: {} delete: tags: - user @@ -528,15 +566,15 @@ paths: in: path description: The name that needs to be deleted required: true - style: simple - explode: false schema: type: string responses: 400: description: Invalid username supplied + content: {} 404: description: User not found + content: {} components: schemas: Order: @@ -706,49 +744,6 @@ components: message: type: string description: Describes the result of uploading an image resource - example: - code: 0 - type: type - message: message - body: - type: object - properties: - name: - type: string - description: Updated name of the pet - status: - type: string - description: Updated status of the pet - body_1: - type: object - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary - requestBodies: - UserArray: - description: List of user object - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true - Pet: - description: Pet object that needs to be added to the store - content: - application/json: - schema: - $ref: '#/components/schemas/Pet' - application/xml: - schema: - $ref: '#/components/schemas/Pet' - required: true securitySchemes: petstore_auth: type: oauth2