How can I properly document a method with a completion handler in iOS swift

documentation, ios, swift

Solution

/**
Sends an API request to 4sq for venues around a given location with an optional text search

:param: location    A CLLocation for the user's current location
:param: query       An optional search query
:param: completion  A closure which is called with venues, an array of FoursquareVenue objects

:returns: No return value
*/
func requestVenues(location: CLLocation, query: String?, completion: (venues: [FoursquareVenue]?) -> Void) { … }

taken from https://thatthinginswift.com/documentation-and-quick-help/

Problem

I'm documenting the code for my company's iOS application, and now I've moved on to methods that have a completion handler. Is there a specific method for documenting completion handlers, or should I just put it as part of the parameters? for example: ``` /** Description - Parameters: - parameter1: description - parameter2: description - completion: description */ ``` Is this the right way or is there another better way? Or maybe it should be in the "Returns" part of the documentation? Thanks

Original source