Skip to content

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 semver/none No version bump required. 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

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.

/// This object is similar to ``HTTPClient/Request``, but used for the Swift Concurrency 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?


@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.


@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`.

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.


/// 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

/// 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``.

}

/// 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.

}

/// 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.


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

semver/none No version bump required.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants