Filter generated Jellyfin API operations
This commit is contained in:
parent
0addde59d3
commit
f74cb400f5
2 changed files with 45 additions and 4 deletions
|
|
@ -3,3 +3,42 @@ generate:
|
|||
- client
|
||||
accessModifier: public
|
||||
namingStrategy: idiomatic
|
||||
# Only the operations Luminate calls are generated. The Jellyfin specification defines 388
|
||||
# operations and 357 schemas; generating all of them produced roughly 258,000 lines of Swift and
|
||||
# dominated build time. The generator additionally includes the transitive closure of every
|
||||
# component the listed operations reference, so no `schemas:` additions are needed.
|
||||
#
|
||||
# Keep this list in sync with the `JellyfinAPI` protocol in
|
||||
# Sources/LuminateServices/Session/JellyfinAPI.swift. An operation that is not listed here is not
|
||||
# generated, and a call to it fails to compile with "value of type 'Client' has no member".
|
||||
filter:
|
||||
operations:
|
||||
# Discovery and system
|
||||
- GetPublicSystemInfo
|
||||
- GetSystemInfo
|
||||
# Auth
|
||||
- GetPublicUsers
|
||||
- AuthenticateUserByName
|
||||
- UpdateUserPassword
|
||||
- GetQuickConnectEnabled
|
||||
- InitiateQuickConnect
|
||||
- GetQuickConnectState
|
||||
- AuthenticateWithQuickConnect
|
||||
# Home and browse
|
||||
- GetUserViews
|
||||
- GetItems
|
||||
- GetItem
|
||||
- GetResumeItems
|
||||
- GetNextUp
|
||||
- GetLatestMedia
|
||||
- GetSeasons
|
||||
- GetEpisodes
|
||||
- GetSearchHints
|
||||
# Images
|
||||
- GetItemImage
|
||||
- GetItemImageByIndex
|
||||
# User state
|
||||
- MarkPlayedItem
|
||||
- MarkUnplayedItem
|
||||
- MarkFavoriteItem
|
||||
- UnmarkFavoriteItem
|
||||
|
|
|
|||
|
|
@ -23,10 +23,12 @@ import LuminateAPI
|
|||
|
||||
/// The slice of the generated Jellyfin API that ``JellyfinClient`` actually calls.
|
||||
///
|
||||
/// The generated `APIProtocol` declares all 388 operations in the Jellyfin specification, which
|
||||
/// makes it impossible to conform a test double to. This protocol names only the operations
|
||||
/// Luminate uses, so a test can implement a handful of methods instead of hundreds. The generated
|
||||
/// `Client` already has matching signatures, so it conforms with an empty extension.
|
||||
/// The seam exists so a test double conforms to a protocol this module owns rather than to the
|
||||
/// generated `APIProtocol`, whose shape is decided by
|
||||
/// `Sources/LuminateAPI/openapi-generator-config.yaml`. Adding an operation here also requires
|
||||
/// adding its `operationId` to that file's `filter.operations` list, or the generated `Client`
|
||||
/// will not have the method. The generated `Client` already has matching signatures, so it
|
||||
/// conforms with an empty extension.
|
||||
///
|
||||
/// This is a service-layer seam and nothing more: it deals in generated `Operations.*` types, which
|
||||
/// never travel above ``JellyfinClient``.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue