diff --git a/stone/backends/swift_rsrc/SwiftRequestBox.jinja b/stone/backends/swift_rsrc/SwiftRequestBox.jinja index 6325b9a4..94742f56 100644 --- a/stone/backends/swift_rsrc/SwiftRequestBox.jinja +++ b/stone/backends/swift_rsrc/SwiftRequestBox.jinja @@ -7,9 +7,17 @@ import Foundation /// Allows for heterogenous collections of typed requests -public enum {{ class_name }} { +public enum {{ class_name }}: CustomStringConvertible { {% for route in background_compatible_routes %} case {{ fmt_func(route.name, route.version) }}({{ request_type_signature(route) }}) {% endfor %} -} + public var description: String { + switch self { + {% for route in background_compatible_routes %} + case .{{ fmt_func(route.name, route.version) }}(_): + return "{{ fmt_func(route.name, route.version) }}" + {% endfor %} + } + } +}