Add Payload property in the Video Model - #2
Closed
tgallice wants to merge 1 commit into
Closed
Conversation
Owner
|
Thanks! I merged this in at 303b163. |
Owner
|
Actually, I'm not really sure anymore if it is a good idea to fail when hitting unknown property. Instead those could be silently ignored. What do think? |
Contributor
|
@xabbuh ignoring unknown properties would indeed be safer. Adding additional properties in an API response is generally not considered as a BC breaking change, so clients should accept them even if they are not able to use them. |
xabbuh
added a commit
that referenced
this pull request
Jul 10, 2014
These changes are namely (in chronological order): * added a payload property to the ``Video`` model (by @tgallice in #2) * additional options (a list of profiles to be used, a custom path format a payload) can be passed to the methods ``CloudInterface::encodeVideoByUrl()`` and ``ClientInterface::encodeVideoFile()``
xabbuh
added a commit
that referenced
this pull request
Jul 10, 2014
As pointed out in #2, additional properties that are not defined in the model classes lead to exceptions thrown by the normalizer. Since, those additional properties are no backward compatibility breaks in an API, they could be added on the remote site without any notification and must not break the client.
xabbuh
added a commit
that referenced
this pull request
Jul 10, 2014
As pointed out in #2, additional properties that are not defined in the model classes lead to exceptions thrown by the normalizer. Since, those additional properties are no backward compatibility breaks in an API, they could be added on the remote site without any notification and must not break the client.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Actually the Video Model don't have the
payloadproperty. The issue is when we want to transform a Json response with thepayloadattribute to a Video object. An error is raise by the Normalizer who doesn't find the setter