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/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", 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