Align type definitions with OpenAPI spec
Opened this issue · 1 comments
There are a couple of fields whose types I'm not sure about.
For example, various album fields like name, explicit etc are defined to be optional:
python-tidal/tidalapi/album.py
Lines 45 to 71 in 67581e8
But in the Tidal OpenAPI spec they are required:
curl https://tidal-music.github.io/tidal-api-reference/tidal-api-oas.json | jq .components.schemas.Albums_Attributes.required
[
"barcodeId",
"duration",
"explicit",
"mediaTags",
"numberOfItems",
"numberOfVolumes",
"popularity",
"title",
"type"
]IDs are also required just based on the JSON:API spec.
Are you happy with a PR to align these types with the OpenAPI spec?
FYI tidalapi is developed by reverse engineering the closed API and is therefore not directly corresponding with the OpenAPI.
So before making such changes, it is necessary to make sure the closed API and OpenAPI endpoints actually use the same type definitions. It's likely that they follow a similar spec, but it would need to be verified by making experiments IMO.
PRs are of course very welcome 👍