Skip to content

Commit f97e6d3

Browse files
committed
Use bundleID instead of id for property names outside the bundle
1 parent 3d063ef commit f97e6d3

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Sources/SwiftDocC/DocumentationService/Convert/ConvertService.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public struct ConvertService: DocumentationService {
128128

129129
if let linkResolvingServer {
130130
let resolver = try OutOfProcessReferenceResolver(
131-
id: request.bundleInfo.id,
131+
bundleID: request.bundleInfo.id,
132132
server: linkResolvingServer,
133133
convertRequestIdentifier: messageIdentifier
134134
)

Sources/SwiftDocC/Infrastructure/DocumentationContext.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,10 +1799,10 @@ public class DocumentationContext {
17991799

18001800
/// Returns a list of all the image assets that registered for a given `bundleIdentifier`.
18011801
///
1802-
/// - Parameter id: The identifier of the bundle to return image assets for.
1802+
/// - Parameter bundleID: The identifier of the bundle to return image assets for.
18031803
/// - Returns: A list of all the image assets for the given bundle.
1804-
public func registeredImageAssets(for id: DocumentationBundle.Identifier) -> [DataAsset] {
1805-
registeredAssets(withExtensions: DocumentationContext.supportedImageExtensions, forBundleID: id)
1804+
public func registeredImageAssets(for bundleID: DocumentationBundle.Identifier) -> [DataAsset] {
1805+
registeredAssets(withExtensions: DocumentationContext.supportedImageExtensions, forBundleID: bundleID)
18061806
}
18071807

18081808
@available(*, deprecated, renamed: "registeredImageAssets(for:)", message: "registeredImageAssets(for:)' instead. This deprecated API will be removed after 6.2 is released")
@@ -1812,10 +1812,10 @@ public class DocumentationContext {
18121812

18131813
/// Returns a list of all the video assets that registered for a given `bundleIdentifier`.
18141814
///
1815-
/// - Parameter id: The identifier of the bundle to return video assets for.
1815+
/// - Parameter bundleID: The identifier of the bundle to return video assets for.
18161816
/// - Returns: A list of all the video assets for the given bundle.
1817-
public func registeredVideoAssets(for id: DocumentationBundle.Identifier) -> [DataAsset] {
1818-
registeredAssets(withExtensions: DocumentationContext.supportedVideoExtensions, forBundleID: id)
1817+
public func registeredVideoAssets(for bundleID: DocumentationBundle.Identifier) -> [DataAsset] {
1818+
registeredAssets(withExtensions: DocumentationContext.supportedVideoExtensions, forBundleID: bundleID)
18191819
}
18201820

18211821
@available(*, deprecated, renamed: "registeredVideoAssets(for:)", message: "registeredImageAssets(for:)' instead. This deprecated API will be removed after 6.2 is released")
@@ -1825,10 +1825,10 @@ public class DocumentationContext {
18251825

18261826
/// Returns a list of all the download assets that registered for a given `bundleIdentifier`.
18271827
///
1828-
/// - Parameter id: The identifier of the bundle to return download assets for.
1828+
/// - Parameter bundleID: The identifier of the bundle to return download assets for.
18291829
/// - Returns: A list of all the download assets for the given bundle.
1830-
public func registeredDownloadsAssets(for id: DocumentationBundle.Identifier) -> [DataAsset] {
1831-
registeredAssets(inContexts: [DataAsset.Context.download], forBundleID: id)
1830+
public func registeredDownloadsAssets(for bundleID: DocumentationBundle.Identifier) -> [DataAsset] {
1831+
registeredAssets(inContexts: [DataAsset.Context.download], forBundleID: bundleID)
18321832
}
18331833

18341834
@available(*, deprecated, renamed: "registeredDownloadsAssets(for:)", message: "registeredDownloadsAssets(for:)' instead. This deprecated API will be removed after 6.2 is released")

Sources/SwiftDocC/Infrastructure/External Data/OutOfProcessReferenceResolver.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ public class OutOfProcessReferenceResolver: ExternalDocumentationSource, GlobalE
9898
/// The documentation service is expected to be able to handle messages of kind "resolve-reference".
9999
///
100100
/// - Parameters:
101-
/// - id: The bundle identifier the server can resolve references for.
101+
/// - bundleID: The bundle identifier the server can resolve references for.
102102
/// - server: The server to send link resolution requests to.
103103
/// - convertRequestIdentifier: The identifier that the resolver will use for convert requests that it sends to the server.
104-
public init(id: DocumentationBundle.Identifier, server: DocumentationServer, convertRequestIdentifier: String?) throws {
105-
self.bundleID = id
104+
public init(bundleID: DocumentationBundle.Identifier, server: DocumentationServer, convertRequestIdentifier: String?) throws {
105+
self.bundleID = bundleID
106106
self.externalLinkResolvingClient = LongRunningService(
107107
server: server, convertRequestIdentifier: convertRequestIdentifier)
108108
}

Tests/SwiftDocCUtilitiesTests/OutOfProcessReferenceResolverTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
197197
})
198198

199199
return try OutOfProcessReferenceResolver(
200-
id: "com.test.bundle",
200+
bundleID: "com.test.bundle",
201201
server: server,
202202
convertRequestIdentifier: "convert-id"
203203
)
@@ -393,7 +393,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
393393
})
394394

395395
return try OutOfProcessReferenceResolver(
396-
id: "com.test.bundle",
396+
bundleID: "com.test.bundle",
397397
server: server,
398398
convertRequestIdentifier: "convert-id"
399399
)
@@ -495,7 +495,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
495495
})
496496

497497
let resolver = try OutOfProcessReferenceResolver(
498-
id: "com.test.bundle", server: server, convertRequestIdentifier: "convert-id")
498+
bundleID: "com.test.bundle", server: server, convertRequestIdentifier: "convert-id")
499499

500500
try assertForwardsResolverErrors(resolver: resolver)
501501
}
@@ -826,7 +826,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
826826
})
827827

828828
return try OutOfProcessReferenceResolver(
829-
id: "com.test.bundle",
829+
bundleID: "com.test.bundle",
830830
server: server,
831831
convertRequestIdentifier: "convert-id"
832832
)

0 commit comments

Comments
 (0)