Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Methods that return ObjectOrStatus don't work... #44

Closed
brendandburns opened this issue Nov 3, 2017 · 0 comments · Fixed by #47
Closed

Methods that return ObjectOrStatus don't work... #44

brendandburns opened this issue Nov 3, 2017 · 0 comments · Fixed by #47

Comments

@brendandburns
Copy link
Contributor

This is a general problem with our current Kubernetes Swagger, Create and Delete can return an object or a Status, the Swagger isn't set up to handle that properly. It tries to parse and it dies:

Unhandled Exception: System.AggregateException: One or more errors occurred. (Unable to deserialize the response.) ---> Microsoft.Rest.SerializationException: Unable to deserialize the respo
nse. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path 'status', line 1, position 305.
   at Newtonsoft.Json.JsonTextReader.ReadStringValue(ReadType readType)
   at Newtonsoft.Json.JsonTextReader.ReadAsString()
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerC
ontract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings settings)
   at k8s.Kubernetes.<DeleteNamespaceWithHttpMessagesAsync>d__173.MoveNext() in /mnt/c/Users/bburns/kubernetes-client/csharp/src/generated/Kubernetes.cs:line 29720
   --- End of inner exception stack trace ---
   at k8s.Kubernetes.<DeleteNamespaceWithHttpMessagesAsync>d__173.MoveNext() in /mnt/c/Users/bburns/kubernetes-client/csharp/src/generated/Kubernetes.cs:line 29729
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
   at simple.NamespaceExample.Main(String[] args) in /mnt/c/Users/bburns/kubernetes-client/csharp/examples/namespace/Namespace.cs:line 38

This is similar to: kubernetes-client/java#86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant