Skip to content

Add IntOrString model and GSON adapter#108

Merged
brendandburns merged 1 commit into
kubernetes-client:masterfrom
lewisheadden:IntOrStringSupport
Nov 3, 2017
Merged

Add IntOrString model and GSON adapter#108
brendandburns merged 1 commit into
kubernetes-client:masterfrom
lewisheadden:IntOrStringSupport

Conversation

@lewisheadden

@lewisheadden lewisheadden commented Nov 1, 2017

Copy link
Copy Markdown
Contributor

Add an IntOrString model along with its type adapter. This type allows us to receive a type from the API and then re-serialize it without changing its type. Previously all values received from the API were converted to strings. This meant that if returned to the API, the API would respond with a 400 Bad Request because the type was not always as expected (e.g. maxUnavailable should either be an int or a String that ends with a % - if previously 1 had been specified it would be rejected as it was not 1%).

There will be a corresponding PR in the gen repo for this.

@brendandburns

Copy link
Copy Markdown
Contributor

LGTM.

@brendandburns brendandburns merged commit ca70501 into kubernetes-client:master Nov 3, 2017
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 this pull request may close these issues.

2 participants