Socket
Socket
Sign inDemoInstall

@zeit/schemas

Package Overview
Dependencies
0
Maintainers
5
Versions
58
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @zeit/schemas

All schemas used for validation that are shared between our projects


Version published
Weekly downloads
1.5M
increased by1.35%
Maintainers
5
Install size
33.2 kB
Created
Weekly downloads
 

Readme

Source

Vercel Schemas

Schemas used across many Vercel packages to validating config files, requests to APIs, and more.

Why?

  • Keep schemas used across Vercel projects in sync
  • We use .js instead of .json because parsing JSON takes longer

Usage

To get started, pick one of the schemas in this repository and load it:

const schema = require('@zeit/schemas/deployment/config');

Next, set up AJV (the validator) and run the schema through it:

const AJV = require('ajv');

const ajv = new AJV({ allErrors: true });
const isValid = ajv.validate(schema, <object-to-validate>);

if (!isValid) {
	console.error(`The following entries are wrong: ${JSON.stringify(ajv.errors)}`);
}

That is all! :tada:

Contributing

We are currently not accepting external contributions for this repository.

FAQs

Last updated on 02 Jan 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc