From 9ae43ea3f2e070fa7fa6baade21b198c3fd38e25 Mon Sep 17 00:00:00 2001 From: Florian Lercher Date: Tue, 28 Sep 2021 19:06:32 +0000 Subject: [PATCH] Replace REST exporter with HTTP exporter --- WebService/Package.resolved | 142 ++++++++++++++------ WebService/Package.swift | 3 +- WebService/Sources/Buoy/Handlers/Buoy.swift | 7 +- 3 files changed, 101 insertions(+), 51 deletions(-) diff --git a/WebService/Package.resolved b/WebService/Package.resolved index 3ef8fed..908bb34 100644 --- a/WebService/Package.resolved +++ b/WebService/Package.resolved @@ -6,8 +6,8 @@ "repositoryURL": "https://github.com/kylebrowning/APNSwift.git", "state": { "branch": null, - "revision": "03e83e2332d13a3c06d5cd70948166e5724c43c7", - "version": "3.0.0" + "revision": "e7645362c051fb12c28ed290c6e7f6918596d25b", + "version": "3.1.0" } }, { @@ -15,8 +15,26 @@ "repositoryURL": "https://github.com/Apodini/Apodini.git", "state": { "branch": null, - "revision": "e6a943b0db29b2df5c0c139ab993e57752bf22b7", - "version": "0.5.0" + "revision": "0e92860664ae1dfebca7e126329f3898bd641b6b", + "version": "0.5.1" + } + }, + { + "package": "ApodiniMigrator", + "repositoryURL": "https://github.com/Apodini/ApodiniMigrator.git", + "state": { + "branch": null, + "revision": "7daeaf83310f53bc4e5a124a987f7dba95c72666", + "version": "0.1.0" + } + }, + { + "package": "ApodiniTypeInformation", + "repositoryURL": "https://github.com/Apodini/ApodiniTypeInformation.git", + "state": { + "branch": null, + "revision": "b5b9a4d56f8b4fc28fff159e3e9349c41baf40a4", + "version": "0.2.0" } }, { @@ -33,8 +51,8 @@ "repositoryURL": "https://github.com/swift-server/async-http-client.git", "state": { "branch": null, - "revision": "8e4d51908dd49272667126403bf977c5c503f78f", - "version": "1.5.0" + "revision": "8fa7f082b155ea325bcf7b2dbffaf81d4eea1ae4", + "version": "1.5.1" } }, { @@ -42,8 +60,8 @@ "repositoryURL": "https://github.com/vapor/async-kit.git", "state": { "branch": null, - "revision": "c1de408100a2f2e4ab2ea06512e8635bc1a59144", - "version": "1.3.1" + "revision": "8ec02e274b70afe9e6d2f39c49b7491d76cbc128", + "version": "1.8.0" } }, { @@ -51,8 +69,8 @@ "repositoryURL": "https://github.com/vapor/console-kit.git", "state": { "branch": null, - "revision": "cfe8bcd58f74ffecb4f536d8237de146b634ecd3", - "version": "4.2.6" + "revision": "75ea3b627d88221440b878e5dfccc73fd06842ed", + "version": "4.2.7" } }, { @@ -60,8 +78,8 @@ "repositoryURL": "https://github.com/MihaelIsaev/FCM.git", "state": { "branch": null, - "revision": "3e0645f7897a570568e66029a1bb97dde965bdeb", - "version": "2.10.1" + "revision": "5d35a93bde97fd34879bf1f7ca198f4efacd8eca", + "version": "2.11.1" } }, { @@ -78,8 +96,17 @@ "repositoryURL": "https://github.com/vapor/fluent-kit.git", "state": { "branch": null, - "revision": "2eddf6fda3f1ca114f96e0cf82875fefab342343", - "version": "1.13.0" + "revision": "176f2b4b7c35a89dd756a5d6d8d5a8473bf92410", + "version": "1.15.2" + } + }, + { + "package": "jmespath.swift", + "repositoryURL": "https://github.com/adam-fowler/jmespath.swift.git", + "state": { + "branch": null, + "revision": "4a166ea71f0d9e9cc3523fc3dee516080a4c36a0", + "version": "1.0.0" } }, { @@ -96,8 +123,17 @@ "repositoryURL": "https://github.com/vapor/jwt-kit.git", "state": { "branch": null, - "revision": "b50b30b567726b14ac282aa6d3a42a52c1ebc8c0", - "version": "4.2.2" + "revision": "846998c28d5c024137b61b8d788e2e7d21b16d08", + "version": "4.2.5" + } + }, + { + "package": "MetadataSystem", + "repositoryURL": "https://github.com/Apodini/MetadataSystem.git", + "state": { + "branch": null, + "revision": "5c5b7f0a01017785e3d265fa5d04f0e0b5b3a733", + "version": "0.1.0" } }, { @@ -105,8 +141,8 @@ "repositoryURL": "https://github.com/vapor/multipart-kit.git", "state": { "branch": null, - "revision": "c9ea04017b7fb3b1f034ad7a77f8e53d3e080be5", - "version": "4.2.1" + "revision": "30f53439b52587b016a5e5b3dce7f50f686681be", + "version": "4.4.0" } }, { @@ -118,6 +154,15 @@ "version": "2.4.0" } }, + { + "package": "PathKit", + "repositoryURL": "https://github.com/kylef/PathKit.git", + "state": { + "branch": null, + "revision": "e2f5be30e4c8f531c9c1e8765aa7b71c0a45d7a0", + "version": "0.9.2" + } + }, { "package": "RichJSONParser", "repositoryURL": "https://github.com/omochi/RichJSONParser.git", @@ -150,8 +195,8 @@ "repositoryURL": "https://github.com/soto-project/soto.git", "state": { "branch": null, - "revision": "9a7fcaa3e434b57c92bcb8a1b60ee9fdf84334c6", - "version": "5.6.0" + "revision": "3a8e82ac86a75e548504b6f5aeeeda209a4e7c27", + "version": "5.8.1" } }, { @@ -159,8 +204,8 @@ "repositoryURL": "https://github.com/soto-project/soto-core.git", "state": { "branch": null, - "revision": "c5776786a8cfd43b63b2258a143ae484e05b9c17", - "version": "5.3.1" + "revision": "283f0de557995848c1fea5893124956084b433f8", + "version": "5.6.0" } }, { @@ -168,8 +213,17 @@ "repositoryURL": "https://github.com/soto-project/soto-s3-file-transfer", "state": { "branch": null, - "revision": "14814e5894991705b2cc122c694bf0b3931f2c02", - "version": "0.3.1" + "revision": "6a35d736753d46f5dc76712855428de412967d94", + "version": "0.4.0" + } + }, + { + "package": "Spectre", + "repositoryURL": "https://github.com/kylef/Spectre.git", + "state": { + "branch": null, + "revision": "f79d4ecbf8bc4e1579fbd86c3e1d652fb6876c53", + "version": "0.9.2" } }, { @@ -177,8 +231,8 @@ "repositoryURL": "https://github.com/vapor/sql-kit.git", "state": { "branch": null, - "revision": "dd87127c7b005237b24ee24917c515ecae9ff0ef", - "version": "3.9.1" + "revision": "b70d1fea1b544dd819c17e83d59fb9aa85c81e74", + "version": "3.10.0" } }, { @@ -195,8 +249,8 @@ "repositoryURL": "https://github.com/apple/swift-argument-parser", "state": { "branch": null, - "revision": "986d191f94cec88f6350056da59c2e59e83d1229", - "version": "0.4.3" + "revision": "83b23d940471b313427da226196661856f6ba3e0", + "version": "0.4.4" } }, { @@ -204,8 +258,8 @@ "repositoryURL": "https://github.com/swift-server/swift-aws-lambda-runtime.git", "state": { "branch": null, - "revision": "e33e4afbf0e290029c9887f271ae2ad6a4a65269", - "version": "0.4.0" + "revision": "a9e15b13b30b6700056c4cfbdcf6a69382a9fb6f", + "version": "0.5.0" } }, { @@ -222,8 +276,8 @@ "repositoryURL": "https://github.com/apple/swift-collections", "state": { "branch": null, - "revision": "3426dba9ee5c9f8e4981b0fc9d39a818d36eec28", - "version": "0.0.4" + "revision": "9d8719c8bebdc79740b6969c912ac706eb721d7a", + "version": "0.0.7" } }, { @@ -258,8 +312,8 @@ "repositoryURL": "https://github.com/apple/swift-metrics.git", "state": { "branch": null, - "revision": "e382458581b05839a571c578e90060fff499f101", - "version": "2.1.1" + "revision": "3edd2f57afc4e68e23c3e4956bc8b65ca6b5b2ff", + "version": "2.2.0" } }, { @@ -267,8 +321,8 @@ "repositoryURL": "https://github.com/apple/swift-nio.git", "state": { "branch": null, - "revision": "9a992ee3de1f8da9f2968fc96b26714834f3105f", - "version": "2.31.1" + "revision": "1d425b0851ffa2695d488cce1d68df2539f42500", + "version": "2.31.2" } }, { @@ -285,8 +339,8 @@ "repositoryURL": "https://github.com/apple/swift-nio-http2.git", "state": { "branch": null, - "revision": "13b6a7a83864005334818d7ea2a3053869a96c04", - "version": "1.18.0" + "revision": "f6cde03ef8ad57e3bd25743d1e678efd1e5239f7", + "version": "1.18.1" } }, { @@ -294,8 +348,8 @@ "repositoryURL": "https://github.com/apple/swift-nio-ssl.git", "state": { "branch": null, - "revision": "9db7cee4b62c39160a6bd513a47a1ecdcceac18a", - "version": "2.14.0" + "revision": "2e74773972bd6254c41ceeda827f229bccbf1c0f", + "version": "2.15.0" } }, { @@ -312,8 +366,8 @@ "repositoryURL": "https://github.com/vapor/vapor.git", "state": { "branch": null, - "revision": "2ada54b7ce56cc6934cd2c0207bef2305bfbd7a1", - "version": "4.48.2" + "revision": "f9f68e5f417ef1de56222a80079a72605fbfde8d", + "version": "4.48.8" } }, { @@ -330,8 +384,8 @@ "repositoryURL": "https://github.com/vapor/websocket-kit.git", "state": { "branch": null, - "revision": "a2d26b3de8b3be292f3208d1c74024f76ac503da", - "version": "2.1.3" + "revision": "b1c4df8f6c848c2e977726903bbe6578eed723ad", + "version": "2.2.0" } }, { diff --git a/WebService/Package.swift b/WebService/Package.swift index f1d2e96..3b3c46b 100644 --- a/WebService/Package.swift +++ b/WebService/Package.swift @@ -22,8 +22,7 @@ let package = Package( name: "Buoy", dependencies: [ .product(name: "Apodini", package: "Apodini"), - .product(name: "ApodiniREST", package: "Apodini"), - .product(name: "ApodiniOpenAPI", package: "Apodini") + .product(name: "ApodiniHTTP", package: "Apodini") ] ), .testTarget( diff --git a/WebService/Sources/Buoy/Handlers/Buoy.swift b/WebService/Sources/Buoy/Handlers/Buoy.swift index 835a2c3..5263e67 100644 --- a/WebService/Sources/Buoy/Handlers/Buoy.swift +++ b/WebService/Sources/Buoy/Handlers/Buoy.swift @@ -1,6 +1,5 @@ import Apodini -import ApodiniOpenAPI -import ApodiniREST +import ApodiniHTTP import ArgumentParser @@ -11,9 +10,7 @@ struct BuoyWebService: WebService { var configuration: Configuration { HTTPConfiguration(port: port) - REST { - OpenAPI() - } + HTTP() } var content: some Component {