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

speccy

Package Overview
Dependencies
Maintainers
2
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

speccy

Your friendly OpenAPI v3.0 #WellActually CLI assistant.

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
19K
decreased by-5.81%
Maintainers
2
Weekly downloads
 
Created
Source

speccy

Build Status Coverage Status Known Vulnerabilities

Make sure your OpenAPI 3.0 specifications are more than just valid, make sure they're useful!

Taking off from where Mike Ralphson started with linting in swagger2openapi, Speccy aims to become the rubocop or eslint of OpenAPI.

OpenAPI Specification

Currently tracking v3.0.0

If you want to run speccy on OpenAPI (f.k.a Swagger) v2.0 specs, run it through swagger2openapi first and speccy can give advice on the output.

Usage

Usage: speccy <command>


Options:

  -V, --version  output the version number
  -h, --help     output usage information


Commands:

  lint [options] <file-or-url>  Ensure your OpenAPI files are valid and up to scratch

Right now the only command is lint, which looks like this:

Usage: lint [options] <file-or-url>

Ensure your OpenAPI files are valid and up to scratch

Options:

    -r, --rules [ruleFile]  use this multiple times to select multiple rules files
    -h, --help              output usage information

You'll see output such as:

#/info  R: info-contact  D: info object should contain contact object

expected Object {
  version: '5.0',
  title: 'Foo API'
} to have property contact

There are going to be different things people are interested in, so the default rules suggest things we think everyone should do; adding descriptions to parameters and operations, and having some sort of contact info.

There are strict rules which demand more contact details, "real" domains, a license, and requires tags have a description!

There are also wework rules, building things we consider important on top of the strict rules; keeping summaries short (so they fit into ReDoc navigation for example).

Features

Rules

Rule actions from the default rules will be used if no rules file is specified. Right now there are only the three bundled options, but supporting custom rules files via local path and URL is on the roadmap.

Contributions of rules and rule actions for the linter are very much appreciated.

Tests

To run the test-suite:

npm test

License

BSD-3-Clause except the openapi-3.0.json schema, which is taken from the OpenAPI-Specification and the alternative gnostic-3.0.json schema, which is originally from Google Gnostic. Both of these are licensed under the Apache-2 license.

Keywords

FAQs

Package last updated on 08 Feb 2018

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