-
-
Notifications
You must be signed in to change notification settings - Fork 491
fix: most number types should be integer types in seerr-api.yml, and 48 additional commits; 49 commits to seerr-api.yml #2158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
|
Would be preferable to make another separate PR for the schemas declarations - will be easier to review :) |
17f6613 to
2085a18
Compare
|
bug: paths: /settings/cache: get: responses: '200': dnsCache: properties: stats: properties: hitRate should be 'number' and not 'integer', rates such as hitRate are fractional |
d00a53a to
28df2e3
Compare
|
NSwag is no longer generating Anonymous#, Response#, and Data# classes. There were many opportunities to consolidate the number of classes by reusing similar classes and to destructure complex object schemas into flatter schemas. And many good candidates for integer types have been converted from number types (and in one case changed back). I fixed a few unidentified bugs, particularly in commits:
I edited documentation in two places, particularly in commits:
And everything else is refactoring unnamed schemas to named schemas with no change in function. Perhaps at some point I will look at adding description fields to everything, but that's another branch and PR for another time. This one is ready for review. |
|
I had to make two more small changes. Collection was conflicting with .NET's Collection in generated source code from OpenApi Generator. I've now tested that the generated source code from both NSwag and OpenApi Generator source code builds. There was one line of generated source code that I had to fix pertaining to the example near: This seems to confuse the OpenApi Generator logic and causes it to emit /* 0 */5 * * * * */ instead of /// 0 */5 * * * *, which I had to manually fix at each iteration. I consider this to be a problem with OpenApi Generator in this case. |
…s JellyfinSyncRequest (POST input) and JellyfinSyncStatus (GET/POST response)
… named schema JellyfinUser
…ings/jellyfin/library, and /settings/plex/library endpoints to use consolidated MediaLibrary, MediaLibrarySyncRequest, and MediaLibrarySyncStatus named schemas
…as MetadataTestRequest and MetadataTestResponse
…RadarrTestRequest and RadarrTestResponse
…oints to use consolidated schemas ServarrTestRequest and ServarrTestResponse
…esponse, ImageCache, ImageCacheStats, DnsCache, DnsCacheStats, DnsCacheEntry, DnsCacheEntryAddresses, ApiCache, and ApiCacheStats fix: hitRate is a number, not an integer fix: fix semantic error at paths./settings/cache.get.responses.200.content.application/json.schema.properties.dnsCache.properties.entries, schemas with 'type: array', require a sibling 'items: ' field, resolved with refactor, introduced items: field and changed additionalProperties to properties
… application/json: schema: $ref: should be '#/components/schemas/NetworkSettings' instead of '#/components/schemas/MainSettings'
…/users to use PlexUser named schema
…overSound named schema
…er/tv to use GenreSliderItem named schema
…ages to use Language named schema
… named schema (same as existing data type)
…ot be an array based on the usage from MovieDetails and the TvDetails named schemas, which are already declaring the array in each schema
…esetPasswordRequest and ResetPasswordResponse
…hemas ResetPasswordByGuidRequest and ResetPasswordResponse (same response as /auth/reset-password)
…sersResponse, CreateUserRequest, UpdateUsersRequest, in addition to User and PageInfo named schemas which were already present
…/pushSubscription/{endpoint} to use named schema PushSubscription
fix: /user/{userId}/pushSubscriptions endpoint returns an array of PushSubscription
…RequestsResponse and
changed /user/{userId}/quota to use named schema UserQuota and Quota
…ged /blacklist to use GetBlacklistResponse and PostBlacklistRequest (renamed from Blacklist)
refactor: changed /user/{userId}/watchlist to use WatchlistResponse and WatchlistItem named schema
…eInfo and UpdatePasswordRequest named schemas
…onSettings and UpdatePermissionSettingsRequest named schemas
…, updated /search/keyword to use KeywordSearchResponse named schema, updated /search/company to use CompanySearchResponse named schema
…related response named schemas to use PaginatedResponse named base schema for consistency, particularly, PaginatedSearchResponse (renamed from SearchResponse), PaginatedKeywordSearchResponse (renamed from KeywordSearchResponse), PaginatedCompanySearchResponse (renamed from CompanySearchResponse), PaginatedMoviesResponse (new), PaginatedDiscoverMoviesByGenreResponse (new), PaginatedDiscoverMoviesByLanguageResponse (new), PaginatedDiscoverMoviesByStudioResponse (new), PaginatedTvResponse (new), PaginatedDiscoverTvByGenreResponse (new), PaginatedDiscoverTvByLanguageResponse (new), PaginatedDiscoverTvByNetworkResponse (new), PaginatedDiscoverTrendingResponse (new), and PaginatedWatchlistResponse (renamed from WatchlistResponse); and, updated related endpoints to use relevant named schemas, particularly, /user/{userId}/watchlist, /search, /search/keyword, /search/company, /discover/movies, /discover/movies/genre/{genreId}, /discover/movies/language/{language}, /discover/movies/studio/{studioId}, /discover/movies/upcoming, /discover/tv, /discover/tv/language/{language}, /discover/tv/genre/{genreId}, /discover/tv/network/{networkId}, /discover/tv/upcoming, /discover/trending, /discover/keyword/{keywordId}/movies, /discover/watchlist, /movie/{movieId}/recommendations, /movie/{movieId}/similar, /tv/{tvId}/recommendations, and /tv/{tvId}/similar
docs: added descriptions to fields in PageInfo named schema
…updated /user/{userId}/requests and /request endpoints to use GetRequestsResponse; removed one newline above /issue/count, added one newline above security
…core returned by service
refactor: changed /movie/{movieId}/ratings to use Ratings named schema, /movie/{movieId}/ratingscombined to use CombinedMovieRatings, which uses Ratings and IMDbRatings name schemas, and /tv/{tvId}/ratings to use Ratings named schema
…suffix Page -> renamed GetUsersResponse to UsersPage, renamed GetBlacklistResponse to BlacklistPage, renamed GetRequestsResponse to MediaRequestsPage, updated /user to use UsersPage named schema, updated /user/{userId}/requests to use MediaRequestsPage named schema, updated /blacklist to use BlacklistPage named schema, and updated /request to use MediaRequestsPage named schema
…rviceResponse named schema
…rviceResponse named schema
…nts to use CertificationError named schema
…Data named schema
…tchCombinedData named schema, which uses MediaWatchData named schema
… CombinedCredits named schema
…ng used in .NET Framework, avoids naming collision in generated clients
a536be3 to
bfed04f
Compare
Description
NSwag generates double types when number is provided. Seerr service returns 400 Bad Request when decimal numbers are sent from HttpClient. This fix changes most number types to integer types in seerr-api.yml, which can be used to generate NSwag API clients which after the change generate int types versus double types in C#.
Screenshot (if UI-related)
N/A: Not UI related.
To-Dos
pnpm buildvia Podman Compose on Windows 11. I was able to run, compile the pages, configure the Seerr service, connect to Jellyfin service, sync libraries, and perform all normal tasks following this commit.pnpm i18n:extractIssues Fixed or Closed
N/A: I didn't see any open issues.