New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fastify-zod-openapi

Package Overview
Dependencies
Maintainers
0
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-zod-openapi - npm Package Compare versions

Comparing version 4.0.0 to 4.1.0

1

dist/index.d.ts

@@ -98,2 +98,3 @@ import { FastifyTypeProvider, FastifyPluginAsync, FastifyPluginOptions, RawServerBase, RawServerDefault, FastifyPluginCallback, FastifySchema, FastifySchemaCompiler } from 'fastify';

stringify?: (value: unknown) => string;
fallbackSerializer?: FastifySerializerCompiler<ZodType>;
}

@@ -100,0 +101,0 @@ declare const createSerializerCompiler: (opts?: SerializerOptions) => FastifySerializerCompiler<ZodType>;

13

package.json
{
"name": "fastify-zod-openapi",
"version": "4.0.0",
"version": "4.1.0",
"description": "Fastify plugin for zod-openapi",

@@ -62,10 +62,11 @@ "keywords": [

"@crackle/cli": "0.15.5",
"@fastify/swagger": "9.4.0",
"@fastify/swagger-ui": "5.2.0",
"@types/node": "22.10.2",
"@fastify/swagger": "9.4.2",
"@fastify/swagger-ui": "5.2.1",
"@fastify/under-pressure": "9.0.3",
"@types/node": "22.10.7",
"eslint-plugin-zod-openapi": "1.0.0",
"fastify": "5.2.0",
"fastify": "5.2.1",
"skuba": "9.1.0",
"zod": "3.24.1",
"zod-openapi": "4.2.0"
"zod-openapi": "4.2.2"
},

@@ -72,0 +73,0 @@ "peerDependencies": {

@@ -226,2 +226,12 @@ <p align="center">

By default, this library assumes that if a response schema provided is not a Zod Schema, it is a JSON Schema and will naively pass it straight into `fast-json-stringify`. This will not work in conjunction with Fastify's schema registration.
If you have other routes with response schemas which are not Zod Schemas, you can supply a `fallbackSerializer` to `createSerializerCompiler`.
```ts
const customSerializerCompiler = createSerializerCompiler({
fallbackSerializer: ({ schema, url, method }) => customSerializer(schema),
});
```
Please note: the `responses`, `parameters` components do not appear to be supported by the `@fastify/swagger` library.

@@ -228,0 +238,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc