From 6875373ff2d14a663c01763e44e9f02c84ccb2f3 Mon Sep 17 00:00:00 2001 From: Roberto Bianchi Date: Fri, 9 Feb 2024 12:25:55 +0100 Subject: [PATCH 1/3] chore(ts): Fix links Signed-off-by: Roberto Bianchi --- docs/Reference/TypeScript.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Reference/TypeScript.md b/docs/Reference/TypeScript.md index 3fa07159e2..9b3f1b1750 100644 --- a/docs/Reference/TypeScript.md +++ b/docs/Reference/TypeScript.md @@ -196,7 +196,7 @@ documentation below to learn more about what is available. To validate your requests and responses you can use JSON Schema files. If you didn't know already, defining schemas for your Fastify routes can increase their throughput! Check out the [Validation and -Serialization](./Validation-and-Serialization.md) documentation for more info. +Serialization](../Validation-and-Serialization) documentation for more info. Also it has the advantage to use the defined type within your handlers (including pre-validation, etc.). @@ -211,7 +211,7 @@ Fastify offers two packages wrapping `json-schema-to-ts` and `typebox`: - `@fastify/type-provider-typebox` They simplify schema validation setup and you can read more about them in [Type -Providers](./Type-Providers.md) page. +Providers](../Type-Providers) page. Below is how to setup schema validation using vanilla `typebox` and `json-schema-to-ts` packages. @@ -1093,7 +1093,7 @@ server.get('/', async (request, reply) => { ``` If you want to see a detailed example of using this interface check out the -Learn by Example section: [JSON Schema](#jsonschema). +Learn by Example section: [JSON Schema](#json-schema). ##### fastify.RawRequestDefaultExpression\<[RawServer][RawServerGeneric]\> [src](https://github.com/fastify/fastify/blob/main/types/utils.d.ts#L23) From fd9365aa93f8ec2791a28953f14e54365b7540be Mon Sep 17 00:00:00 2001 From: Roberto Bianchi Date: Fri, 9 Feb 2024 13:23:24 +0100 Subject: [PATCH 2/3] Use absolute URLs Signed-off-by: Roberto Bianchi --- docs/Reference/TypeScript.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/Reference/TypeScript.md b/docs/Reference/TypeScript.md index 9b3f1b1750..1858e785a5 100644 --- a/docs/Reference/TypeScript.md +++ b/docs/Reference/TypeScript.md @@ -196,7 +196,8 @@ documentation below to learn more about what is available. To validate your requests and responses you can use JSON Schema files. If you didn't know already, defining schemas for your Fastify routes can increase their throughput! Check out the [Validation and -Serialization](../Validation-and-Serialization) documentation for more info. +Serialization](https://fastify.dev/docs/latest/Reference/Validation-and-Serialization/) +documentation for more info. Also it has the advantage to use the defined type within your handlers (including pre-validation, etc.). @@ -211,7 +212,7 @@ Fastify offers two packages wrapping `json-schema-to-ts` and `typebox`: - `@fastify/type-provider-typebox` They simplify schema validation setup and you can read more about them in [Type -Providers](../Type-Providers) page. +Providers](https://fastify.dev/docs/latest/Reference/Type-Providers/) page. Below is how to setup schema validation using vanilla `typebox` and `json-schema-to-ts` packages. From 24d10bb9a8499c743186e422332f42ab50bcd61a Mon Sep 17 00:00:00 2001 From: Roberto Bianchi Date: Fri, 9 Feb 2024 15:21:09 +0100 Subject: [PATCH 3/3] Revert Signed-off-by: Roberto Bianchi --- docs/Reference/TypeScript.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/Reference/TypeScript.md b/docs/Reference/TypeScript.md index 1858e785a5..d339ef83c7 100644 --- a/docs/Reference/TypeScript.md +++ b/docs/Reference/TypeScript.md @@ -196,8 +196,7 @@ documentation below to learn more about what is available. To validate your requests and responses you can use JSON Schema files. If you didn't know already, defining schemas for your Fastify routes can increase their throughput! Check out the [Validation and -Serialization](https://fastify.dev/docs/latest/Reference/Validation-and-Serialization/) -documentation for more info. +Serialization](./Validation-and-Serialization.md) documentation for more info. Also it has the advantage to use the defined type within your handlers (including pre-validation, etc.). @@ -212,7 +211,7 @@ Fastify offers two packages wrapping `json-schema-to-ts` and `typebox`: - `@fastify/type-provider-typebox` They simplify schema validation setup and you can read more about them in [Type -Providers](https://fastify.dev/docs/latest/Reference/Type-Providers/) page. +Providers](./Type-Providers.md) page. Below is how to setup schema validation using vanilla `typebox` and `json-schema-to-ts` packages.