Commit 7b03ddbb authored by Eliot Berriot's avatar Eliot Berriot 💬

Fix #224 and #226: changelog and documentation

parent a8baf8fa
Retructured music API to increase performance and remove useless endpoints (#224)
Music API changes
^^^^^^^^^^^^^^^^^
This release includes an API break. Even though the API is advertised
as unstable, and not documented, here is a brief explanation of the change in
case you are using the API in a client or in a script. Summary of the changes:
- ``/api/v1/artists`` does not includes a list of tracks anymore. It was to heavy
to return all of this data all the time. You can get all tracks for an
artist using ``/api/v1/tracks?artist=artist_id``
- Additionally, ``/api/v1/tracks`` now support an ``album`` filter to filter
tracks matching an album
- ``/api/v1/artists/search``, ``/api/v1/albums/search`` and ``/api/v1/tracks/search``
endpoints are removed. Use ``/api/v1/{artists|albums|tracks}/?q=yourquery``
instead. It's also more powerful, since you can combine search with other
filters and ordering options.
- ``/api/v1/requests/import-requests/search`` endpoint is removed as well.
Use ``/api/v1/requests/import-requests/?q=yourquery``
instead. It's also more powerful, since you can combine search with other
filters and ordering options.
Of course, the front-end was updated to work with the new API, so this should
not impact end-users in any way, apart from slight performance gains.
.. note::
The API is still not stable and may evolve again in the future. API freeze
will come at a later point.
Empty save button in radio builder (#226)
...@@ -130,7 +130,7 @@ services: ...@@ -130,7 +130,7 @@ services:
ports: ports:
- '8002:8080' - '8002:8080'
volumes: volumes:
- "./api/docs/swagger.yml:/usr/share/nginx/html/swagger.yml" - "./docs/swagger.yml:/usr/share/nginx/html/swagger.yml"
networks: networks:
internal: internal:
......
...@@ -78,7 +78,7 @@ paths: ...@@ -78,7 +78,7 @@ paths:
results: results:
type: "array" type: "array"
items: items:
$ref: "#/definitions/ArtistNested" $ref: "#/definitions/ArtistWithAlbums"
properties: properties:
resultsCount: resultsCount:
...@@ -106,7 +106,7 @@ definitions: ...@@ -106,7 +106,7 @@ definitions:
creation_date: creation_date:
type: "string" type: "string"
format: "date-time" format: "date-time"
ArtistNested: ArtistWithAlbums:
type: "object" type: "object"
allOf: allOf:
- $ref: "#/definitions/Artist" - $ref: "#/definitions/Artist"
...@@ -115,7 +115,7 @@ definitions: ...@@ -115,7 +115,7 @@ definitions:
albums: albums:
type: "array" type: "array"
items: items:
$ref: "#/definitions/AlbumNested" $ref: "#/definitions/ArtistAlbum"
Album: Album:
type: "object" type: "object"
...@@ -143,16 +143,16 @@ definitions: ...@@ -143,16 +143,16 @@ definitions:
format: "date" format: "date"
example: "2001-01-01" example: "2001-01-01"
AlbumNested: ArtistAlbum:
type: "object" type: "object"
allOf: allOf:
- $ref: "#/definitions/Album" - $ref: "#/definitions/Album"
- type: "object" - type: "object"
properties: properties:
tracks: tracks_count:
type: "array" type: "integer"
items: format: "int64"
$ref: "#/definitions/Track" example: 16
Track: Track:
type: "object" type: "object"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment