Open m0nk3y2k4 opened 2 years ago
@m0nk3y2k4 thank you for reporting. I have ticketed.
Internal ticket for our reference - https://mediamorph.atlassian.net/browse/TVD-2616
@antheaezzell for the sake of completeness: Looks like the described behavior is not limited to the aforementioned Companies endpoints but also occurs on other endpoints that return (nested) company information.
For example,
contain the additional parentCompany
property whereas
don't.
Thanks for the additional examples @m0nk3y2k4 I have added them to the aforementioned ticket.
Hey there, while playing around with the various "Companies" endpoints I noticed the following behavior:
According to the OpenAPI documentation, the
/companies/{id}
endpoint should returns records of type#/components/schemas/Company
. However, looking at the actual JSON, it seems like all(?) companies contain some additional property which is not declared in the corresponding schema inside the OpenAPI documentation:According to its name and the contained fields, this property seems to be a
#/components/schemas/CompanyType
.Moreover, for some companies another undocumented property is returned within the JSON which does not match to any of the declared schemas though:
And now it gets a bit weird:
companyType
property seems to be always included in the JSON returned by the/companies/{id}
as well as the/companies
(getAllCompanies) endpoint. So far so good.parentCompany
property though never shows up when invoking the/companies
endpoint. As for the/companies/{id}
endpoint, it seems this property is only returned for specific companies but not for all.Here some practical examples
1. https://api4.thetvdb.com/v4/companies/266 - Some company that doesn't contain a `parentCompany` property ```json "data": { "id": 266, "name": "The Weather Channel", "slug": "the-weather-channel", "nameTranslations": [ "eng" ], "overviewTranslations": [], "aliases": [], "country": "usa", "primaryCompanyType": 1, "activeDate": null, "inactiveDate": null, "companyType": { "companyTypeId": 0, "companyTypeName": "" } } ``` 2. https://api4.thetvdb.com/v4/companies/47816 - Some other company that contains a `parentCompany` property ```json "data": { "id": 47816, "name": "Universal Content Productions", "slug": "universal-content-productions", "nameTranslations": [ "eng" ], "overviewTranslations": [ "eng" ], "aliases": [ { "language": "eng,Universal Cable Productions", "name": "UCP" } ], "country": "usa", "primaryCompanyType": 3, "activeDate": null, "inactiveDate": null, "companyType": { "companyTypeId": 0, "companyTypeName": "" }, "parentCompany": { "id": 30319, "name": "NBCUniversal", "relation": { "id": 0 } } } ``` 3. https://api4.thetvdb.com/v4/companies?page=93 - Same company as above but this time contains no `parentCompany` property ```json {...}, { "id": 47816, "name": "Universal Content Productions", "slug": "universal-content-productions", "nameTranslations": [ "eng" ], "overviewTranslations": [ "eng" ], "aliases": [ { "language": "eng,Universal Cable Productions", "name": "UCP" } ], "country": "usa", "primaryCompanyType": 3, "activeDate": null, "inactiveDate": null, "companyType": { "companyTypeId": 0, "companyTypeName": "" } }, {...} ```