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

Mdk/everything codable #910

Merged
merged 3 commits into from
Nov 8, 2018
Merged

Mdk/everything codable #910

merged 3 commits into from
Nov 8, 2018

Conversation

mkistler
Copy link

@mkistler mkistler commented Nov 8, 2018

This PR changes all model definitions to be Codable, replacing the previous scheme that used Encodable for models only used in requests and Decodable for models only expected to be returned in responses.

The original rationale for using either Encodable or Decodable was to avoid generating the encode or decode methods when they were not needed by the SDK. But we now rely on Swift to synthesize the encoding/decoding logic in most cases -- "additionalProperties" is an exception, but only affects a few classes.

Making all the models "Codable" makes them more flexible and will allow features like pretty-printing (which needs the class to be "Encodable") to be implemented easily.

@AnthonyOliveri AnthonyOliveri merged commit 3228395 into v1.0 Nov 8, 2018
@AnthonyOliveri AnthonyOliveri deleted the mdk/everything-codable branch November 9, 2018 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants