-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Milestone
Description
Description
When exporting to Android enums are generated as:
public enum GenderIdEnum {
0, 1, 2,
};
Versus a potential workaround:
public enum GenderIdEnum {
Zero(0), One(1), Two(2);
private int value;
private GenderIdEnum(int value) {
this.value = value;
}
public int getValue() {
return value;
}
};
Swagger-codegen version
Using: http://editor.swagger.io/#/
Loading from URL:
https://polling.arena.razerzone.com/swagger/docs/v1
Exporting to Android.
Importing to Android Studio.
Gradle reports the enum syntax error.
Steps to reproduce
-
File Import URL:
https://polling.arena.razerzone.com/swagger/docs/v1 -
Generate Client Android
-
Unpack zip file
-
Import as new project in Android Studio
-
See the gradle compile error
Related issues
Suggest a Fix
public enum GenderIdEnum {
Zero(0), One(1), Two(2);
private int value;
private GenderIdEnum(int value) {
this.value = value;
}
public int getValue() {
return value;
}
};