Nunjucks Powers Mozilla

    @mountainpass/problem-document
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.46 • Public • Published

    problem-document

    A basic RFC7807 Problem Details document with basic type checking and autocomplete

    License npm npm downloads FOSSA Status

    Build Status GitHub issues GitHub pull requests

    source code vulnerabilities npm package vulnerabilities

    Conventional Commits code style: prettier Contributor Covenant

    I love badges

    Installation

    npm

    run the following command in your project

    npm install @mountainpass/problem-document

    yarn

    run the following command in your project

    yarn add @mountainpass/problem-document

    projen

    Add @mountainpass/problem-document to your deps in your .projen.js or projen.ts. e.g.

    ///...
    const project = new NodeProject({
        //...
        deps: [
            //...
            '@mountainpass/problem-document'
        ]
    });

    and run npx projen

    Usage

    import { ProblemDocument } from "@mountainpass/problem-document";
    
    //...
    const problemDocument = new ProblemDocument({
        type: "https://example.com/probs/out-of-credit",
        title: "You do not have enough credit.",
        detail: "Your current balance is 30, but that costs 50.",
        instance: "/account/12345/msgs/abc",
        balance: 30,
        accounts: ["/account/12345",
                     "/account/67890"]
      });

    Install

    npm i @mountainpass/problem-document

    DownloadsWeekly Downloads

    273

    Version

    0.0.46

    License

    Apache-2.0

    Unpacked Size

    273 kB

    Total Files

    31

    Last publish

    Collaborators

    • tompahoward
    • nickgrealy