
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
@fastify/any-schema
Advanced tools
Save multiple schemas and decide which one use to serialize the payload Edit
Save multiple schemas and decide which one to use to serialize the payload.
Internally uses fast-json-stringify to compile the schemas in extremely fast serialization functions, with all the benefits given by the library, such as preventing the leaking of sensitive data.
npm i @fastify/any-schema
Register the plugin and pass to it an array of schemas with an id, then use reply.schema(id) to decide which schema to use to serialize your data.
const fastify = require('fastify')()
fastify.register(require('@fastify/any-schema'), {
schemas: [{
$id: 'schema1',
type: 'object',
properties: {
hello: { type: 'string' }
}
}, {
$id: 'schema2',
type: 'object',
properties: {
winter: { type: 'string' }
}
}]
})
fastify.get('/:schema', (req, reply) => {
reply
.schema(req.params.schema)
.send({ hello: 'world' })
})
fastify.listen({ port: 3000 }, err => {
if (err) throw err
console.log(`server listening on ${fastify.server.address().port}`)
})
This project is kindly sponsored by:
Licensed under MIT.
FAQs
Save multiple schemas and decide which one use to serialize the payload Edit
The npm package @fastify/any-schema receives a total of 3 weekly downloads. As such, @fastify/any-schema popularity was classified as not popular.
We found that @fastify/any-schema demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.