diff --git a/Sources/NIOHPACK/HPACKHeader.swift b/Sources/NIOHPACK/HPACKHeader.swift index ca0d4ca..be08cf9 100644 --- a/Sources/NIOHPACK/HPACKHeader.swift +++ b/Sources/NIOHPACK/HPACKHeader.swift @@ -270,7 +270,7 @@ public struct HPACKHeaders: ExpressibleByDictionaryLiteral, Sendable { /// Return a sequence of header values for the header field named `name`. /// - /// See also ``subscript(name:)`` and ``subscript(canonicalForm:)``. + /// See also ``HPACKHeaders/subscript(_:)-8qnm8`` and ``HPACKHeaders/subscript(canonicalForm:)``. /// /// - Parameters: /// - name: The name of the header field whose values should be iterated. diff --git a/Sources/NIOHTTP2/Docs.docc/index.md b/Sources/NIOHTTP2/Docs.docc/index.md index 0357a70..af10d72 100644 --- a/Sources/NIOHTTP2/Docs.docc/index.md +++ b/Sources/NIOHTTP2/Docs.docc/index.md @@ -2,7 +2,9 @@ This project contains HTTP/2 support for Swift projects using SwiftNIO. -## Getting Started +## Overview + +### Getting Started ``NIOHTTP2`` provides a number of types that make working with HTTP/2 practical using SwiftNIO. The simplest way to get started is to use the helpers provided to configure a HTTP/2 `ChannelPipeline`. As an example, to configure a HTTP/2 server, you can use `Channel.configureHTTP2Pipeline`: diff --git a/Sources/NIOHTTP2/HTTP2Error.swift b/Sources/NIOHTTP2/HTTP2Error.swift index 4d3bcea..444d01c 100644 --- a/Sources/NIOHTTP2/HTTP2Error.swift +++ b/Sources/NIOHTTP2/HTTP2Error.swift @@ -1647,7 +1647,7 @@ public enum NIOHTTP2Errors { } } - /// The ``HTTP2ChannelHandler`` does not have a multiplexer but one has been accessed. + /// The ``NIOHTTP2Handler`` does not have a multiplexer but one has been accessed. public struct MissingMultiplexer: NIOHTTP2Error { private let file: String private let line: UInt diff --git a/docker/docker-compose.2004.55.yaml b/docker/docker-compose.2004.55.yaml index 45b61f3..9427a8b 100644 --- a/docker/docker-compose.2004.55.yaml +++ b/docker/docker-compose.2004.55.yaml @@ -23,6 +23,9 @@ services: h2spec: image: swift-nio-http2:20.04-5.5 + documentation-check: + image: swift-nio-http2:20.04-5.5 + test: image: swift-nio-http2:20.04-5.5 command: /bin/bash -xcl "swift test -Xswiftc -warnings-as-errors $${SANITIZER_ARG-} && ./scripts/integration_tests.sh && ./scripts/test_h2spec.sh $${SANITIZER_ARG-}" diff --git a/docker/docker-compose.2004.56.yaml b/docker/docker-compose.2004.56.yaml index 08ec9fb..c5f3147 100644 --- a/docker/docker-compose.2004.56.yaml +++ b/docker/docker-compose.2004.56.yaml @@ -22,6 +22,9 @@ services: h2spec: image: swift-nio-http2:20.04-5.6 + documentation-check: + image: swift-nio-http2:20.04-5.6 + test: image: swift-nio-http2:20.04-5.6 environment: diff --git a/docker/docker-compose.2204.57.yaml b/docker/docker-compose.2204.57.yaml index 1b97bbc..8730e34 100644 --- a/docker/docker-compose.2204.57.yaml +++ b/docker/docker-compose.2204.57.yaml @@ -22,6 +22,9 @@ services: h2spec: image: swift-nio-http2:22.04-5.7 + documentation-check: + image: swift-nio-http2:22.04-5.7 + test: image: swift-nio-http2:22.04-5.7 environment: diff --git a/docker/docker-compose.2204.58.yaml b/docker/docker-compose.2204.58.yaml index d62b0c8..64aa9ee 100644 --- a/docker/docker-compose.2204.58.yaml +++ b/docker/docker-compose.2204.58.yaml @@ -21,6 +21,9 @@ services: h2spec: image: swift-nio-http2:22.04-5.8 + documentation-check: + image: swift-nio-http2:22.04-5.8 + test: image: swift-nio-http2:22.04-5.8 environment: diff --git a/docker/docker-compose.2204.main.yaml b/docker/docker-compose.2204.main.yaml index a18869e..832c6a2 100644 --- a/docker/docker-compose.2204.main.yaml +++ b/docker/docker-compose.2204.main.yaml @@ -21,6 +21,9 @@ services: h2spec: image: swift-nio-http2:22.04-main + documentation-check: + image: swift-nio-http2:22.04-main + test: image: swift-nio-http2:22.04-main environment: diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index f5b4e8b..7b80a63 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -38,6 +38,10 @@ services: <<: *common command: /bin/bash -xcl "swift build -c release && ./.build/release/NIOHTTP2PerformanceTester" + documentation-check: + <<: *common + command: /bin/bash -xcl "./scripts/check-docs.sh" + h2spec: <<: *common command: /bin/bash -xcl "./scripts/test_h2spec.sh" diff --git a/scripts/check-docs.sh b/scripts/check-docs.sh new file mode 100755 index 0000000..9405b7e --- /dev/null +++ b/scripts/check-docs.sh @@ -0,0 +1,23 @@ +#!/bin/bash +##===----------------------------------------------------------------------===## +## +## This source file is part of the SwiftNIO open source project +## +## Copyright (c) 2023 Apple Inc. and the SwiftNIO project authors +## Licensed under Apache License v2.0 +## +## See LICENSE.txt for license information +## See CONTRIBUTORS.txt for the list of SwiftNIO project authors +## +## SPDX-License-Identifier: Apache-2.0 +## +##===----------------------------------------------------------------------===## + +set -eu + +raw_targets=$(sed -E -n -e 's/^.* - documentation_targets: \[(.*)\].*$/\1/p' .spi.yml) +targets=(${raw_targets//,/ }) + +for target in "${targets[@]}"; do + swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed +done