-
Notifications
You must be signed in to change notification settings - Fork 134
Use Docc for documentation #613
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
Conversation
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
There was a problem hiding this 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// 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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// 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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsure about this one
| /// 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`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// The `EventLoopGroup` in use by this `HTTPClient`. | |
| /// The `EventLoopGroup` in use by this ``HTTPClient``. |
| } | ||
|
|
||
| /// Represent HTTP request. | ||
| /// Represents a HTTP request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// Represents a HTTP request. | |
| /// Represents an HTTP request. |
| } | ||
|
|
||
| /// Represent HTTP response. | ||
| /// Represents a HTTP response. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// Represents a HTTP response. | |
| /// Represents an HTTP response. |
Sources/AsyncHTTPClient/Utils.swift
Outdated
|
|
||
| import NIOCore | ||
|
|
||
| /// A ``HTTPClientResponseDelegate`` that wraps a callback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /// A ``HTTPClientResponseDelegate`` that wraps a callback. | |
| /// An ``HTTPClientResponseDelegate`` that wraps a callback. |
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