Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@scalar/fastify-api-reference
Advanced tools
a fastify plugin to render an API reference from an OpenAPI file
This plugin provides an easy way to render a beautiful API reference based on a OpenAPI/Swagger file with Fastify.
npm install @scalar/fastify-api-reference
And then register it with Fastify:
await fastify.register(require('@scalar/fastify-api-reference'), {
routePrefix: '/reference',
})
If you have a OpenAPI/Swagger file already, you can pass an URL to the plugin:
// Render an API reference for a given OpenAPI/Swagger spec URL
fastify.register(require('@scalar/fastify-api-reference'), {
routePrefix: '/reference',
configuration: {
title: 'Our API Reference',
spec: {
url: '/openapi.json',
},
},
})
With [@fastify/swagger], we’re picking it up automatically, so this would be enough:
await fastify.register(require('@scalar/fastify-api-reference'), {
routePrefix: '/reference',
})
We wrote a detailed integration guide for Fastify.
The fastify plugin takes our universal configuration object, read more about configuration in the core package README.
By default, we’re using a custom Fastify theme and it’s beautiful. But you can choose one of our other themes, too:
await fastify.register(require('@scalar/fastify-api-reference'), {
routePrefix: '/reference',
configuration: {
theme: 'purple',
},
})
We are API nerds. You too? Let’s chat on Discord: https://discord.gg/scalar
The source code in this repository is licensed under MIT.
FAQs
a fastify plugin to render an API reference from an OpenAPI file
The npm package @scalar/fastify-api-reference receives a total of 41,996 weekly downloads. As such, @scalar/fastify-api-reference popularity was classified as popular.
We found that @scalar/fastify-api-reference demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.