Skip to content

Commit a2790bd

Browse files
authored
Merge branch 'main' into hd-mime-type-params
2 parents b240a07 + 2cb09fb commit a2790bd

File tree

6 files changed

+55
-66
lines changed

6 files changed

+55
-66
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Main
2+
3+
on:
4+
push:
5+
branches: [main]
6+
schedule:
7+
- cron: "0 8,20 * * *"
8+
9+
jobs:
10+
unit-tests:
11+
name: Unit tests
12+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
13+
with:
14+
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
15+
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
16+
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
17+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
18+
linux_nightly_main_arguments_override: "--explicit-target-dependency-import-check error"
19+
20+
integration-test:
21+
name: Integration test
22+
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
23+
with:
24+
name: "Integration test"
25+
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"

.github/workflows/pull_request.yml

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,30 @@
11
name: PR
22

33
on:
4-
pull_request:
5-
types: [opened, reopened, synchronize]
4+
pull_request:
5+
types: [opened, reopened, synchronize]
66

77
jobs:
8-
soundness:
9-
name: Soundness
10-
uses: apple/swift-nio/.github/workflows/soundness.yml@main
11-
with:
12-
api_breakage_check_enabled: true
13-
broken_symlink_check_enabled: true
14-
docs_check_enabled: true
15-
format_check_enabled: true
16-
license_header_check_enabled: true
17-
license_header_check_project_name: "SwiftOpenAPIGenerator"
18-
shell_check_enabled: true
19-
unacceptable_language_check_enabled: true
8+
soundness:
9+
name: Soundness
10+
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
11+
with:
12+
license_header_check_project_name: "SwiftOpenAPIGenerator"
2013

21-
unit-tests:
22-
name: Unit tests
23-
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
24-
with:
25-
linux_5_8_enabled: false
26-
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
27-
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
28-
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
29-
linux_nightly_main_enabled: false
14+
unit-tests:
15+
name: Unit tests
16+
uses: apple/swift-nio/.github/workflows/unit_tests.yml@main
17+
with:
18+
linux_5_9_arguments_override: "--explicit-target-dependency-import-check error"
19+
linux_5_10_arguments_override: "--explicit-target-dependency-import-check error"
20+
linux_6_0_arguments_override: "--explicit-target-dependency-import-check error"
21+
linux_nightly_6_0_arguments_override: "--explicit-target-dependency-import-check error"
22+
linux_nightly_main_enabled: false
3023

31-
integration-test:
32-
name: Integration test
33-
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
34-
with:
35-
name: "Integration test"
36-
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
37-
matrix_linux_5_8_enabled: false
38-
matrix_linux_nightly_main_enabled: false
39-
40-
swift-6-language-mode:
41-
name: Swift 6 Language Mode
42-
uses: apple/swift-nio/.github/workflows/swift_6_language_mode.yml@main
43-
if: false # Disabled for now.
24+
integration-test:
25+
name: Integration test
26+
uses: apple/swift-nio/.github/workflows/swift_matrix.yml@main
27+
with:
28+
name: "Integration test"
29+
matrix_linux_command: "apt-get update -yq && apt-get install -yq jq && ./scripts/run-integration-test.sh"
30+
matrix_linux_nightly_main_enabled: false

.github/workflows/scheduled.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.spi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version: 1
22
builder:
33
configs:
4-
- documentation_targets:
5-
- OpenAPIRuntime
4+
- documentation_targets:
5+
- OpenAPIRuntime

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let swiftSettings: [SwiftSetting] = [
2424
let package = Package(
2525
name: "swift-openapi-runtime",
2626
platforms: [
27-
.macOS(.v10_15), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)
27+
.macOS(.v10_15), .macCatalyst(.v13), .iOS(.v13), .tvOS(.v13), .watchOS(.v6), .visionOS(.v1)
2828
],
2929
products: [
3030
.library(

Sources/OpenAPIRuntime/EventStreams/ServerSentEventsDecoding.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ where Upstream.Element == ArraySlice<UInt8> {
2929
private let upstream: Upstream
3030

3131
/// A closure that determines whether the given byte chunk should be forwarded to the consumer.
32-
/// - Parameter: A byte chunk.
33-
/// - Returns: `true` if the byte chunk should be forwarded, `false` if this byte chunk is the terminating sequence.
32+
///
33+
/// The closure should return `true` if the byte chunk should be forwarded and
34+
/// `false` if this byte chunk is the terminating sequence.
3435
private let predicate: @Sendable (ArraySlice<UInt8>) -> Bool
3536

3637
/// Creates a new sequence.
@@ -98,7 +99,7 @@ extension AsyncSequence where Element == ArraySlice<UInt8>, Self: Sendable {
9899
/// Returns another sequence that decodes each event's data as the provided type using the provided decoder.
99100
///
100101
/// Use this method if the event's `data` field is not JSON, or if you don't want to parse it using `asDecodedServerSentEventsWithJSONData`.
101-
/// - Parameter: A closure that determines whether the given byte chunk should be forwarded to the consumer.
102+
/// - Parameter predicate: A closure that determines whether the given byte chunk should be forwarded to the consumer.
102103
/// - Returns: A sequence that provides the events.
103104
public func asDecodedServerSentEvents(
104105
while predicate: @escaping @Sendable (ArraySlice<UInt8>) -> Bool = { _ in true }

0 commit comments

Comments
 (0)