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
First, your TVDBApi V4 library is by far the cleanest and easiest to use; other OpenAPI to C# generators make a real mess out of the generated code.
As of 20 July 2023 using Visual Studio 2023 (free version) and dotnet6, GenerateDto and ManualTest are no longer compatible with the current swagger 4.7.5 documentation. In particular
(a) in CodeBuilder.cs MethodNameMap I added the following items (not sure if these are correct or not, but got it to run)
{ "getAllEpisodes", "Episodes" },
{ "getAllPeople", "People" },
{ "getListBySlug", "List" },
{ "getMovieBaseBySlug", "Movie" },
{ "getSearchResultsByRemoteId", "SearchRemote" },
{ "getSeriesBaseBySlug", "Series" },
{ "getSeriesNextAired", "SeriesNextAired" },
{ "getUserInfo", "UserInfo" },
{ "getUserInfoById", "UserInfo" },
(b) in CodeBuilder.cs comment out the following items in Dictionary (no longer needed because they're correctly handled by the yml I think)
EpisodeExtendedRecordDto
MovieExtendedRecordDto
PeopleExtendedRecordDto
SeriesExtendedRecordDto
(c) the UserInfo schema is not being generated correctly for the "/user" and "/user/{id}" API calls. The problem can be seen at line 70 of Program.cs in GenerateDto if you set a breakpoint when path == "/user" then returnType is left set to "unknown".
(d) the generated TvDbClientGenerated.cs had to be modified as follows:
changed "boolean" to "bool" in a few places (they are obvious, it won't build)
(e) comment out the following tests which won't run in ManualTests Program.cs
Test("ListExtended(6007)", await client.ListExtended(6007));
Test("Search(Query = stargate)", await client.Search(new SearchOptionalParams { Query = "stargate" }));
Test("SeasonTranslation(530667, 'eng')", await client.SeasonTranslation(530667, "eng"));
... obviously there were no tests for /user and any other new API's which would not have run correctly.
None of this is holding up my work for what I need, I just thought that you may find my 6 hours of debugging helpful if/when you next open up the project.
Again, thanks for a tremendously helpful and well written project!
The text was updated successfully, but these errors were encountered:
Hi @alanmartello for spending the time. Unfortunately currently I don't have the time to support this project and I don't know when I will. I haven't needed it since 2016 and It's hard for me to justify the time when I have other priorities. I don't have any intention to abandon the project. I will get back to it at some point and will use what you've learned debugging the API.
First, your TVDBApi V4 library is by far the cleanest and easiest to use; other OpenAPI to C# generators make a real mess out of the generated code.
As of 20 July 2023 using Visual Studio 2023 (free version) and dotnet6, GenerateDto and ManualTest are no longer compatible with the current swagger 4.7.5 documentation. In particular
(a) in CodeBuilder.cs MethodNameMap I added the following items (not sure if these are correct or not, but got it to run)
{ "getAllEpisodes", "Episodes" },
{ "getAllPeople", "People" },
{ "getListBySlug", "List" },
{ "getMovieBaseBySlug", "Movie" },
{ "getSearchResultsByRemoteId", "SearchRemote" },
{ "getSeriesBaseBySlug", "Series" },
{ "getSeriesNextAired", "SeriesNextAired" },
{ "getUserInfo", "UserInfo" },
{ "getUserInfoById", "UserInfo" },
(b) in CodeBuilder.cs comment out the following items in Dictionary (no longer needed because they're correctly handled by the yml I think)
EpisodeExtendedRecordDto
MovieExtendedRecordDto
PeopleExtendedRecordDto
SeriesExtendedRecordDto
(c) the UserInfo schema is not being generated correctly for the "/user" and "/user/{id}" API calls. The problem can be seen at line 70 of Program.cs in GenerateDto if you set a breakpoint when path == "/user" then returnType is left set to "unknown".
(d) the generated TvDbClientGenerated.cs had to be modified as follows:
changed "boolean" to "bool" in a few places (they are obvious, it won't build)
(e) comment out the following tests which won't run in ManualTests Program.cs
Test("ListExtended(6007)", await client.ListExtended(6007));
Test("Search(Query = stargate)", await client.Search(new SearchOptionalParams { Query = "stargate" }));
Test("SeasonTranslation(530667, 'eng')", await client.SeasonTranslation(530667, "eng"));
... obviously there were no tests for /user and any other new API's which would not have run correctly.
None of this is holding up my work for what I need, I just thought that you may find my 6 hours of debugging helpful if/when you next open up the project.
Again, thanks for a tremendously helpful and well written project!
The text was updated successfully, but these errors were encountered: