Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AS3 codegen: Provided the api and model package names to LibraryRefer…

…ences object to make sure classes are located
  • Loading branch information...
commit 0dda2fdfe6d63cd96a01c369d18f52f9446762bb 1 parent 20d0da1
@deepak-michael authored
View
2  conf/as3/structure/src/main/as3/com/wordnik/swagger/common/ApiInvoker.as
@@ -6,7 +6,7 @@ package com.wordnik.swagger.common
import com.wordnik.swagger.event.ApiClientEvent;
import com.wordnik.swagger.event.Response;
import com.wordnik.swagger.common.ApiUserCredentials;
- import com.wordnik.swagger.model.LibraryReferences;
+ import com.wordnik.swagger.common.LibraryReferences;
import flash.events.EventDispatcher;
import flash.utils.Dictionary;
View
5 conf/as3/templates/ReferencesObject.st
@@ -1,6 +1,7 @@
-package $packageName$ {
+package com.wordnik.swagger.common {
-import com.wordnik.swagger.api.*;
+import $apiPackageName$.*;
+import $modelPackageName$.*;
$imports:{ import |
import $import$;
View
6 src/main/java/com/wordnik/swagger/codegen/config/as3/As3LibCodeGen.java
@@ -139,8 +139,10 @@ private void generateReferencesObject(List<Resource> resources, StringTemplateGr
template.setAttribute("annotationPackageName", languageConfig.getAnnotationPackageName());
template.setAttribute("extends", config.getDefaultModelBaseClass());
template.setAttribute("className", referencesModel.getGenratedClassName());
- template.setAttribute(PACKAGE_NAME, config.getModelPackageName());
- File aFile = new File(languageConfig.getModelClassLocation()+referencesModel.getGenratedClassName()+languageConfig.getClassFileExtension());
+ template.setAttribute("modelPackageName", config.getModelPackageName());
+ template.setAttribute("apiPackageName", config.getApiPackageName());
+ File aFile = new File(languageConfig.getLibraryHome() + "/src/main/as3/com/wordnik/swagger/common/" +
+ referencesModel.getGenratedClassName() + languageConfig.getClassFileExtension());
writeFile(aFile, template.toString(), "Model class");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.