🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

@zeit/schemas

Package Overview
Dependencies
Maintainers
5
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zeit/schemas

All schemas used for validation that are shared between our projects

latest
Source
npmnpm
Version
2.38.0
Version published
Weekly downloads
2.6M
-21.65%
Maintainers
5
Weekly downloads
 
Created
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

Package last updated on 10 Jan 2025

Did you know?

Socket

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