Nonlinear Programming Methods

    @zeit/schemas

    2.19.0 • Public • Published

    ZEIT's schemas

    Build Status Join the community on Spectrum

    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.

    Why?

    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.

    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! 🎉

    Contributing

    1. Fork this repository to your own GitHub account and then clone it to your local device
    2. Link the package to the global module directory: npm link
    3. Within the module you want to test your local development instance of @zeit/schemas, just link it to the dependencies: npm link @zeit/schemas and load it!

    Author

    Leo Lamprecht (@notquiteleo) - ZEIT

    Keywords

    none

    Install

    npm i @zeit/schemas

    DownloadsWeekly Downloads

    1,130,328

    Version

    2.19.0

    License

    MIT

    Unpacked Size

    28.4 kB

    Total Files

    14

    Last publish

    Collaborators

    • crowterli
    • gsoltis
    • epallerols
    • domysee
    • nwienert
    • arbw
    • stephdietz
    • gudmundur
    • marcgreenstock
    • vvo
    • falcoagustin
    • nabsul
    • bmealey
    • maedahbatool
    • brethudson
    • matt.straka
    • jasongullickson
    • f3d0r
    • gaspar09
    • jtaylor0196
    • pieparker
    • kelly
    • dferber90
    • healeycodes
    • broph123
    • codybrouwers
    • gdborton
    • jeffreyarneson
    • ebb-tide
    • msimulcik
    • domeccleston
    • nutlope
    • hungrybearstudio
    • codetaromiura
    • gkaragkiaouris
    • geovanisouza92
    • dglsparsons
    • lostinpatterns
    • vercel-release-bot
    • southpolesteve
    • matheuss
    • igorklopov
    • nkzawa
    • tootallnate
    • rauchg
    • timneutkens
    • javivelasco
    • iamevilrabbit
    • kdy1
    • joecohens
    • quietshu
    • dav-is
    • styfle
    • zeit-bot
    • lucleray
    • mglagola
    • andybitz
    • paulogdm
    • anatrajkovska
    • timer
    • arzafran
    • ijjk
    • lfades
    • msweeneydev
    • williamli
    • ragojose
    • guybedford
    • paco
    • skllcrn
    • janicklas-ralph
    • atcastle
    • spanicker
    • housseindjirdeh
    • gmonaco
    • kikobeats
    • prateekbh
    • jkrems
    • jaredpalmer
    • gielcobben
    • chibicode
    • nazarenooviedo
    • samsisle
    • okbel
    • hankvercel
    • leerobinson
    • elsigh
    • julianbenegas
    • rizbizkits
    • sokra
    • cl3arglass
    • chriswdmr
    • ernestd
    • ismaelrumzan
    • jhoch
    • mitchellwright
    • mrmckeb
    • kuvos
    • creationix
    • huozhi
    • cmvnk
    • ktcarter
    • padmaia
    • delba
    • catsaremlg
    • steventey
    • gsandhu
    • dbredvick