Created
May 17, 2018 03:52
-
-
Save israeleriston/b54eb7aebbfbbf596a9a16a0a42eb533 to your computer and use it in GitHub Desktop.
Simple scheme using fastify
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const schema = { | |
response: { | |
'2xx': { | |
type: 'object', | |
properties: { | |
value: { type: 'string' }, | |
otherValue: { type: 'boolean' } | |
} | |
}, | |
201: { | |
type: 'object', | |
properties: { | |
value: { type: 'string' } | |
} | |
} | |
} | |
} | |
fastify.post('/the/url', { schema }, handler) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment