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

express-zod-api

Package Overview
Dependencies
Maintainers
0
Versions
432
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-zod-api - npm Package Versions

1
44

3.1.1

Diff

Changelog

Source

v3.1.1

  • No changes. Releasing as 3.1.1 due to a typo in Readme I found after publishing 3.1.0.
robintail
published 3.0.0 •

Changelog

Source

v3.0.0

  • Warning: There are breaking changes described below:
    • Minimum compatible Node version changed from ~~10~~ to 12.
    • The exports map restricts the possibility to import/require the package files to the entry points only.
    • The deprecated type ConfigType removed — please use createConfig() instead.
  • The library is now distributed as a dual package containing both CJS (CommonJS) and ESM (ECMAScript Module).
  • Mime version is 3.0.0.

Version 2

robintail
published 2.10.2 •

Changelog

Source

v2.10.2

  • The version of http-errors is 1.8.1.
robintail
published 3.0.0-beta2 •

robintail
published 3.0.0-beta1 •

robintail
published 2.10.1 •

Changelog

Source

v2.10.1

  • Mime version is 2.6.0.
  • Minor fix in importing Zod utility type.
robintail
published 2.10.0 •

Changelog

Source

v2.10.0

  • Feature #165. You can add examples to the generated documentation:
    • Introducing new method withMeta(). You can wrap any Zod schema in it, for example: withMeta(z.string());
    • withMeta() provides you with additional methods for generated documentation. At the moment there is one so far: withMeta().example();
    • You can use .example() multiple times for specifying several examples for your schema;
    • You can specify example for the whole IO schema or just for a one of its properties;
    • withMeta() can be used within Endpoint and Middleware as well. Their input examples will be merged for the generated documentation;
    • Check out the example of the generated documentation in the example folder;
    • Notice: withMeta() mutates its argument;
    • The feature suggested by @digimuza.
import { defaultEndpointsFactory } from "express-zod-api";

const exampleEndpoint = defaultEndpointsFactory.build({
  method: "post",
  description: "example user update endpoint",
  input: withMeta(
    z.object({
      id: z.number().int().nonnegative(),
      name: z.string().nonempty(),
    }),
  ).example({
    id: 12,
    name: "John Doe",
  }),
  output: withMeta(
    z.object({
      name: z.string(),
      timestamp: z.number().int().nonnegative(),
    }),
  ).example({
    name: "John Doe",
    timestamp: 1235698995125,
  }),
  handler: async () => {},
});
robintail
published 2.9.0 •

Changelog

Source

v2.9.0

  • Zod version is 3.11.6.
  • Feature #111. You can add description to any Zod schema, for example: z.string().describe('Something').
    • You can add description to a whole I/O schema or its property.
    • This description will be included into the generated Swagger / OpenAPI documentation.
example:
  parameters:
    - name: id
      in: query
      required: true
      schema:
        description: a numeric string containing the id of the user
        type: string
        pattern: /\d+/
robintail
published 2.8.2 •

Changelog

Source

v2.8.2

  • Zod version is 3.10.3.
robintail
published 2.8.1 •

Changelog

Source

v2.8.1

  • Fixed issue #169. Suddenly I found out that yarn does NOT respect yarn.lock files of sub-dependencies. So the version of zod defined in my yarn.lock file does not actually mean anything when doing yarn add express-zod-api.
    • The recently released version of Zod (3.10.x) seems to have some breaking changes, it should not be installed according to my lock file.
    • I'm locking the dependency versions in package.json file from now on.
    • npm users are also affected since the distributed lock file is for yarn.
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