Skip to content

Commit ea50b19

Browse files
authored
Fix broken links to Registry.md (#2182)
1 parent b805dcf commit ea50b19

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

proposals/0321-package-registry-publish.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ like [Trillian] or [sigstore].
313313
[autobuilds]: https://docs.docker.com/docker-hub/builds/ "Docker Hub: Set up Automated Builds"
314314
[Damerau–Levenshtein distance]: https://en.wikipedia.org/wiki/Damerau%E2%80%93Levenshtein_distance "Damerau–Levenshtein distance"
315315
[Docker Hub]: https://hub.docker.com
316-
[Registry.md]: https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md "Swift Package Registry Service Specification"
316+
[Registry.md]: https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md "Swift Package Registry Service Specification"
317317
[rss]: https://validator.w3.org/feed/docs/rss2.html "RSS 2.0 specification"
318318
[RubyGems.org]: https://rubygems.org/
319319
[SE-0292]: https://github.com/apple/swift-evolution/blob/main/proposals/0292-package-registry-service.md "Package Registry Service"

proposals/0391-package-registry-publish.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
A package registry makes packages available to consumers. Starting with Swift 5.7,
2626
SwiftPM supports dependency resolution and package download using any registry that
27-
implements the [service specification](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md) proposed alongside with [SE-0292](https://github.com/apple/swift-evolution/blob/main/proposals/0292-package-registry-service.md).
27+
implements the [service specification](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md) proposed alongside with [SE-0292](https://github.com/apple/swift-evolution/blob/main/proposals/0292-package-registry-service.md).
2828
SwiftPM does not yet provide any tooling for publishing packages, so package authors
2929
must manually prepare the contents (e.g., source archive) and interact
3030
with the registry on their own to publish a package release. This proposal
@@ -38,7 +38,7 @@ Publishing package release to a Swift package registry generally involves these
3838
1. Prepare package source archive by using the [`swift package archive-source` subcommand](https://github.com/apple/swift-evolution/blob/main/proposals/0292-package-registry-service.md#archive-source-subcommand).
3939
1. Sign the metadata and archive (if needed).
4040
1. [Authenticate](https://github.com/apple/swift-evolution/blob/main/proposals/0378-package-registry-auth.md) (if required by the registry).
41-
1. Send the archive and metadata (and their signatures if any) by calling the ["create a package release" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#endpoint-6).
41+
1. Send the archive and metadata (and their signatures if any) by calling the ["create a package release" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-6).
4242
1. Check registry server response to determine if publication has succeeded or failed (if the registry processes request synchronously), or is pending (if the registry processes request asynchronously).
4343

4444
SwiftPM can streamline the workflow by combining all of these steps into a single
@@ -58,8 +58,8 @@ Typically a package release has metadata associated with it, such as URL of the
5858
code repository, license, etc. In general, metadata gets set when a package release is
5959
being published, but a registry service may allow modifications of the metadata afterwards.
6060

61-
The current [registry service specification](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md) states that:
62-
- A client (e.g., package author, publishing tool) may provide metadata for a package release by including it in the ["create a package release" request](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#462-package-release-metadata). The registry server will store the metadata and include it in the ["fetch information about a package release" response](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#endpoint-2).
61+
The current [registry service specification](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md) states that:
62+
- A client (e.g., package author, publishing tool) may provide metadata for a package release by including it in the ["create a package release" request](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#462-package-release-metadata). The registry server will store the metadata and include it in the ["fetch information about a package release" response](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-2).
6363
- If a client does not include metadata, the registry server may populate it unless the client specifies otherwise (i.e., by sending an empty JSON object `{}` in the "create a package release" request).
6464

6565
It does not, however, define any requirements or server-client API contract on the
@@ -84,7 +84,7 @@ Package release metadata submitted to a registry must be a JSON object of type
8484
```json
8585
{
8686
"$schema": "https://json-schema.org/draft/2020-12/schema",
87-
"$id": "https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md",
87+
"$id": "https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md",
8888
"title": "Package Release Metadata",
8989
"description": "Metadata of a package release.",
9090
"type": "object",
@@ -167,7 +167,7 @@ Package release metadata submitted to a registry must be a JSON object of type
167167
| `description` | String | A description of the package release. | |
168168
| `licenseURL` | String | URL of the package release's license document. | |
169169
| `readmeURL` | String | URL of the README specifically for the package release or broadly for the package. | |
170-
| `repositoryURLs` | Array | Code repository URL(s) of the package. It is recommended to include all URL variations (e.g., SSH, HTTPS) for the same repository. This can be an empty array if the package does not have source control representation.<br/>Setting this property is one way through which a registry can obtain repository URL to package identifier mappings for the ["lookup package identifiers registered for a URL" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#45-lookup-package-identifiers-registered-for-a-url). A registry may choose other mechanism(s) for package authors to specify such mappings. | |
170+
| `repositoryURLs` | Array | Code repository URL(s) of the package. It is recommended to include all URL variations (e.g., SSH, HTTPS) for the same repository. This can be an empty array if the package does not have source control representation.<br/>Setting this property is one way through which a registry can obtain repository URL to package identifier mappings for the ["lookup package identifiers registered for a URL" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#45-lookup-package-identifiers-registered-for-a-url). A registry may choose other mechanism(s) for package authors to specify such mappings. | |
171171

172172
##### `Author` type
173173

@@ -370,7 +370,7 @@ or `signing.trustedRootCertificatesPath` for package `mona.LinkedList`:
370370
##### Local TOFU
371371

372372
When SwiftPM downloads a package release from registry via the
373-
["download source archive" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#endpoint-4), it will:
373+
["download source archive" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-4), it will:
374374
1. Search local fingerprints storage, which by default is located at `~/.swiftpm/security/fingerprints/`, to see if the package release has been downloaded before and its recorded checksum. The checksum of the downloaded source archive must match the previous value or else [trust on first use (TOFU)](https://en.wikipedia.org/wiki/Trust_on_first_use) check would fail.
375375
1. Fetch package release metadata from the registry to get:
376376
<ul>
@@ -445,13 +445,13 @@ Using these inputs, SwiftPM will:
445445

446446
Prerequisites:
447447
- Run [`swift package-registry login`](https://github.com/apple/swift-evolution/blob/main/proposals/0378-package-registry-auth.md#new-login-subcommand) to authenticate registry user if needed.
448-
- The user has the necessary permissions to call the ["create a package release" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#endpoint-6) for the package identifier.
448+
- The user has the necessary permissions to call the ["create a package release" API](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-6) for the package identifier.
449449

450450
### Changes to the registry service specification
451451

452452
#### Create package release API
453453

454-
A registry must update [this existing endpoint](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#endpoint-6) to handle package release
454+
A registry must update [this existing endpoint](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-6) to handle package release
455455
metadata as described in a [previous section](#package-release-metadata) of this document.
456456

457457
If the package being published is signed, the client must identify the signature format
@@ -505,7 +505,7 @@ M6TdTeIuGdNsO1FQ0ptD64F5nSSOsQ5WzhM6/7KsHRuLHfTsggnyIWr0DxMcBj5F40zfplwntXAgS0yn
505505

506506
#### Fetch package release metadata API
507507

508-
A registry may update [this existing endpoint](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#endpoint-2) for the [metadata changes](#package-release-metadata)
508+
A registry may update [this existing endpoint](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-2) for the [metadata changes](#package-release-metadata)
509509
described in this document.
510510

511511
If the package release is signed, the registry must include a `signing` JSON
@@ -532,7 +532,7 @@ object in the response:
532532

533533
#### Download package source archive API
534534

535-
If a registry supports signing, it must update [this existing endpoint](https://github.com/apple/swift-package-manager/blob/main/Documentation/Registry.md#endpoint-4)
535+
If a registry supports signing, it must update [this existing endpoint](https://github.com/apple/swift-package-manager/blob/main/Documentation/PackageRegistry/Registry.md#endpoint-4)
536536
to include the `X-Swift-Package-Signature-Format` and `X-Swift-Package-Signature` headers in
537537
the HTTP response for a signed package source archive.
538538

0 commit comments

Comments
 (0)