Skip to main content

Overview

Parsaa can generate comprehensive inline documentation for your Swift code. It produces /// style documentation comments compatible with DocC and Xcode’s Quick Help panel.
Generated documentation follows Apple’s DocC format, so it integrates directly with Xcode’s documentation browser and Quick Help.

What It Generates

Function & Method Docs

Parameter descriptions, return values, and throws documentation for every function and method.

Type Overviews

High-level descriptions for classes, structs, enums, and protocols that explain their purpose and usage.

Property Documentation

Clear descriptions for properties, including their role and any constraints or expectations.

Usage Examples

Inline code examples showing how to use the documented API correctly.

How to Use

1

Select your code

In Xcode, select the function, class, struct, or block of code you want documented.
2

Ask Parsaa

In the chat, ask Parsaa to generate documentation — for example, “Add documentation to this function” or “Document this class.”
3

Review

Parsaa generates /// documentation comments. Review them for accuracy and completeness.
4

Apply

Apply the documentation to your code. The comments are formatted for Xcode’s Quick Help and DocC.

Example

Input — a function without documentation:
func fetchUser(by id: String, includeProfile: Bool) async throws -> User {
    let endpoint = Endpoint.user(id: id, includeProfile: includeProfile)
    let response = try await networkClient.request(endpoint)
    return try decoder.decode(User.self, from: response.data)
}
Output — with generated documentation:
/// Fetches a user from the remote API by their unique identifier.
///
/// Retrieves the user record from the server. Optionally includes
/// the user's full profile data in the response.
///
/// - Parameters:
///   - id: The unique identifier of the user to fetch.
///   - includeProfile: Whether to include the user's full profile
///     data in the response. When `false`, only basic user info
///     is returned.
/// - Returns: The requested ``User`` instance.
/// - Throws: A network error if the request fails, or a
///   `DecodingError` if the response cannot be parsed.
func fetchUser(by id: String, includeProfile: Bool) async throws -> User {
    let endpoint = Endpoint.user(id: id, includeProfile: includeProfile)
    let response = try await networkClient.request(endpoint)
    return try decoder.decode(User.self, from: response.data)
}

DocC Compatibility

Generated documentation is fully compatible with Apple’s DocC documentation system.
Documentation appears in Xcode’s Quick Help panel (Option-click on any symbol) immediately after you apply it.
When you build documentation with DocC, Parsaa-generated comments are included automatically — no extra configuration needed.
For best results, generate documentation after your API is stable. Documenting code that’s still changing means you’ll need to regenerate when the interface evolves.