Closed willmorris44 closed 10 months ago
@willmorris44 fixed in 4.3.11
@dankinsoid Seems this fix is now failing the build in 'Route+UserInfo.swift'
@discardableResult
func userInfo<Key: RouteInfoKey>(key: Key.Type, _ value: Key.Value) -> Route {
userInfo[Key.name] = value
return self
}
func userInfo<Key: RouteInfoKey>(for key: Key.Type) -> Key.Value? {
userInfo[Key.name] as? Key.Value
}
Build errors are Cannot convert value of type 'String' to expected argument type 'AnySendableHashable'
and Type of expression is ambiguous without a type annotation
@dankinsoid Seems this fix is now failing the build in 'Route+UserInfo.swift'
@discardableResult func userInfo<Key: RouteInfoKey>(key: Key.Type, _ value: Key.Value) -> Route { userInfo[Key.name] = value return self } func userInfo<Key: RouteInfoKey>(for key: Key.Type) -> Key.Value? { userInfo[Key.name] as? Key.Value }
Build errors are
Cannot convert value of type 'String' to expected argument type 'AnySendableHashable'
andType of expression is ambiguous without a type annotation
This is being addressed here: https://github.com/dankinsoid/VaporToOpenAPI/issues/16#issue-1990227971
When using an array in a response, the type within the array is getting erased.
The expected response JSON would be
Instead is is being displayed as
When using the .openAPI method