From 7a29714a37d4c95114c93b2f57f031e5b0d981a6 Mon Sep 17 00:00:00 2001 From: Deepak Michael Date: Mon, 1 Aug 2011 22:20:50 +0530 Subject: [PATCH] Swagger codegen: Changing package name from com.wordnik to com.wordnik.swagger --- code-gen/build.xml | 2 +- .../annotations/AllowableValues.java | 2 +- .../annotations/MethodArgumentNames.java | 2 +- .../{ => swagger}/annotations/Required.java | 2 +- .../{ => swagger}/common/StringValue.java | 2 +- .../{ => swagger}/common/WordnikAPI.java | 6 ++-- .../{ => swagger}/exception/APIException.java | 2 +- .../exception/APIExceptionCodes.java | 2 +- .../exception/CodeGenerationException.java | 2 +- .../codegen/DriverCodeGenerator.java | 13 +++---- .../codegen/FieldDefinition.java | 2 +- .../{ => swagger}/codegen/MethodArgument.java | 5 +-- .../{ => swagger}/codegen/ResourceMethod.java | 5 +-- .../{ => swagger}/codegen/api/SwaggerApi.java | 17 ++++++---- .../codegen/config/ApiConfiguration.java | 4 +-- .../config/DataTypeMappingProvider.java | 2 +- .../codegen/config/LanguageConfiguration.java | 4 +-- .../codegen/config/NamingPolicyProvider.java | 2 +- .../codegen/config/RulesProvider.java | 2 +- .../common/CamelCaseNamingPolicyProvider.java | 10 +++--- .../config/java/JavaCodeGenRulesProvider.java | 5 +-- .../java/JavaDataTypeMappingProvider.java | 11 +++--- .../codegen/config/java/JavaLibCodeGen.java | 34 +++++++++---------- .../codegen/resource/ApiModelDefn.java | 5 +-- .../codegen/resource/ApiModelListWrapper.java | 2 +- .../codegen/resource/ApiPropertyDefn.java | 2 +- .../resource/ApiPropertyListWrapper.java | 5 +-- .../codegen/resource/Endpoint.java | 11 +++--- .../codegen/resource/EndpointOperation.java | 14 +++++--- .../codegen/resource/ErrorResponse.java | 2 +- .../{ => swagger}/codegen/resource/Model.java | 2 +- .../codegen/resource/ModelField.java | 8 +++-- .../codegen/resource/Resource.java | 15 ++++---- .../codegen/resource/Response.java | 2 +- .../exception/CodeGenerationException.java | 2 +- .../java/com/wordnik/test/APITestRunner.java | 8 +++-- .../com/wordnik/test/TestCaseExecutor.java | 16 +++++---- 37 files changed, 132 insertions(+), 100 deletions(-) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/annotations/AllowableValues.java (90%) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/annotations/MethodArgumentNames.java (88%) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/annotations/Required.java (89%) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/common/StringValue.java (90%) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/common/WordnikAPI.java (98%) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/exception/APIException.java (98%) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/exception/APIExceptionCodes.java (95%) rename code-gen/conf/java/structure/src/main/java/com/wordnik/{ => swagger}/exception/CodeGenerationException.java (92%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/DriverCodeGenerator.java (97%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/FieldDefinition.java (95%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/MethodArgument.java (89%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/ResourceMethod.java (96%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/api/SwaggerApi.java (91%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/ApiConfiguration.java (97%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/DataTypeMappingProvider.java (99%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/LanguageConfiguration.java (95%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/NamingPolicyProvider.java (98%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/RulesProvider.java (92%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/common/CamelCaseNamingPolicyProvider.java (92%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/java/JavaCodeGenRulesProvider.java (83%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/java/JavaDataTypeMappingProvider.java (93%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/config/java/JavaLibCodeGen.java (67%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/ApiModelDefn.java (87%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/ApiModelListWrapper.java (94%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/ApiPropertyDefn.java (98%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/ApiPropertyListWrapper.java (94%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/Endpoint.java (89%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/EndpointOperation.java (95%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/ErrorResponse.java (90%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/Model.java (94%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/ModelField.java (95%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/Resource.java (86%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/codegen/resource/Response.java (93%) rename code-gen/src/main/java/com/wordnik/{ => swagger}/exception/CodeGenerationException.java (92%) diff --git a/code-gen/build.xml b/code-gen/build.xml index 0002fda20f..80168db77c 100644 --- a/code-gen/build.xml +++ b/code-gen/build.xml @@ -39,7 +39,7 @@ - + diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/AllowableValues.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/AllowableValues.java similarity index 90% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/AllowableValues.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/AllowableValues.java index 35f185295b..bc162b068e 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/AllowableValues.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/AllowableValues.java @@ -1,4 +1,4 @@ -package com.wordnik.annotations; +package com.wordnik.swagger.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/MethodArgumentNames.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/MethodArgumentNames.java similarity index 88% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/MethodArgumentNames.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/MethodArgumentNames.java index 6022ecea41..01aaac0093 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/MethodArgumentNames.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/MethodArgumentNames.java @@ -1,4 +1,4 @@ -package com.wordnik.annotations; +package com.wordnik.swagger.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/Required.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/Required.java similarity index 89% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/Required.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/Required.java index 16538c8053..e3fa640254 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/annotations/Required.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/annotations/Required.java @@ -1,4 +1,4 @@ -package com.wordnik.annotations; +package com.wordnik.swagger.annotations; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/common/StringValue.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/common/StringValue.java similarity index 90% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/common/StringValue.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/common/StringValue.java index 66d61e73c1..4c7eaef40f 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/common/StringValue.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/common/StringValue.java @@ -1,4 +1,4 @@ -package com.wordnik.common; +package com.wordnik.swagger.common; /** * Created by IntelliJ IDEA. diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/common/WordnikAPI.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/common/WordnikAPI.java similarity index 98% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/common/WordnikAPI.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/common/WordnikAPI.java index 6527b340e0..fd241f3afd 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/common/WordnikAPI.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/common/WordnikAPI.java @@ -1,4 +1,4 @@ -package com.wordnik.common; +package com.wordnik.swagger.common; import java.io.IOException; import java.util.Map; @@ -6,8 +6,8 @@ import java.util.logging.Logger; import javax.ws.rs.core.MultivaluedMap; -import com.wordnik.exception.APIException; -import com.wordnik.exception.APIExceptionCodes; +import com.wordnik.swagger.exception.APIException; +import com.wordnik.swagger.exception.APIExceptionCodes; import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.DeserializationConfig.Feature; import org.codehaus.jackson.map.SerializationConfig; diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/exception/APIException.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/APIException.java similarity index 98% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/exception/APIException.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/APIException.java index 42c27118e5..61e98e2432 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/exception/APIException.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/APIException.java @@ -1,4 +1,4 @@ -package com.wordnik.exception; +package com.wordnik.swagger.exception; import com.sun.jersey.api.client.ClientResponse; import org.codehaus.jackson.annotate.JsonAutoDetect; diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/exception/APIExceptionCodes.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/APIExceptionCodes.java similarity index 95% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/exception/APIExceptionCodes.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/APIExceptionCodes.java index 013f364519..688f7342f9 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/exception/APIExceptionCodes.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/APIExceptionCodes.java @@ -1,4 +1,4 @@ -package com.wordnik.exception; +package com.wordnik.swagger.exception; /** * Lists all the possible exception codes diff --git a/code-gen/conf/java/structure/src/main/java/com/wordnik/exception/CodeGenerationException.java b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/CodeGenerationException.java similarity index 92% rename from code-gen/conf/java/structure/src/main/java/com/wordnik/exception/CodeGenerationException.java rename to code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/CodeGenerationException.java index 7b55cb2852..308f4a2733 100644 --- a/code-gen/conf/java/structure/src/main/java/com/wordnik/exception/CodeGenerationException.java +++ b/code-gen/conf/java/structure/src/main/java/com/wordnik/swagger/exception/CodeGenerationException.java @@ -1,4 +1,4 @@ -package com.wordnik.exception; +package com.wordnik.swagger.exception; /** * Exception raised while generating code for java driver. diff --git a/code-gen/src/main/java/com/wordnik/codegen/DriverCodeGenerator.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/DriverCodeGenerator.java similarity index 97% rename from code-gen/src/main/java/com/wordnik/codegen/DriverCodeGenerator.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/DriverCodeGenerator.java index 05adbce171..b6a43ea98e 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/DriverCodeGenerator.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/DriverCodeGenerator.java @@ -1,10 +1,11 @@ -package com.wordnik.codegen; +package com.wordnik.swagger.codegen; -import com.wordnik.codegen.api.SwaggerApi; -import com.wordnik.codegen.config.*; -import com.wordnik.codegen.config.ApiConfiguration; -import com.wordnik.codegen.resource.*; -import com.wordnik.exception.CodeGenerationException; +import com.wordnik.swagger.codegen.api.SwaggerApi; +import com.wordnik.swagger.codegen.config.*; +import com.wordnik.swagger.codegen.api.SwaggerApi; +import com.wordnik.swagger.codegen.config.ApiConfiguration; +import com.wordnik.swagger.codegen.resource.*; +import com.wordnik.swagger.exception.CodeGenerationException; import org.antlr.stringtemplate.StringTemplate; import org.antlr.stringtemplate.StringTemplateGroup; diff --git a/code-gen/src/main/java/com/wordnik/codegen/FieldDefinition.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/FieldDefinition.java similarity index 95% rename from code-gen/src/main/java/com/wordnik/codegen/FieldDefinition.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/FieldDefinition.java index f44c3cfec9..ea947f0120 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/FieldDefinition.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/FieldDefinition.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen; +package com.wordnik.swagger.codegen; import java.util.ArrayList; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/MethodArgument.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/MethodArgument.java similarity index 89% rename from code-gen/src/main/java/com/wordnik/codegen/MethodArgument.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/MethodArgument.java index c6c129286f..0e15872996 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/MethodArgument.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/MethodArgument.java @@ -1,6 +1,7 @@ -package com.wordnik.codegen; +package com.wordnik.swagger.codegen; -import com.wordnik.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; public class MethodArgument { diff --git a/code-gen/src/main/java/com/wordnik/codegen/ResourceMethod.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/ResourceMethod.java similarity index 96% rename from code-gen/src/main/java/com/wordnik/codegen/ResourceMethod.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/ResourceMethod.java index f6f0b0f8f0..c3ef2efbd6 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/ResourceMethod.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/ResourceMethod.java @@ -1,6 +1,7 @@ -package com.wordnik.codegen; +package com.wordnik.swagger.codegen; -import com.wordnik.codegen.resource.Model; +import com.wordnik.swagger.codegen.resource.Model; +import com.wordnik.swagger.codegen.resource.Model; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/api/SwaggerApi.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/api/SwaggerApi.java similarity index 91% rename from code-gen/src/main/java/com/wordnik/codegen/api/SwaggerApi.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/api/SwaggerApi.java index e5a88267be..785eb3a1ca 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/api/SwaggerApi.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/api/SwaggerApi.java @@ -1,14 +1,17 @@ -package com.wordnik.codegen.api; +package com.wordnik.swagger.codegen.api; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.WebResource; -import com.wordnik.codegen.config.ApiConfiguration; -import com.wordnik.codegen.config.DataTypeMappingProvider; -import com.wordnik.codegen.config.NamingPolicyProvider; -import com.wordnik.codegen.resource.Endpoint; -import com.wordnik.codegen.resource.Resource; -import com.wordnik.exception.CodeGenerationException; +import com.wordnik.swagger.codegen.config.*; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.resource.Endpoint; +import com.wordnik.swagger.codegen.resource.Endpoint; +import com.wordnik.swagger.codegen.resource.Resource; +import com.wordnik.swagger.codegen.config.ApiConfiguration; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.resource.Resource; +import com.wordnik.swagger.exception.CodeGenerationException; import org.codehaus.jackson.map.DeserializationConfig; import org.codehaus.jackson.map.ObjectMapper; diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/ApiConfiguration.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/ApiConfiguration.java similarity index 97% rename from code-gen/src/main/java/com/wordnik/codegen/config/ApiConfiguration.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/ApiConfiguration.java index 022b009d85..276f05fbaa 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/ApiConfiguration.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/ApiConfiguration.java @@ -1,6 +1,6 @@ -package com.wordnik.codegen.config; +package com.wordnik.swagger.codegen.config; -import com.wordnik.exception.CodeGenerationException; +import com.wordnik.swagger.exception.CodeGenerationException; import java.util.HashMap; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/DataTypeMappingProvider.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/DataTypeMappingProvider.java similarity index 99% rename from code-gen/src/main/java/com/wordnik/codegen/config/DataTypeMappingProvider.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/DataTypeMappingProvider.java index 5aef735cf0..ab88b8a1a9 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/DataTypeMappingProvider.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/DataTypeMappingProvider.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.config; +package com.wordnik.swagger.codegen.config; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/LanguageConfiguration.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/LanguageConfiguration.java similarity index 95% rename from code-gen/src/main/java/com/wordnik/codegen/config/LanguageConfiguration.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/LanguageConfiguration.java index d1b7da75db..1ec94f1faf 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/LanguageConfiguration.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/LanguageConfiguration.java @@ -1,6 +1,6 @@ -package com.wordnik.codegen.config; +package com.wordnik.swagger.codegen.config; -import com.wordnik.exception.CodeGenerationException; +import com.wordnik.swagger.exception.CodeGenerationException; /** * User: deepakmichael diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/NamingPolicyProvider.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/NamingPolicyProvider.java similarity index 98% rename from code-gen/src/main/java/com/wordnik/codegen/config/NamingPolicyProvider.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/NamingPolicyProvider.java index 76ff8e8605..590f57d268 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/NamingPolicyProvider.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/NamingPolicyProvider.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.config; +package com.wordnik.swagger.codegen.config; /** * Implementor of this class is responsible for generating the names for service classes and methods in diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/RulesProvider.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/RulesProvider.java similarity index 92% rename from code-gen/src/main/java/com/wordnik/codegen/config/RulesProvider.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/RulesProvider.java index bed611ccc1..48f9756fc4 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/RulesProvider.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/RulesProvider.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.config; +package com.wordnik.swagger.codegen.config; import java.util.ArrayList; import java.util.HashMap; diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/common/CamelCaseNamingPolicyProvider.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/common/CamelCaseNamingPolicyProvider.java similarity index 92% rename from code-gen/src/main/java/com/wordnik/codegen/config/common/CamelCaseNamingPolicyProvider.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/common/CamelCaseNamingPolicyProvider.java index 82b831138f..1f8b07592c 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/common/CamelCaseNamingPolicyProvider.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/common/CamelCaseNamingPolicyProvider.java @@ -1,8 +1,10 @@ -package com.wordnik.codegen.config.common; +package com.wordnik.swagger.codegen.config.common; -import com.wordnik.codegen.resource.Model; -import com.wordnik.codegen.config.NamingPolicyProvider; -import com.wordnik.exception.CodeGenerationException; +import com.wordnik.swagger.codegen.resource.Model; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.resource.Model; +import com.wordnik.swagger.exception.CodeGenerationException; /** * User: ramesh diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/java/JavaCodeGenRulesProvider.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaCodeGenRulesProvider.java similarity index 83% rename from code-gen/src/main/java/com/wordnik/codegen/config/java/JavaCodeGenRulesProvider.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaCodeGenRulesProvider.java index b45856e67c..84f5c9f508 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/java/JavaCodeGenRulesProvider.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaCodeGenRulesProvider.java @@ -1,6 +1,7 @@ -package com.wordnik.codegen.config.java; +package com.wordnik.swagger.codegen.config.java; -import com.wordnik.codegen.config.RulesProvider; +import com.wordnik.swagger.codegen.config.RulesProvider; +import com.wordnik.swagger.codegen.config.RulesProvider; import java.util.ArrayList; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/java/JavaDataTypeMappingProvider.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaDataTypeMappingProvider.java similarity index 93% rename from code-gen/src/main/java/com/wordnik/codegen/config/java/JavaDataTypeMappingProvider.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaDataTypeMappingProvider.java index 4971f51bc6..3977c3edf4 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/java/JavaDataTypeMappingProvider.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaDataTypeMappingProvider.java @@ -1,8 +1,11 @@ -package com.wordnik.codegen.config.java; +package com.wordnik.swagger.codegen.config.java; -import com.wordnik.codegen.config.DataTypeMappingProvider; -import com.wordnik.codegen.config.NamingPolicyProvider; -import com.wordnik.codegen.config.common.CamelCaseNamingPolicyProvider; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.common.CamelCaseNamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.common.CamelCaseNamingPolicyProvider; import java.util.ArrayList; import java.util.HashMap; diff --git a/code-gen/src/main/java/com/wordnik/codegen/config/java/JavaLibCodeGen.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaLibCodeGen.java similarity index 67% rename from code-gen/src/main/java/com/wordnik/codegen/config/java/JavaLibCodeGen.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaLibCodeGen.java index 9cb1ee8182..39f0717d1c 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/config/java/JavaLibCodeGen.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/config/java/JavaLibCodeGen.java @@ -1,10 +1,10 @@ -package com.wordnik.codegen.config.java; +package com.wordnik.swagger.codegen.config.java; -import com.wordnik.codegen.DriverCodeGenerator; -import com.wordnik.codegen.config.ApiConfiguration; -import com.wordnik.codegen.config.LanguageConfiguration; -import com.wordnik.codegen.config.common.CamelCaseNamingPolicyProvider; -import com.wordnik.exception.CodeGenerationException; +import com.wordnik.swagger.codegen.DriverCodeGenerator; +import com.wordnik.swagger.codegen.config.ApiConfiguration; +import com.wordnik.swagger.codegen.config.LanguageConfiguration; +import com.wordnik.swagger.codegen.config.common.CamelCaseNamingPolicyProvider; +import com.wordnik.swagger.exception.CodeGenerationException; import java.util.ArrayList; import java.util.List; @@ -44,21 +44,21 @@ public class JavaLibCodeGen extends DriverCodeGenerator { apiConfiguration.setModelBaseClass("WordnikObject"); List defaultModelImports = new ArrayList(); - defaultModelImports.add("com.wordnik.common.WordListType"); - defaultModelImports.add("com.wordnik.common.StringValue"); - defaultModelImports.add("com.wordnik.common.Size"); - defaultModelImports.add("com.wordnik.common.WordnikObject"); + defaultModelImports.add("com.wordnik.swagger.common.WordListType"); + defaultModelImports.add("com.wordnik.swagger.common.StringValue"); + defaultModelImports.add("com.wordnik.swagger.common.Size"); + defaultModelImports.add("com.wordnik.swagger.common.WordnikObject"); List defaultServiceImports = new ArrayList(); - defaultServiceImports.add("com.wordnik.model.Long"); - defaultServiceImports.add("com.wordnik.common.*"); - defaultServiceImports.add("com.wordnik.common.ext.*"); + defaultServiceImports.add("com.wordnik.swagger.model.Long"); + defaultServiceImports.add("com.wordnik.swagger.common.*"); + defaultServiceImports.add("com.wordnik.swagger.common.ext.*"); apiConfiguration.setDefaultModelImports(defaultModelImports); apiConfiguration.setDefaultServiceImports(defaultServiceImports); - apiConfiguration.setModelPackageName("com.wordnik.model"); - apiConfiguration.setApiPackageName("com.wordnik.api"); + apiConfiguration.setModelPackageName("com.wordnik.swagger.model"); + apiConfiguration.setApiPackageName("com.wordnik.swagger.api"); apiConfiguration.setApiKey("myKey"); apiConfiguration.setApiUrl("http://swagr.api.wordnik.com/v4/"); @@ -72,8 +72,8 @@ public class JavaLibCodeGen extends DriverCodeGenerator { javaConfiguration.setClassFileExtension(".java"); javaConfiguration.setOutputDirectory(outputPath); javaConfiguration.setTemplateLocation("conf/java/templates"); - javaConfiguration.setExceptionPackageName("com.wordnik.exception"); - javaConfiguration.setAnnotationPackageName("com.wordnik.annotations"); + javaConfiguration.setExceptionPackageName("com.wordnik.swagger.exception"); + javaConfiguration.setAnnotationPackageName("com.wordnik.swagger.annotations"); return javaConfiguration; } diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiModelDefn.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiModelDefn.java similarity index 87% rename from code-gen/src/main/java/com/wordnik/codegen/resource/ApiModelDefn.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiModelDefn.java index 062664052e..9a94391d35 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiModelDefn.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiModelDefn.java @@ -1,6 +1,7 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; -import com.wordnik.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; import org.codehaus.jackson.annotate.JsonProperty; /** diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiModelListWrapper.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiModelListWrapper.java similarity index 94% rename from code-gen/src/main/java/com/wordnik/codegen/resource/ApiModelListWrapper.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiModelListWrapper.java index 38cace3977..3534bca60c 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiModelListWrapper.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiModelListWrapper.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; import org.codehaus.jackson.annotate.JsonAnyGetter; import org.codehaus.jackson.annotate.JsonAnySetter; diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiPropertyDefn.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiPropertyDefn.java similarity index 98% rename from code-gen/src/main/java/com/wordnik/codegen/resource/ApiPropertyDefn.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiPropertyDefn.java index 7036f1ada1..2c6e39f55b 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiPropertyDefn.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiPropertyDefn.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; import org.codehaus.jackson.annotate.JsonAnyGetter; import org.codehaus.jackson.annotate.JsonAnySetter; diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiPropertyListWrapper.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiPropertyListWrapper.java similarity index 94% rename from code-gen/src/main/java/com/wordnik/codegen/resource/ApiPropertyListWrapper.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiPropertyListWrapper.java index 446330b3fe..d35e4f5ef4 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/ApiPropertyListWrapper.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ApiPropertyListWrapper.java @@ -1,6 +1,7 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; -import com.wordnik.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; import org.codehaus.jackson.annotate.JsonAnyGetter; import org.codehaus.jackson.annotate.JsonAnySetter; import org.codehaus.jackson.map.annotate.JsonSerialize; diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/Endpoint.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Endpoint.java similarity index 89% rename from code-gen/src/main/java/com/wordnik/codegen/resource/Endpoint.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Endpoint.java index d180155120..21eb3097d0 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/Endpoint.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Endpoint.java @@ -1,8 +1,11 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; -import com.wordnik.codegen.ResourceMethod; -import com.wordnik.codegen.config.DataTypeMappingProvider; -import com.wordnik.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.ResourceMethod; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.ResourceMethod; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; import java.util.ArrayList; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/EndpointOperation.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/EndpointOperation.java similarity index 95% rename from code-gen/src/main/java/com/wordnik/codegen/resource/EndpointOperation.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/EndpointOperation.java index ddd5de9422..c16a3ecf97 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/EndpointOperation.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/EndpointOperation.java @@ -1,9 +1,13 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; -import com.wordnik.codegen.MethodArgument; -import com.wordnik.codegen.ResourceMethod; -import com.wordnik.codegen.config.DataTypeMappingProvider; -import com.wordnik.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.MethodArgument; +import com.wordnik.swagger.codegen.ResourceMethod; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.MethodArgument; +import com.wordnik.swagger.codegen.ResourceMethod; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; import java.util.ArrayList; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/ErrorResponse.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ErrorResponse.java similarity index 90% rename from code-gen/src/main/java/com/wordnik/codegen/resource/ErrorResponse.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ErrorResponse.java index 37d4122e2d..f5f1871dbd 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/ErrorResponse.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ErrorResponse.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; /** * Created by IntelliJ IDEA. diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/Model.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Model.java similarity index 94% rename from code-gen/src/main/java/com/wordnik/codegen/resource/Model.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Model.java index 34dcc52775..35d97cc079 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/Model.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Model.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/ModelField.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ModelField.java similarity index 95% rename from code-gen/src/main/java/com/wordnik/codegen/resource/ModelField.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ModelField.java index bd4e999369..c07f7fe315 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/ModelField.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/ModelField.java @@ -1,7 +1,9 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; -import com.wordnik.codegen.FieldDefinition; -import com.wordnik.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.FieldDefinition; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.FieldDefinition; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; import java.util.ArrayList; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/Resource.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Resource.java similarity index 86% rename from code-gen/src/main/java/com/wordnik/codegen/resource/Resource.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Resource.java index 25fde6ee06..bb752713c3 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/Resource.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Resource.java @@ -1,8 +1,11 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; -import com.wordnik.codegen.ResourceMethod; -import com.wordnik.codegen.config.DataTypeMappingProvider; -import com.wordnik.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.ResourceMethod; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.ResourceMethod; +import com.wordnik.swagger.codegen.config.DataTypeMappingProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; import org.codehaus.jackson.annotate.JsonCreator; import org.codehaus.jackson.annotate.JsonProperty; @@ -20,7 +23,7 @@ public class Resource { private String apiVersion; //TODO rename the JSON property too after the sandbox var has been renamed - @JsonProperty("swagrVersion") + @JsonProperty("swaggerVersion") private String swaggerVersion; @JsonProperty("apis") @@ -50,7 +53,7 @@ public class Resource { } //TODO rename the JSON property too after the sandbox var has been renamed - @JsonProperty("swagrVersion") + @JsonProperty("swaggerVersion") public String getSwaggerVersion() { return swaggerVersion; } diff --git a/code-gen/src/main/java/com/wordnik/codegen/resource/Response.java b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Response.java similarity index 93% rename from code-gen/src/main/java/com/wordnik/codegen/resource/Response.java rename to code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Response.java index 816d6edba4..09d56eeb61 100644 --- a/code-gen/src/main/java/com/wordnik/codegen/resource/Response.java +++ b/code-gen/src/main/java/com/wordnik/swagger/codegen/resource/Response.java @@ -1,4 +1,4 @@ -package com.wordnik.codegen.resource; +package com.wordnik.swagger.codegen.resource; import java.util.List; diff --git a/code-gen/src/main/java/com/wordnik/exception/CodeGenerationException.java b/code-gen/src/main/java/com/wordnik/swagger/exception/CodeGenerationException.java similarity index 92% rename from code-gen/src/main/java/com/wordnik/exception/CodeGenerationException.java rename to code-gen/src/main/java/com/wordnik/swagger/exception/CodeGenerationException.java index 7b55cb2852..308f4a2733 100644 --- a/code-gen/src/main/java/com/wordnik/exception/CodeGenerationException.java +++ b/code-gen/src/main/java/com/wordnik/swagger/exception/CodeGenerationException.java @@ -1,4 +1,4 @@ -package com.wordnik.exception; +package com.wordnik.swagger.exception; /** * Exception raised while generating code for java driver. diff --git a/java/src/test/java/com/wordnik/test/APITestRunner.java b/java/src/test/java/com/wordnik/test/APITestRunner.java index 5f4991708e..17e0c0b63f 100644 --- a/java/src/test/java/com/wordnik/test/APITestRunner.java +++ b/java/src/test/java/com/wordnik/test/APITestRunner.java @@ -11,11 +11,13 @@ import java.io.BufferedReader; import java.io.FileReader; import java.io.InputStreamReader; -import com.wordnik.codegen.config.ApiConfiguration; -import com.wordnik.codegen.config.NamingPolicyProvider; -import com.wordnik.codegen.config.common.CamelCaseNamingPolicyProvider; +import com.wordnik.swagger.codegen.config.ApiConfiguration; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.common.CamelCaseNamingPolicyProvider; import com.wordnik.common.*; import com.wordnik.exception.APIException; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.common.CamelCaseNamingPolicyProvider; import org.apache.commons.beanutils.MethodUtils; import org.apache.commons.beanutils.PropertyUtils; import org.codehaus.jackson.map.ObjectMapper; diff --git a/java/src/test/java/com/wordnik/test/TestCaseExecutor.java b/java/src/test/java/com/wordnik/test/TestCaseExecutor.java index 8cc69e29d8..bcf6b638ad 100644 --- a/java/src/test/java/com/wordnik/test/TestCaseExecutor.java +++ b/java/src/test/java/com/wordnik/test/TestCaseExecutor.java @@ -2,13 +2,17 @@ package com.wordnik.test; import com.wordnik.annotations.MethodArgumentNames; import com.wordnik.api.WordAPI; -import com.wordnik.codegen.config.ApiConfiguration; -import com.wordnik.codegen.config.RulesProvider; -import com.wordnik.codegen.config.java.JavaCodeGenRulesProvider; -import com.wordnik.codegen.config.NamingPolicyProvider; -import com.wordnik.codegen.config.common.CamelCaseNamingPolicyProvider; +import com.wordnik.swagger.codegen.config.ApiConfiguration; +import com.wordnik.swagger.codegen.config.*; +import com.wordnik.swagger.codegen.config.common.CamelCaseNamingPolicyProvider; +import com.wordnik.swagger.codegen.config.java.JavaCodeGenRulesProvider; +import com.wordnik.swagger.codegen.config.common.CamelCaseNamingPolicyProvider; import com.wordnik.exception.APIException; import com.wordnik.exception.APIExceptionCodes; +import com.wordnik.swagger.codegen.config.ApiConfiguration; +import com.wordnik.swagger.codegen.config.NamingPolicyProvider; +import com.wordnik.swagger.codegen.config.RulesProvider; +import com.wordnik.swagger.codegen.config.java.JavaCodeGenRulesProvider; import org.apache.commons.beanutils.BeanUtils; import org.codehaus.jettison.json.JSONObject; @@ -26,7 +30,7 @@ import java.util.Map; */ public class TestCaseExecutor { - public ApiConfiguration config = new ApiConfiguration(); + public ApiConfiguration config = new com.wordnik.swagger.codegen.config.ApiConfiguration(); private NamingPolicyProvider namingPolicyProvider = new CamelCaseNamingPolicyProvider(); private RulesProvider rulesProvider = new JavaCodeGenRulesProvider();