Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update all examples and integration tests to 0.3.0 #325

Merged
merged 1 commit into from
Oct 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Examples/GreetingService/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ let package = Package(
.macOS(.v13)
],
dependencies: [
.package(url: "https://github.com/apple/swift-openapi-generator", .upToNextMinor(from: "0.2.0")),
.package(url: "https://github.com/apple/swift-openapi-runtime", .upToNextMinor(from: "0.2.0")),
.package(url: "https://github.com/swift-server/swift-openapi-vapor", .upToNextMinor(from: "0.2.0")),
.package(url: "https://github.com/apple/swift-openapi-generator", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/apple/swift-openapi-runtime", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/swift-server/swift-openapi-vapor", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/vapor/vapor", from: "4.76.0"),
],
targets: [
Expand Down
6 changes: 2 additions & 4 deletions Examples/GreetingServiceClient/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
import PackageDescription

let package = Package(
name: "GreetingService",
name: "GreetingServiceClient",
platforms: [
.macOS(.v13)
],
dependencies: [
// TODO: When swift-openapi-generator is tagged with 0.3.0, stop depending on main.
// .package(url: "https://github.com/apple/swift-openapi-generator", .upToNextMinor(from: "0.3.0"),
.package(url: "https://github.com/apple/swift-openapi-generator", branch: "main"),
.package(url: "https://github.com/apple/swift-openapi-generator", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/apple/swift-openapi-runtime", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/apple/swift-openapi-urlsession", .upToNextMinor(from: "0.3.0")),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ struct GreetingServiceClient {
static func main() async throws {
// Create an instance of the generated client type.
let client: APIProtocol = Client(
// Server.server1() is generated, derived from the server URL in the OpenAPI document.
serverURL: try Servers.server1(),
// Server.server2() is generated, derived from the server URL in the OpenAPI document.
serverURL: try Servers.server2(),
// URLSessionTransport conforms to ClientTransport and is provided by a separate package.
transport: URLSessionTransport()
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ info:
servers:
- url: https://example.com/api
description: Example
- url: http://localhost:8080/api
description: Localhost
paths:
/greet:
get:
Expand Down
4 changes: 1 addition & 3 deletions IntegrationTest/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ let package = Package(
)
],
dependencies: [
// TODO: When swift-openapi-generator is tagged with 0.3.0, stop depending on main.
// .package(url: "https://github.com/apple/swift-openapi-generator", .upToNextMinor(from: "0.3.0"),
.package(url: "https://github.com/apple/swift-openapi-generator", branch: "main"),
.package(url: "https://github.com/apple/swift-openapi-generator", .upToNextMinor(from: "0.3.0")),
.package(url: "https://github.com/apple/swift-openapi-runtime", .upToNextMinor(from: "0.3.0")),
],
targets: [
Expand Down