# apemanschema

> JSON schema validator for apeman.

Latest version **7.2.0** (published 2016-12-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install apemanschema
pnpm add apemanschema
yarn add apemanschema
bun add apemanschema
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.2.0 |
| Published | 2016-12-04 |
| First published | 2015-10-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Taka Okunishi |
| Maintainers | okunishinishi |
| Keywords | apeman, schema, validator |

## Links

- npm: https://www.npmjs.com/package/apemanschema
- Repository: https://github.com/apeman-labo/apemanschema
- Homepage: https://github.com/apeman-labo/apemanschema#readme
- Issues: https://github.com/apeman-labo/apemanschema/issues
- npm.io page: https://npm.io/package/apemanschema

## Dependencies (6)

- [argx](https://npm.io/package/argx.md) ^3.0.1
- [iftype](https://npm.io/package/iftype.md) ^3.0.0
- [aschema](https://npm.io/package/aschema.md) ^2.0.4
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.6.1
- [colorprint](https://npm.io/package/colorprint.md) ^4.0.11
- [stringcase](https://npm.io/package/stringcase.md) ^3.2.0

## Alternatives

- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@regle/core](https://npm.io/package/@regle/core.md) — 47.0K weekly downloads
- [typeof-arguments](https://npm.io/package/typeof-arguments.md) — 12.5K weekly downloads
- [@lokalise/projects-engine-contracts](https://npm.io/package/@lokalise/projects-engine-contracts.md) — 978 weekly downloads
- [@osjwnpm/nam-laboriosam-quibusdam](https://npm.io/package/@osjwnpm/nam-laboriosam-quibusdam.md) — 70 weekly downloads

## Recent versions

- 7.2.0 (latest) — 2016-12-04
- 7.0.1 — 2016-08-23
- 7.0.0 — 2016-08-21
- 6.0.6 — 2016-08-14
- 6.0.5 — 2016-07-26
- 6.0.4 — 2016-07-11
- 6.0.3 — 2016-07-11
- 6.0.2 — 2016-07-11
- 6.0.1 — 2016-07-06
- 6.0.0 — 2016-07-06
- 5.0.2 — 2016-07-02
- 5.0.1 — 2016-05-29
- 5.0.0 — 2016-05-23
- 4.0.0 — 2016-04-17
- 3.0.4 — 2016-04-08
- … 17 more at https://npm.io/package/apemanschema/versions

## README

apemanschema
==========

<!---
This file is generated by ape-tmpl. Do not update manually.
--->

<!-- Badge Start -->
<a name="badges"></a>

[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![Code Climate][bd_codeclimate_shield_url]][bd_codeclimate_url]
[![Code Coverage][bd_codeclimate_coverage_shield_url]][bd_codeclimate_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]

[bd_repo_url]: https://github.com/apeman-labo/apemanschema
[bd_travis_url]: http://travis-ci.org/apeman-labo/apemanschema
[bd_travis_shield_url]: http://img.shields.io/travis/apeman-labo/apemanschema.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/apeman-labo/apemanschema
[bd_travis_com_shield_url]: https://api.travis-ci.com/apeman-labo/apemanschema.svg?token=
[bd_license_url]: https://github.com/apeman-labo/apemanschema/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/apeman-labo/apemanschema
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/apeman-labo/apemanschema.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/apeman-labo/apemanschema.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/apeman-labo/apemanschema
[bd_gemnasium_shield_url]: https://gemnasium.com/apeman-labo/apemanschema.svg
[bd_npm_url]: http://www.npmjs.org/package/apemanschema
[bd_npm_shield_url]: http://img.shields.io/npm/v/apemanschema.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

<!-- Badge End -->


<!-- Description Start -->
<a name="description"></a>

JSON schema validator for apeman.

<!-- Description End -->


<!-- Overview Start -->
<a name="overview"></a>



<!-- Overview End -->


<!-- Sections Start -->
<a name="sections"></a>

<!-- Section from "doc/guides/01.Installation.md.hbs" Start -->

<a name="section-doc-guides-01-installation-md"></a>

Installation
-----

```bash
$ npm install apemanschema --save
```


<!-- Section from "doc/guides/01.Installation.md.hbs" End -->

<!-- Section from "doc/guides/02.Usage.md.hbs" Start -->

<a name="section-doc-guides-02-usage-md"></a>

Usage
---------

Create a directory with name "schemas" and put schema files like "User.schema.json" there.

**schemas/user.json**
```javascript
{
  "title": "User",
  "description": "A user",
  "type": "object",
  "properties": {
    "id": {
      "description": "The unique identifier for a account",
      "type": "integer"
    },
    "accountName": {
      "description": "Name of the account",
      "type": "string"
    }
  },
  "required": [
    "id",
    "name"
  ]
}
```

**schemas/index.js**

```javascript
'use strict'

const apemanschema = require('apemanschema')

// Exports schemas as module.
module.exports = apemanschema(__dirname, {
  // Options
})

```

Then,

```javascript
'use strict'

// Require defined schemas
const schemas = require('./schemas/index.js')

let error = schemas('user').validate({
  name: 'foo'
})

console.log(error)

```


<!-- Section from "doc/guides/02.Usage.md.hbs" End -->


<!-- Sections Start -->


<!-- LICENSE Start -->
<a name="license"></a>

License
-------
This software is released under the [MIT License](https://github.com/apeman-labo/apemanschema/blob/master/LICENSE).

<!-- LICENSE End -->


<!-- Links Start -->
<a name="links"></a>

Links
------

+ [apeman][apeman_url]
+ [JSON schema][j_s_o_n_schema_url]
+ [tv4][tv4_url]

[apeman_url]: https://www.npmjs.com/package/apeman
[j_s_o_n_schema_url]: http://json-schema.org/
[tv4_url]: https://github.com/geraintluff/tv4

<!-- Links End -->

---
_Source: https://npm.io/package/apemanschema · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
