Socket
Socket
Sign inDemoInstall

fury-adapter-swagger

Package Overview
Dependencies
Maintainers
7
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fury-adapter-swagger

Swagger 2.0 parser for Fury.js


Version published
Weekly downloads
1.2K
increased by3.58%
Maintainers
7
Weekly downloads
 
Created
Source

Fury Swagger 2.0 Adapter

NPM version License

This adapter provides support for parsing Swagger 2.0 in Fury. It does not yet provide a serializer.

Install

npm install fury-adapter-swagger

Usage

import fury from 'fury';
import swaggerAdapter from 'fury-adapter-swagger';

fury.use(swaggerAdapter);

fury.parse({source: '... your Swagger 2.0 document ...'}, (err, result) => {
  if (err) {
    console.log(err);
    return;
  }

  // The returned `result` is a Minim parse result element.
  console.log(result.api.title);
});

Parser Codes

The following codes are used by the parser when creating warning and error annotations.

Warnings:

CodeDescription
2Source maps are unavailable due either to the input format or an issue parsing the input.
3Data is being lost in the conversion.

Errors:

CodeDescription
1Error parsing input (e.g. malformed YAML).
4Swagger validation error.
5Swagger to Refract converter error (JS exception).

Swagger Vendor Extensions

Some Swagger Vendor extensions found in source Swagger documents are converted into the output API Element as extension elements.

The following locations of vendor extensions are supported:

  • within the info object
  • within the paths object
  • within the path-item object
  • within the operation object
  • within the responses object
  • within the security-scheme object

These vendor extensions will be available as extensions using the relation https://help.apiary.io/profiles/api-elements/vendor-extensions/.

FAQs

Package last updated on 20 Apr 2020

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