@@ -18,7 +18,6 @@ struct Plugin: CommandPlugin {
1818 func performCommand( context: PluginContext , arguments: [ String ] ) async throws {
1919
2020 // Apply schema pre patches
21- try await patchTaskTriggerInfoSchema ( context: context)
2221
2322 try await generate ( context: context)
2423
@@ -27,9 +26,6 @@ struct Plugin: CommandPlugin {
2726 try await patchAnyJSON ( context: context)
2827 try await patchGroupUpdateDiscriminator ( context: context)
2928
30- // Move patch files
31- try await addTaskTriggerType ( context: context)
32-
3329 // Create the version SDK
3430 try await generateVersionFile ( context: context)
3531
@@ -107,30 +103,9 @@ struct Plugin: CommandPlugin {
107103 . directory
108104 . appending ( [ " Sources " , " jellyfin-openapi-stable-patched.json " ] )
109105
110- try FileManager . default. removeItem ( atPath: filePath. string)
111- }
112-
113- private func patchTaskTriggerInfoSchema( context: PluginContext ) async throws {
114- let contents = try await parseOriginalSchema ( context: context)
115-
116- guard case var . object( file) = contents else { return }
117- guard case var . object( components) = file [ " components " ] else { return }
118- guard case var . object( schemas) = components [ " schemas " ] else { return }
119- guard case var . object( taskTriggerInfo) = schemas [ " TaskTriggerInfo " ] else { return }
120- guard case var . object( properties) = taskTriggerInfo [ " properties " ] else { return }
121-
122- properties [ " Type " ] = AnyJSON . object ( [
123- " type " : . string( " string " ) ,
124- " format " : . string( " TaskTriggerType " ) ,
125- " nullable " : . bool( true ) ,
126- ] )
127-
128- taskTriggerInfo [ " properties " ] = . object( properties)
129- schemas [ " TaskTriggerInfo " ] = . object( taskTriggerInfo)
130- components [ " schemas " ] = . object( schemas)
131- file [ " components " ] = . object( components)
132-
133- try await savePatchedSchema ( context: context, json: . object( file) )
106+ if FileManager . default. fileExists ( atPath: filePath. string) {
107+ try FileManager . default. removeItem ( atPath: filePath. string)
108+ }
134109 }
135110
136111 // Entities/RemoteSearchResult.swift: remove `Hashable`
@@ -173,26 +148,6 @@ struct Plugin: CommandPlugin {
173148 . write ( to: URL ( fileURLWithPath: filePath. string) )
174149 }
175150
176- private func addTaskTriggerType( context: PluginContext ) async throws {
177- let sourceFilePath = context
178- . package
179- . directory
180- . appending ( [ " Plugins " , " CreateAPI " , " PatchFiles " , " TaskTriggerType.swift " ] )
181-
182- let destinationFilePath = context
183- . package
184- . directory
185- . appending ( [ " Sources " , " Entities " , " TaskTriggerType.swift " ] )
186-
187- let fileManager = FileManager . default
188-
189- if fileManager. fileExists ( atPath: destinationFilePath. string) {
190- try fileManager. removeItem ( atPath: destinationFilePath. string)
191- }
192-
193- try fileManager. copyItem ( atPath: sourceFilePath. string, toPath: destinationFilePath. string)
194- }
195-
196151 // TODO: Remove if/when fixed within CreateAPI
197152 // Entities/GroupUpdate.swift: change generated `Type` name to `_Type`
198153 private func patchGroupUpdateDiscriminator( context: PluginContext ) async throws {
0 commit comments