Skip to content
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

Use Docc for documentation #613

Merged
merged 4 commits into from Aug 9, 2022
Merged

Use Docc for documentation #613

merged 4 commits into from Aug 9, 2022

Conversation

Lukasa
Copy link
Collaborator

@Lukasa Lukasa commented Aug 9, 2022

Motivation

Documentation is nice, and we can help support users by providing useful
clear docs.

Modifications

Add Docc to 5.6 and later builds
Make sure symbol references work
Add overview docs

Result

Nice rendering docs

Motivation

Documentation is nice, and we can help support users by providing useful
clear docs.

Modifications

Add Docc to 5.6 and later builds
Make sure symbol references work
Add overview docs

Result

Nice rendering docs
@Lukasa Lukasa added the needs-no-version-bump For PRs that when merged do not need a bump in version number. label Aug 9, 2022
Copy link
Collaborator

@FranzBusch FranzBusch left a comment

Choose a reason for hiding this comment

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

Looks great! Just a bunch of nits

@@ -16,12 +16,21 @@
import NIOCore
import NIOHTTP1

/// A representation of a HTTP request for the Swift Concurrency HTTPClient API.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// A representation of a HTTP request for the Swift Concurrency HTTPClient API.
/// A representation of an HTTP request for the Swift Concurrency HTTPClient API.

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
public struct HTTPClientRequest {
/// The request URL, including scheme and hostname.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this also include the port?

@@ -34,6 +43,10 @@ public struct HTTPClientRequest {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
extension HTTPClientRequest {
/// A HTTP request body.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// A HTTP request body.
/// An HTTP request body.

@@ -54,10 +67,20 @@ extension HTTPClientRequest {

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
extension HTTPClientRequest.Body {
/// Create a ``HTTPClientRequest/Body-swift.struct`` from a `ByteBuffer`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// Create a ``HTTPClientRequest/Body-swift.struct`` from a `ByteBuffer`.
/// Create an ``HTTPClientRequest/Body-swift.struct`` from a `ByteBuffer`.

public static func bytes(_ byteBuffer: ByteBuffer) -> Self {
self.init(.byteBuffer(byteBuffer))
}

/// Create a ``HTTPClientRequest/Body-swift.struct`` from a `RandomAccessCollection` of bytes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// Create a ``HTTPClientRequest/Body-swift.struct`` from a `RandomAccessCollection` of bytes.
/// Create an ``HTTPClientRequest/Body-swift.struct`` from a `RandomAccessCollection` of bytes.

public var body: Body

/// A representation of the response body for a HTTP response.
///
/// The body is streamed in as an `AsyncSequence` of `ByteBuffer`, where each `ByteBuffer` contains
Copy link
Collaborator

Choose a reason for hiding this comment

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

Unsure about this one

Suggested change
/// The body is streamed in as an `AsyncSequence` of `ByteBuffer`, where each `ByteBuffer` contains
/// The body is streamed as an `AsyncSequence` of `ByteBuffer`, where each `ByteBuffer` contains

@@ -65,6 +65,9 @@ let globalRequestID = ManagedAtomic(0)
/// try client.syncShutdown()
/// ```
public class HTTPClient {
/// The `EventLoopGroup` in use by this `HTTPClient`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// The `EventLoopGroup` in use by this `HTTPClient`.
/// The `EventLoopGroup` in use by this ``HTTPClient``.

@@ -97,7 +99,7 @@ extension HTTPClient {
}
}

/// Represent HTTP request.
/// Represents a HTTP request.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// Represents a HTTP request.
/// Represents an HTTP request.

@@ -226,7 +228,7 @@ extension HTTPClient {
}
}

/// Represent HTTP response.
/// Represents a HTTP response.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// Represents a HTTP response.
/// Represents an HTTP response.

@@ -14,6 +14,10 @@

import NIOCore

/// A ``HTTPClientResponseDelegate`` that wraps a callback.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
/// A ``HTTPClientResponseDelegate`` that wraps a callback.
/// An ``HTTPClientResponseDelegate`` that wraps a callback.

@Lukasa Lukasa merged commit 5e3e58d into swift-server:main Aug 9, 2022
@Lukasa Lukasa deleted the cb-docc branch August 9, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-no-version-bump For PRs that when merged do not need a bump in version number.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants