Skip to content

Commit

Permalink
Use bundleID instead of id for property names outside the bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
d-ronnqvist committed Nov 21, 2024
1 parent 3d063ef commit f97e6d3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public struct ConvertService: DocumentationService {

if let linkResolvingServer {
let resolver = try OutOfProcessReferenceResolver(
id: request.bundleInfo.id,
bundleID: request.bundleInfo.id,
server: linkResolvingServer,
convertRequestIdentifier: messageIdentifier
)
Expand Down
18 changes: 9 additions & 9 deletions Sources/SwiftDocC/Infrastructure/DocumentationContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1799,10 +1799,10 @@ public class DocumentationContext {

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

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

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

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

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

@available(*, deprecated, renamed: "registeredDownloadsAssets(for:)", message: "registeredDownloadsAssets(for:)' instead. This deprecated API will be removed after 6.2 is released")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ public class OutOfProcessReferenceResolver: ExternalDocumentationSource, GlobalE
/// The documentation service is expected to be able to handle messages of kind "resolve-reference".
///
/// - Parameters:
/// - id: The bundle identifier the server can resolve references for.
/// - bundleID: The bundle identifier the server can resolve references for.
/// - server: The server to send link resolution requests to.
/// - convertRequestIdentifier: The identifier that the resolver will use for convert requests that it sends to the server.
public init(id: DocumentationBundle.Identifier, server: DocumentationServer, convertRequestIdentifier: String?) throws {
self.bundleID = id
public init(bundleID: DocumentationBundle.Identifier, server: DocumentationServer, convertRequestIdentifier: String?) throws {
self.bundleID = bundleID
self.externalLinkResolvingClient = LongRunningService(
server: server, convertRequestIdentifier: convertRequestIdentifier)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
})

return try OutOfProcessReferenceResolver(
id: "com.test.bundle",
bundleID: "com.test.bundle",
server: server,
convertRequestIdentifier: "convert-id"
)
Expand Down Expand Up @@ -393,7 +393,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
})

return try OutOfProcessReferenceResolver(
id: "com.test.bundle",
bundleID: "com.test.bundle",
server: server,
convertRequestIdentifier: "convert-id"
)
Expand Down Expand Up @@ -495,7 +495,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
})

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

try assertForwardsResolverErrors(resolver: resolver)
}
Expand Down Expand Up @@ -826,7 +826,7 @@ class OutOfProcessReferenceResolverTests: XCTestCase {
})

return try OutOfProcessReferenceResolver(
id: "com.test.bundle",
bundleID: "com.test.bundle",
server: server,
convertRequestIdentifier: "convert-id"
)
Expand Down

0 comments on commit f97e6d3

Please sign in to comment.