Skip to content

Instantly share code, notes, and snippets.

@WhiteHyun
Created June 18, 2024 05:20
Show Gist options
  • Save WhiteHyun/24f83cafb0fdf515d6babdd483aa7caf to your computer and use it in GitHub Desktop.
Save WhiteHyun/24f83cafb0fdf515d6babdd483aa7caf to your computer and use it in GitHub Desktop.
OpenAPI Generator Server
// swift-tools-version: 5.10
import PackageDescription
let package = Package(
name: "OpenAPIService",
platforms: [
.macOS(.v14),
],
dependencies: [
.package(url: "https://github.com/vapor/vapor.git", from: "4.99.3"),
.package(url: "https://github.com/apple/swift-openapi-generator", from: "1.2.1"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.4.0"),
.package(url: "https://github.com/swift-server/swift-openapi-vapor", from: "1.0.1"),
],
targets: [
.executableTarget(
name: "OpenAPIService",
dependencies: [
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIVapor", package: "swift-openapi-vapor"),
.product(name: "Vapor", package: "vapor"),
],
plugins: [
.plugin(
name: "OpenAPIGenerator",
package: "swift-openapi-generator"
)
]
),
]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment