Skip to content

chore: use swift-native doc comments #1097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2025
Merged

chore: use swift-native doc comments #1097

merged 1 commit into from
Jul 1, 2025

Conversation

ChiragAgg5k
Copy link
Member

What does this PR do?

uses swift-native doc comments instead of jsdoc styled comments for apple and swift sdks.

uses this doc as the reference from official swift repository - https://github.com/swiftlang/swift/blob/main/docs/DocumentationComments.md

Test Plan

before:
image

after:
image

Related PRs and Issues

Have you read the Contributing Guidelines on issues?

yes.

@ChiragAgg5k ChiragAgg5k requested review from Copilot and abnegate and removed request for Copilot July 1, 2025 04:14
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR changes the service template comments in both Swift and Apple SDKs to use native Swift documentation conventions instead of JSDoc-style tags.

  • Replaces @param with a - Parameters: section and bullet list items.
  • Updates @throws and @return tags to - Throws: and - Returns: respectively.
  • Applies these changes to both templates/swift and templates/apple service templates.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
templates/swift/Sources/Services/Service.swift.twig Updated doc comments to Swift-native style (Parameters/Throws/Returns)
templates/apple/Sources/Services/Service.swift.twig Mirrored Swift-native doc comment updates for Apple SDK template
Comments suppressed due to low confidence (4)

templates/swift/Sources/Services/Service.swift.twig:24

  • Swift uses the Error protocol rather than the term Exception; update this to reference Error or the specific error type thrown by the service.
    /// - Throws: Exception if the request fails

templates/apple/Sources/Services/Service.swift.twig:24

  • Swift uses the Error protocol rather than the term Exception; update this to reference Error or the specific error type thrown by the service.
    /// - Throws: Exception if the request fails

@abnegate abnegate merged commit aaf0804 into master Jul 1, 2025
37 checks passed
@abnegate abnegate deleted the pla-3149 branch July 1, 2025 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants