
This commit adds adapters and serializers for v3, but also a fallback serializer for v2, which allows to handle v2 and v3 payloads at the same time. This is needed, because when we use v3 endpoint for one of the models (in this case repo), we can also get embedded records of other types (like branch or build).
11 lines
264 B
CoffeeScript
11 lines
264 B
CoffeeScript
`import Ember from 'ember'`
|
|
`import V2FallbackSerializer from 'travis/serializers/v2_fallback'`
|
|
|
|
Serializer = V2FallbackSerializer.extend
|
|
isNewSerializerAPI: true
|
|
attrs: {
|
|
_lastBuildDuration: { key: 'last_build_duration' }
|
|
}
|
|
|
|
`export default Serializer`
|