Swift Package Registry (1)

Download OpenAPI specification:Download

Package

List package releases

path Parameters
scope
required
string\A[a-zA-Z\d](?:[a-zA-Z\d]|-(?=[a-zA-Z\d])){0,...
Example: mona
name
required
string\A\p{XID_Start}\p{XID_Continue}*\z
Example: LinkedList
header Parameters
Content-Type
string
Value: "application/vnd.swift.registry.v1+json"

Responses

Response samples

Content type
application/json
{}

Lookup package identifiers registered for a URL

query Parameters
url
required
string <url>
Example: url=https://github.com/mona/LinkedList
header Parameters
Content-Type
string
Value: "application/vnd.swift.registry.v1+json"

Responses

Response samples

Content type
application/json
{
  • "identifiers": [
    ]
}

Release

Fetch release metadata

path Parameters
scope
required
string\A[a-zA-Z\d](?:[a-zA-Z\d]|-(?=[a-zA-Z\d])){0,...
Example: mona
name
required
string\A\p{XID_Start}\p{XID_Continue}*\z
Example: LinkedList
version
required
string^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-...
Example: 1.0.0-beta.1
header Parameters
Content-Type
string
Value: "application/vnd.swift.registry.v1+json"

Responses

Response samples

Content type
application/json
{
  • "@context": [],
  • "description": "One thing links to another.",
  • "keywords": [
    ],
  • "version": "1.1.1",
  • "name": "LinkedList",
  • "@type": "SoftwareSourceCode",
  • "programmingLanguage": {},
  • "author": {
    },
  • "license": "MIT"
}

Publish package release

path Parameters
scope
required
string\A[a-zA-Z\d](?:[a-zA-Z\d]|-(?=[a-zA-Z\d])){0,...
Example: mona
name
required
string\A\p{XID_Start}\p{XID_Continue}*\z
Example: LinkedList
version
required
string^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-...
Example: 1.0.0-beta.1
header Parameters
Content-Type
string
Value: "application/vnd.swift.registry.v1+json"

Responses

Response samples

Content type
application/json
{}

Fetch manifest for a package release

path Parameters
scope
required
string\A[a-zA-Z\d](?:[a-zA-Z\d]|-(?=[a-zA-Z\d])){0,...
Example: mona
name
required
string\A\p{XID_Start}\p{XID_Continue}*\z
Example: LinkedList
version
required
string^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-...
Example: 1.0.0-beta.1
query Parameters
swift-version
string\d+(?:\.(\d+)){0,2}
Example: swift-version=1.2.3
header Parameters
Content-Type
string
Value: "application/vnd.swift.registry.v1+swift"

Responses

Response samples

Content type
text/x-swift
// swift-tools-version:5.0
import PackageDescription

let package = Package(
    name: "LinkedList",
    products: [
        .library(name: "LinkedList", targets: ["LinkedList"])
    ],
    targets: [
        .target(name: "LinkedList"),
        .testTarget(name: "LinkedListTests", dependencies: ["LinkedList"]),
    ],
    swiftLanguageVersions: [.v4, .v5]
)

Download source archive

path Parameters
scope
required
string\A[a-zA-Z\d](?:[a-zA-Z\d]|-(?=[a-zA-Z\d])){0,...
Example: mona
name
required
string\A\p{XID_Start}\p{XID_Continue}*\z
Example: LinkedList
version
required
string^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-...
Example: 1.0.0-beta.1
header Parameters
Content-Type
string
Value: "application/vnd.swift.registry.v1+zip"

Responses

Response samples

Content type
application/problem+json
{
  • "accounts": [
    ],
  • "balance": 30,
  • "detail": "Your current balance is 30, but that costs 50.",
  • "title": "You do not have enough credit.",
  • "instance": "/account/12345/msgs/abc"
}