From a2d5e16c1e2fd7b799f2fc3c5b90da1d4e2612c8 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 16:53:36 -0400 Subject: [PATCH 01/14] FIX - missing .md in some SwiftPM links --- 3.0/docs/getting-started/structure.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/docs/getting-started/structure.md b/3.0/docs/getting-started/structure.md index 7c8519ca..c8fff977 100644 --- a/3.0/docs/getting-started/structure.md +++ b/3.0/docs/getting-started/structure.md @@ -5,7 +5,7 @@ you familiar with where things go. ## Folder Structure -Vapor's folder structure builds on top of [SPM's folder structure](spm#folder-structure). +Vapor's folder structure builds on top of [SPM's folder structure](spm.md#folder-structure). ``` . @@ -46,7 +46,7 @@ You will need to enable `FileMiddleware` in your `configure.swift` file before V This folder contains all of the Swift source files for your project. The top level folders (`App` and `Run`) reflect your package's modules, -as declared in the [package manifest](spm#targets). +as declared in the [package manifest](spm.md#targets). ### App From 88b6f9e52475c70734983ad8d53e202111f1b1ab Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 17:07:37 -0400 Subject: [PATCH 02/14] FIX - broken fluent/getting-started link due to missing .md --- 3.0/docs/auth/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/auth/getting-started.md b/3.0/docs/auth/getting-started.md index 2ef2c7de..7aebb232 100644 --- a/3.0/docs/auth/getting-started.md +++ b/3.0/docs/auth/getting-started.md @@ -1,6 +1,6 @@ # Getting Started with Auth -Auth ([vapor/auth](https://github.com/vapor/auth)) is a framework for adding authentication to your application. It builds on top of [Fluent](../fluent/getting-started) by using models as the basis of authentication. +Auth ([vapor/auth](https://github.com/vapor/auth)) is a framework for adding authentication to your application. It builds on top of [Fluent](../fluent/getting-started.md) by using models as the basis of authentication. !!! tip There is a Vapor API template with Auth pre-configured available. From 63ca6cfb4b68a62bc063ff881da527b254cca083 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 17:19:42 -0400 Subject: [PATCH 03/14] ADD - TOTP, HOTP and Data extension API reference url --- 3.0/docs/crypto/otp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/docs/crypto/otp.md b/3.0/docs/crypto/otp.md index 192be466..c42e44f5 100644 --- a/3.0/docs/crypto/otp.md +++ b/3.0/docs/crypto/otp.md @@ -22,7 +22,7 @@ let code = HOTP.SHA1.generate(secret: "hi", counter: 0) print(code) "208503" ``` -View the API docs for [`TOTP`](#fixme) and [`HOTP`](#fixme) for more information. +View the API docs for [`TOTP`](https://api.vapor.codes/crypto/latest/Crypto/Structs/TOTP.html) and [`HOTP`](https://api.vapor.codes/crypto/latest/Crypto/Structs/HOTP.html) for more information. ## Base 32 @@ -38,4 +38,4 @@ let secret: Data = ... let encodedSecret = secret.base32EncodedString() ``` -See Crypto's [`Data`](#fixme) extensions for more information. +See Crypto's [`Data`](https://api.vapor.codes/crypto/latest/Crypto/Extensions/Data.html) extensions for more information. From 7199db8d708a6b0fb7b7f0ddf4bc84a41c4d5797 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 17:46:30 -0400 Subject: [PATCH 04/14] FIX - database connections reference link --- 3.0/docs/fluent/querying.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/fluent/querying.md b/3.0/docs/fluent/querying.md index 3dfb9ee6..c61f164d 100644 --- a/3.0/docs/fluent/querying.md +++ b/3.0/docs/fluent/querying.md @@ -16,7 +16,7 @@ router.get("galaxies") { req in } ``` -You can use convenience methods on a `Container` to create connections manually. Learn more about that in [DatabaseKit → Overview → Connections](../database-kit/overview/#connections). +You can use convenience methods on a `Container` to create connections manually. Learn more about that in [DatabaseKit → Overview → Connections](../database-kit/overview.md#connections). ## Create From 7b32c1367d0b3d1eb2f15b159542b8710ffad13d Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 17:53:10 -0400 Subject: [PATCH 05/14] FIX - Choosing a Driver reference link --- 3.0/docs/fluent/transaction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/fluent/transaction.md b/3.0/docs/fluent/transaction.md index 4b228285..726d91d4 100644 --- a/3.0/docs/fluent/transaction.md +++ b/3.0/docs/fluent/transaction.md @@ -4,7 +4,7 @@ Transactions allow you to ensure multiple operations complete succesfully before To perform a transaction, you need access to something that can connect to the database. This is usually an incoming HTTP request. Use the [`transaction(on:_:)`](https://api.vapor.codes/fluent/latest/Fluent/Extensions/DatabaseConnectable.html#/s:11DatabaseKit0A11ConnectableP6FluentE11transaction2on_3NIO15EventLoopFutureCyqd_0_GAA0A10IdentifierVyqd__G_AJ10ConnectionQyd__KctAD21TransactionSupportingRd__r0_lF) method. -Fill in the Xcode placeholders below with your database's name from [Getting Started → Choosing a Driver](getting-started/#choosing-a-driver). +Fill in the Xcode placeholders below with your database's name from [Getting Started → Choosing a Driver](getting-started.md#choosing-a-driver). ```swift req.transaction(on: .<#dbid#>) { conn in From 2281b29b82c884194d10a62029deff690a23f2e7 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 17:56:12 -0400 Subject: [PATCH 06/14] FIX - Put s in the right place in Models --- 3.0/docs/getting-started/structure.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/getting-started/structure.md b/3.0/docs/getting-started/structure.md index c8fff977..1721c0a0 100644 --- a/3.0/docs/getting-started/structure.md +++ b/3.0/docs/getting-started/structure.md @@ -64,7 +64,7 @@ have many functions that accept a request and return some sort of response. #### Models The `Models` folder is a great place to store your [`Content`](content.md) structs or -Fluent [`Model`](../fluent/models.md)s. +Fluent [`Models`](../fluent/models.md). #### boot.swift From 3aa7f658b294e14ce07f48a95828887bea2aebe3 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 18:00:10 -0400 Subject: [PATCH 07/14] FIX - Async blocking section reference link --- 3.0/docs/http/client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/http/client.md b/3.0/docs/http/client.md index d9284a45..7c5c64ea 100644 --- a/3.0/docs/http/client.md +++ b/3.0/docs/http/client.md @@ -22,7 +22,7 @@ print(httpRes) // HTTPResponse Take note that we are passing the _hostname_. This is different from a full URL. You can use `URL` and `URLComponents` from Foundation to parse out a hostname. Vapor's convenience APIs do this automatically. !!! warning - This guide assumes you are on the main thread. Don't use `wait()` if you are inside of a route closure. See [Async → Overview](../async/overview/#blocking) for more information. + This guide assumes you are on the main thread. Don't use `wait()` if you are inside of a route closure. See [Async → Overview](../async/overview.md#blocking) for more information. After we have a connected HTTP client, we can send an [`HTTPRequest`](https://api.vapor.codes/http/latest/HTTP/Structs/HTTPRequest.html) using [`send(...)`](https://api.vapor.codes/http/latest/HTTP/Classes/HTTPClient.html#/s:4HTTP10HTTPClientC4sendXeXeF). This will return an [`HTTPResponse`](https://api.vapor.codes/http/latest/HTTP/Structs/HTTPResponse.html) containing the headers and body sent back from the server. See [HTTP → Message](message.md) for more information on HTTP messages. From d0f016401081290af8f9e0f38aa2e09c1acb1a17 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 18:07:15 -0400 Subject: [PATCH 08/14] FIX - database keyed-cache reference link --- 3.0/docs/redis/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/redis/overview.md b/3.0/docs/redis/overview.md index d9f6396a..8156405f 100644 --- a/3.0/docs/redis/overview.md +++ b/3.0/docs/redis/overview.md @@ -89,4 +89,4 @@ router.get("get") { req -> Future in } ``` -See [DatabaseKit → Overview](../database-kit/overview/#keyed-cache) for more information. +See [DatabaseKit → Overview](../database-kit/overview.md#keyed-cache) for more information. \ No newline at end of file From 6e66d6c01d678c4fd1946ba11631f8d8c53bc7db Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 18:10:50 -0400 Subject: [PATCH 09/14] Nit: Parameters instead of Parameters --- 3.0/docs/routing/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/routing/overview.md b/3.0/docs/routing/overview.md index f4f205fd..bf028b4b 100644 --- a/3.0/docs/routing/overview.md +++ b/3.0/docs/routing/overview.md @@ -5,7 +5,7 @@ Routing ([vapor/routing](https://github.com/vapor/routing)) is a small framework !!! tip If you use Vapor, most of Routing's APIs will be wrapped by more convenient methods. See [Vapor → Routing] for more information. -This guide will show you how to register a static route and a dynamic route and how to use [`Parameter`](https://api.vapor.codes/routing/latest/Routing/Protocols/Parameter.html)s. +This guide will show you how to register a static route and a dynamic route and how to use [`Parameters`](https://api.vapor.codes/routing/latest/Routing/Protocols/Parameter.html). ## Register From d75fbfa7a64e361aa4bdca1d36881469b29e163b Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 18:14:21 -0400 Subject: [PATCH 10/14] FIX - spm reference link FIX - structure reference link --- 3.0/docs/service/provider.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/docs/service/provider.md b/3.0/docs/service/provider.md index af6c8ea7..6add8ea4 100644 --- a/3.0/docs/service/provider.md +++ b/3.0/docs/service/provider.md @@ -9,7 +9,7 @@ Providers can: ## Register -Once you have added a Service-exposing [SPM dependency](../getting-started/spm/#dependencies) to your project, adding the provider is easy. +Once you have added a Service-exposing [SPM dependency](../getting-started/spm.md#dependencies) to your project, adding the provider is easy. ```swift import Foo @@ -17,7 +17,7 @@ import Foo try services.register(FooProvider()) ``` -This is usually done in [`configure.swift`](../getting-started/structure/#configureswift). +This is usually done in [`configure.swift`](../getting-started/structure.md#configureswift). !!! note You can search GitHub for the [`vapor-service`](https://github.com/topics/vapor-service) tag for a list of packages that expose services using this method. From f06c88f3c4a18061b1b3148699fbcf71c42661a0 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 18:23:18 -0400 Subject: [PATCH 11/14] FIX - broken structure reference link --- 3.0/docs/service/services.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/docs/service/services.md b/3.0/docs/service/services.md index 0a707d41..7456d7bf 100644 --- a/3.0/docs/service/services.md +++ b/3.0/docs/service/services.md @@ -17,7 +17,7 @@ It's an empty protocol so there should be no missing requirements. ### Factory -Now the service can be registered to the [`Services`](https://api.vapor.codes/service/latest/Service/Structs/Services.html) struct. This is usually done in [`configure.swift`](../getting-started/structure/#configureswift). +Now the service can be registered to the [`Services`](https://api.vapor.codes/service/latest/Service/Structs/Services.html) struct. This is usually done in [`configure.swift`](../getting-started/structure.md#configureswift). ```swift services.register(Logger.self) { container in @@ -81,7 +81,7 @@ default: config.prefer(PrintLogger.self, for: Logger.self) } ``` -Here we are using the [`Environment`](https://api.vapor.codes/service/latest/Service/Structs/Environment.html) to dynamically prefer a service. This is usually done in [`configure.swift`](../getting-started/structure/#configureswift). +Here we are using the [`Environment`](https://api.vapor.codes/service/latest/Service/Structs/Environment.html) to dynamically prefer a service. This is usually done in [`configure.swift`](../getting-started/structure.md#configureswift). !!! note You can also dynamically _register_ services based on environment instead of using service config. From dfa25a7c3e41e39b5211504ddc02c7df741cf6ed Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 18:26:34 -0400 Subject: [PATCH 12/14] FIX - database connections reference link --- 3.0/docs/sql/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/sql/overview.md b/3.0/docs/sql/overview.md index 9fb223ba..34f92683 100644 --- a/3.0/docs/sql/overview.md +++ b/3.0/docs/sql/overview.md @@ -26,7 +26,7 @@ router.get("sql") { req in } ``` -Check out [Database Kit → Overview → Connections](../database-kit/overview.md/#connections) for more information. The rest of this guide will assume you have access to a SQL database connection. +Check out [Database Kit → Overview → Connections](../database-kit/overview.md#connections) for more information. The rest of this guide will assume you have access to a SQL database connection. ## Select From c4509b5eaa6698f6a0ac0c146cd5f2086760189a Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Sat, 12 Jan 2019 18:31:21 -0400 Subject: [PATCH 13/14] FIX - http getting-started reference link --- 3.0/docs/websocket/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.0/docs/websocket/getting-started.md b/3.0/docs/websocket/getting-started.md index 1a7c1c0b..04057221 100644 --- a/3.0/docs/websocket/getting-started.md +++ b/3.0/docs/websocket/getting-started.md @@ -1,6 +1,6 @@ # Getting Started with WebSocket -WebSocket ([vapor/websocket](https://github.com/vapor/websocket)) is a non-blocking, event-driven WebSocket library built on SwiftNIO. It makes working with SwiftNIO's WebSocket handlers easy and provides integration with [HTTP](../http/getting-started) clients and servers. Creating a WebSocket echo server takes just a few lines of code. +WebSocket ([vapor/websocket](https://github.com/vapor/websocket)) is a non-blocking, event-driven WebSocket library built on SwiftNIO. It makes working with SwiftNIO's WebSocket handlers easy and provides integration with [HTTP](../http/getting-started.md) clients and servers. Creating a WebSocket echo server takes just a few lines of code. !!! tip If you use Vapor, most of WebSocket's APIs will be wrapped by more convenient methods. From 5d7b56c613ac1a48c230990f9571d5a9c823fd68 Mon Sep 17 00:00:00 2001 From: Jhonny Bill Date: Mon, 14 Jan 2019 06:35:12 -0400 Subject: [PATCH 14/14] Nit: move s outside the --- 3.0/docs/getting-started/structure.md | 2 +- 3.0/docs/routing/overview.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/3.0/docs/getting-started/structure.md b/3.0/docs/getting-started/structure.md index 1721c0a0..2503251a 100644 --- a/3.0/docs/getting-started/structure.md +++ b/3.0/docs/getting-started/structure.md @@ -64,7 +64,7 @@ have many functions that accept a request and return some sort of response. #### Models The `Models` folder is a great place to store your [`Content`](content.md) structs or -Fluent [`Models`](../fluent/models.md). +Fluent [`Model`s](../fluent/models.md). #### boot.swift diff --git a/3.0/docs/routing/overview.md b/3.0/docs/routing/overview.md index bf028b4b..a7bc5521 100644 --- a/3.0/docs/routing/overview.md +++ b/3.0/docs/routing/overview.md @@ -5,7 +5,7 @@ Routing ([vapor/routing](https://github.com/vapor/routing)) is a small framework !!! tip If you use Vapor, most of Routing's APIs will be wrapped by more convenient methods. See [Vapor → Routing] for more information. -This guide will show you how to register a static route and a dynamic route and how to use [`Parameters`](https://api.vapor.codes/routing/latest/Routing/Protocols/Parameter.html). +This guide will show you how to register a static route and a dynamic route and how to use [`Parameter`s](https://api.vapor.codes/routing/latest/Routing/Protocols/Parameter.html). ## Register