You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Swagger JSON generated on the api framework isn't Java compliant and it needs to be if we are going to generate an Android compliant jar. As the plugin automatically generates the JSON based on your function and object names it will require significant changes to your code. At the moment the issues that stick out are:
some of your endpoints have a '-' in their name. In the SDK they equate to method names; java doesn't allow '-' in method names.
there are issues with model objects and their cases, the swagger code generator created the files with lower case e.g. account.java and name the class inside that file with a capital at the start e.g. public class Account. The result is that files won't compile! You may need to capitalise your object models, even if this goes against the python ethos. In the generate-graph-api-sdk.sh file I added a line to capitalise the files (ls | awk '{system("mv " $0 " " toupper(substr($0,1,1)) substr($0,2))}') but there are still problems with capital letters in the VApi.java file.
Some of the JSON is missing a type. When this is the case the auto-generated Java has method signatures that are missing the Object definition. e.g. public Status createAccount(details) where it should be public Status createAccount( AccountDetails details).
To generate the SDK pull the latest version of the vagrant environment, run the provision script, start openi, cd to the openi_android_sdk module and run the build-graph-api-sdk.sh file.
We had the same problems with the cloudlet framework but with the help of Velti we managed to update the JSON to eliminate the problems. If I cannot be contacted for assistance you may try Timos.
The text was updated successfully, but these errors were encountered:
Hello Donal,
I noticed the problem and I think this is clearly a version issue.
I will try to automatically update the swagger version from 1.1 to 1.2, otherwise we will have to do this by hand.
Either way, this is my major priority at the moment!
Do you write directly the swagger json description of the cloudlet or this is exported with some tool (like we used until now the tastypie-swagger)?
I did some digging around the django-tastypie-swagger plugin and I don't think that a 1.2 compliant version is available. You'll have to fix the issues with the 1.1 version.
Its down to the names that you give your objects in python, they are translated into swagger JSON by the plugin. What ever you name your objects dictates the JSON which dictates the Java Object and method signatures.
Hi,
The Swagger JSON generated on the api framework isn't Java compliant and it needs to be if we are going to generate an Android compliant jar. As the plugin automatically generates the JSON based on your function and object names it will require significant changes to your code. At the moment the issues that stick out are:
To generate the SDK pull the latest version of the vagrant environment, run the provision script, start openi, cd to the openi_android_sdk module and run the build-graph-api-sdk.sh file.
---- From within the machine ----
We had the same problems with the cloudlet framework but with the help of Velti we managed to update the JSON to eliminate the problems. If I cannot be contacted for assistance you may try Timos.
The text was updated successfully, but these errors were encountered: