From 21ab8761c36cc1f22c84c394e6cc848b0169e707 Mon Sep 17 00:00:00 2001 From: Florian Friedrich Date: Thu, 16 Jul 2020 19:54:18 +0200 Subject: [PATCH] Allow custom decoder user info to be passed --- Sources/RouteDocs/EndpointDocumentation.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/RouteDocs/EndpointDocumentation.swift b/Sources/RouteDocs/EndpointDocumentation.swift index 1abc704..9ce7d83 100644 --- a/Sources/RouteDocs/EndpointDocumentation.swift +++ b/Sources/RouteDocs/EndpointDocumentation.swift @@ -170,8 +170,8 @@ extension EndpointDocumentation.Payload { } @inlinable - public init(object: T.Type) throws { - try self.init(object: object, as: object.defaultContentType) + public init(object: T.Type, customUserInfo: [CodingUserInfoKey: Any] = [:]) throws { + try self.init(object: object, as: object.defaultContentType, customUserInfo: customUserInfo) } }