Security News
Introducing the Socket Python SDK
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
@zeit/schemas
Advanced tools
The schemas contained within this package are used all across the ZEIT ecosystem to validate config files, requests to APIs and more. It ensures users always send just the right data.
It is important that these schemas stay in sync between projects, so that the validations are always performed in the same way for the same kind of object.
The files located in this repository are .js
and not .json
, because parsing JSON takes a little bit longer.
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:
npm link
@zeit/schemas
, just link it to the dependencies: npm link @zeit/schemas
and load it!Leo Lamprecht (@notquiteleo) - ZEIT
FAQs
All schemas used for validation that are shared between our projects
The npm package @zeit/schemas receives a total of 1,056,653 weekly downloads. As such, @zeit/schemas popularity was classified as popular.
We found that @zeit/schemas demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.
Security News
A new Rust RFC proposes "Trusted Publishing" for Crates.io, introducing short-lived access tokens via OIDC to improve security and reduce risks associated with long-lived API tokens.