0.1.8 • Published 6 years ago

apidoc-plugin-schema v0.1.8

Weekly downloads
1,194
License
MIT
Repository
github
Last release
6 years ago

apidoc-plugin-schema

Generates and inject apidoc elements from api schemas.

@apiSchema [(group)] {SCHEMA_TYPE=PATH_TO_SCHEMA} ELEMENT_TYPE

Install

npm install apidoc-plugin-schema --save-dev

Supported Schemas

jsonschema

  • description
  • type
  • array: items
  • object: properties,required
  • integer: minimum,maximum
  • number: minLength,maxLength
  • enum
  • default
  • auto groups object of array/object

Example Use

/**
 * @api {get} /api GetAPI
 * @apiSchema (Body) {jsonschema=./schema/api.req.json} apiParam
 * @apiSchema {jsonschema=./schema/api.res.json} apiSuccess
 */

Developer Note

This plugin uses parser-find-elements @ priority 201.

TODO

  • Add in unit test for jsonschema
  • Add in travis-ci
  • add in xml/wsdl schema type

jsonschema

  • add in support for exclusive number ranges
  • add support for "oneOf":[{"required":[...]},...]
  • add support for "oneOf":[{"type":"string"},...]
  • add support for allOf
0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago