Skip to content

Commit 144464e

Browse files
authored
Prep 1.0 (#43)
### Motivation Ready the docs for 1.0. ### Modifications Updated README.md and documentation, updated the runtime dependency. ### Result Ready for 1.0. ### Test Plan Reviewed locally.
1 parent d0dafbf commit 144464e

File tree

4 files changed

+8
-36
lines changed

4 files changed

+8
-36
lines changed

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let package = Package(
4141
),
4242
],
4343
dependencies: [
44-
.package(url: "https://github.com/apple/swift-openapi-runtime", exact: "1.0.0-alpha.1"),
44+
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.0.0"),
4545
.package(url: "https://github.com/apple/swift-http-types", from: "1.0.0"),
4646
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0"),
4747
.package(url: "https://github.com/apple/swift-collections", from: "1.0.0"),

README.md

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# URLSession Transport for Swift OpenAPI Generator
22

33
[![](https://img.shields.io/badge/docc-read_documentation-blue)](https://swiftpackageindex.com/apple/swift-openapi-urlsession/documentation)
4+
[![](https://img.shields.io/github/v/release/apple/swift-openapi-urlsession)](https://github.com/apple/swift-openapi-urlsession/releases)
45
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fapple%2Fswift-openapi-urlsession%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/apple/swift-openapi-urlsession)
56
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fapple%2Fswift-openapi-urlsession%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/apple/swift-openapi-urlsession)
67

@@ -21,30 +22,19 @@ Note: Streaming support only available on macOS 12+, iOS 15+, tvOS 15+, watchOS
2122
Add the package dependency in your `Package.swift`:
2223

2324
```swift
24-
.package(
25-
url: "https://github.com/apple/swift-openapi-urlsession",
26-
exact: "1.0.0-alpha.1"
27-
),
25+
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.0"),
2826
```
2927

30-
Note that this repository does not have a 1.0 tag yet, so the API is not stable.
31-
3228
Next, in your target, add `OpenAPIURLSession` to your dependencies:
3329

3430
```swift
3531
.target(name: "MyTarget", dependencies: [
3632
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
37-
],
33+
]),
3834
```
3935

4036
Then, to get started, check out `URLSessionTransport`.
4137

42-
## Reporting issues
43-
44-
Please report any issues related to this library in the
45-
[swift-openapi-generator](https://github.com/apple/swift-openapi-generator/issues)
46-
repository.
47-
4838
## Documentation
4939

5040
To learn more, check out the full [documentation](https://swiftpackageindex.com/apple/swift-openapi-urlsession/documentation).

Sources/OpenAPIURLSession/Documentation.docc/Documentation.md

+2-13
Original file line numberDiff line numberDiff line change
@@ -21,30 +21,19 @@ Note: Streaming support only available on macOS 12+, iOS 15+, tvOS 15+, watchOS
2121
Add the package dependency in your `Package.swift`:
2222

2323
```swift
24-
.package(
25-
url: "https://github.com/apple/swift-openapi-urlsession",
26-
exact: "1.0.0-alpha.1"
27-
),
24+
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.0"),
2825
```
2926

30-
Note that this repository does not have a 1.0 tag yet, so the API is not stable.
31-
3227
Next, in your target, add `OpenAPIURLSession` to your dependencies:
3328

3429
```swift
3530
.target(name: "MyTarget", dependencies: [
3631
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
37-
],
32+
]),
3833
```
3934

4035
Then, to get started, check out ``URLSessionTransport``.
4136

42-
### Reporting issues
43-
44-
Please report any issues related to this library in the
45-
[swift-openapi-generator](https://github.com/apple/swift-openapi-generator/issues)
46-
repository.
47-
4837
## Topics
4938

5039
### Essentials

Sources/OpenAPIURLSession/URLSessionTransport.swift

+2-9
Original file line numberDiff line numberDiff line change
@@ -38,26 +38,19 @@ import class FoundationNetworking.HTTPURLResponse
3838
///
3939
/// let transport = URLSessionTransport()
4040
///
41-
/// Create the base URL of the server to call using your client. If the server
42-
/// URL was defined in the OpenAPI document, you find a generated method for it
43-
/// on the `Servers` type, for example:
44-
///
45-
/// let serverURL = try Servers.server1()
46-
///
4741
/// Instantiate the `Client` type generated by the Swift OpenAPI Generator for
4842
/// your provided OpenAPI document. For example:
4943
///
5044
/// let client = Client(
51-
/// serverURL: serverURL,
45+
/// serverURL: URL(string: "https://example.com")!,
5246
/// transport: transport
5347
/// )
5448
///
5549
/// Use the client to make HTTP calls defined in your OpenAPI document. For
5650
/// example, if the OpenAPI document contains an HTTP operation with
5751
/// the identifier `checkHealth`, call it from Swift with:
5852
///
59-
/// let response = try await client.checkHealth(.init())
60-
/// // ...
53+
/// let response = try await client.checkHealth()
6154
///
6255
/// ### Provide a custom URLSession
6356
///

0 commit comments

Comments
 (0)