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.
fastify-oas-loader
Advanced tools
This plugin follows the intention of creating the OpenAPI Scheme first and thereby performing request parameter validation based on it.
This plugin follows the intention of creating the OpenAPI Scheme first and thereby performing request parameter validation based on it.
This Plugin automatically sets the Fastify-Schema of the RouterOption by reading the pre-written OpenAPI Schema file('yaml', 'json').
After that, we expect Fastify to verify the request parameter based on the set Fastify-Schema.
npm install fastify-oas-loader
or with ESM syntax:
import fastify from 'fastify';
import oasSchema from 'fastify-oas-loader';
const app = fastify();
app.register(oasSchema, {
documentPath: 'openapi3.schema.yaml', // relative path to project root dir, required
ignoreRouters: [
{
method: 'GET',
path: '/health-check',
},
],
});
app.listen(3000);
// If you send request with invalid parameter schema, the server throws schema error
name | type | description | |
---|---|---|---|
documentPath | string | OpenAPI schema file(yaml, json) path, relative to project root | required |
ignoreRouters | { method: string, path: string }[] | You can only register the router described in Schema., but you can alow some routers ignore this rule | optional |
log | boolean | Whether to use the log. this plugin use fastify.log.info() & fastify.log.warn() | default true |
FAQs
This plugin follows the intention of creating the OpenAPI Scheme first and thereby performing request parameter validation based on it.
We found that fastify-oas-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.