This package has been deprecated

Author message:

fury-adapter-remote has been renamed to @apielements/remote

fury-adapter-remote

0.5.0 • Public • Published

Fury Remote Adapter

NPM version License

This adapter provides support for parsing, validation and serialization via the API Elements Web Service in Fury.

The remote adapter can be configured to work with any API service compatible with API Blueprint API. By default the API Elements Web Service is used.

const defaultOptions = {
  // the default value, but consumers should be able to override to use their own deployment
  url: 'https://api.apielements.org',
 
  parseEndpoint: '/parser',
  validateEndpoint: '/validate',
  serializeEndpoint: '/composer',
 
  mediaTypes: {
    // the collection of "parse", media types we want this
    // instance of the adapter to handle.
    // NOTE, this allows you to use the API for one media type but
    // another local adapter for another.
    parse: [
      'text/vnd.apiblueprint',
      'application/swagger+json',
      'application/swagger+yaml',
      'application/vnd.oai.openapi',
      'application/vnd.oai.openapi+json',
    ],
 
    validate: [
      'text/vnd.apiblueprint',
      'application/swagger+json',
      'application/swagger+yaml',
      'application/vnd.oai.openapi',
      'application/vnd.oai.openapi+json',
    ],
 
    // the collection of "serialize", media types we want this
    // instance of the adapter to handle.
    serialize: [
      'text/vnd.apiblueprint',
    ],
  }
};

Install

$ npm install fury-adapter-remote

Usage

const { Fury } = require('fury');
const FuryRemoteAdapter = require('fury-adapter-remote');
 
const fury = new Fury();
fury.use(new FuryRemoteAdapter(options);
 
fury.validate(...);
fury.parse(...);
fury.serialise(...);

Readme

Keywords

none

Package Sidebar

Install

npm i fury-adapter-remote

Weekly Downloads

0

Version

0.5.0

License

MIT

Unpacked Size

8.94 kB

Total Files

5

Last publish

Collaborators

  • kylef