You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* APIv3: add more generic fields
Add `aliases` field to the `VersionSerializer` that's used to serialize
`Version` objects. This field is a list of versions the current version "points
to". Example `latest` version "points to" `origin/main`, and `stable` version
"points to" `v3.12`.
This is known in the code as "original stable/latest version".
Besides, this PR adds `versions.stable` and `versions.latest` fields to the
addons API which will be useful to solve front-end issues in a more generic way.
* Update test cases to match changes
* Update documentation to mention the `aliases`
* Expose generic fields (`projects.translations`, `versions.active`)
This is the pattern I want to have here, serializing the full object instead of
a few small set of fields. This is a lot more generic, simplifies the
interaction between the API and JS Addons.
Besides, it exposes the same objects as the regular APIv3 which won't change
over time.
* Optimizations
* Cache more method on `Resolver`
* Simplification of API response
* Use a shared `Resolver` instance to resolve version URLs
* ToDo comment for future optimization
* Adapt num queries from tests
* Update tests to match changes
* Update addons tests to match changes
* Update tests to not share the resolver instance
* Typo
* Add `urls.donwloads` to Project serializer
* Share a `Resolver()` between different serializers
A better way of resolving this issue will be done in
#10456
* Pass `version_slug` to be able to build URLs that point to a version
* Test updates
* Update test JSON responses for `urls.downloads` field
* Update JSON responses
* Increase `api_version` on JSON responses
* Remove old comment
We are sorting the translations in the front end
* Fix proxito dummy URLs
* Updates from review
0 commit comments