-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Labels
lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.
Description
When I run the generation for java I am getting code that doesn't compile. The errors all say
Non-static method 'getGson()' cannot be referenced from a static context
It looks like the following methods are being added to my all my models and
/**
* Create an instance of V1MyObject given an JSON string
*
* @param jsonString JSON string
* @return An instance of V1MyObject
* @throws IOException if the JSON string is invalid with respect to V1MyObject
*/
public static V1MyObject fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, V1MyObject.class);
}
/**
* Convert an instance of V1MyObject to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
JSON is referring toio.kubernetes.client.openapi.JSON
and that method is defined as follows:
public JSON setGson(Gson gson) {
this.gson = gson;
return this;
}
I noticed that the JSON.java file looks like it wasn't updated at the same time as the other files in there. All the other ones say there were Automated from openapi generation release 1.27. Not sure if that helps at all.

Metadata
Metadata
Assignees
Labels
lifecycle/staleDenotes an issue or PR has remained open with no activity and has become stale.Denotes an issue or PR has remained open with no activity and has become stale.