From 72d61d1bf450a9084e57c941135423216b2e2c8a Mon Sep 17 00:00:00 2001 From: Manuel Spigolon Date: Wed, 26 May 2021 07:33:55 +0200 Subject: [PATCH 1/2] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 64a5372..578b952 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fastify-snippets", - "version": "1.0.0", + "version": "1.0.1", "icon": "images/logo-256.png", "displayName": "Fastify Snippets", "description": "Make your Fastify developing even faster", From 2a62351ca813dc78fb7db92b361f901c1ab680b8 Mon Sep 17 00:00:00 2001 From: Manuel Spigolon Date: Thu, 1 Jul 2021 08:00:16 +0200 Subject: [PATCH 2/2] add addSchema snippet --- README.md | 1 + snippets/snippets-js.json | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 86f27ae..adc422f 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,7 @@ fastify application hook onReady|Add the fastify onReady application hook|ffonre fastify application hook onClose|Add the fastify onClose application hook|ffonclose, hookonclose fastify application hook onRoute|Add the fastify onRoute application hook|ffonroute, hookonroute fastify application hook onRegister|Add the fastify onRegister application hook|ffonregister, hookonregister +fastify add schema|Add a shared JSON schema to fastify|ffaddschema, ffsharedschema, ffjsonschema, ffschema ## Contribute diff --git a/snippets/snippets-js.json b/snippets/snippets-js.json index 781952b..0098fbb 100644 --- a/snippets/snippets-js.json +++ b/snippets/snippets-js.json @@ -260,5 +260,18 @@ "})" ], "description": "Add the fastify onRegister application hook" + }, + "fastify add schema": { + "scope": "javascript,typescript", + "prefix": [ + "ffaddschema", + "ffsharedschema", + "ffjsonschema", + "ffschema" + ], + "body": [ + "fastify.addSchema($0)" + ], + "description": "Add a shared JSON schema to fastify" } } \ No newline at end of file