Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

apidoc-plugin-schema2

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apidoc-plugin-schema2

JSON Schema Plugin for apidoc.

  • 0.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

apidoc-plugin-schema2

Generates and inject apidoc elements from api schemas.

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

Install

npm add --include=dev apidoc-plugin-schema

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

Keywords

FAQs

Package last updated on 30 Sep 2021

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc