0.0.2 • Published 8 years ago

wfs2swagger v0.0.2

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

WFS2Swagger

NPM

Introduction

WFS2Swagger is a module for converting WFS endpoints to a RESTful Swagger spec.

Installation

$ npm install wfs2swagger

Options

OptionTypeDescription
wfsstringThe WFS endpoint URL (required)
versionstringThe version of the REST API (required)
hoststringThe hostname of the REST API (required)
basePathstringThe base path of the REST API (optional, defaults to /)
schemesarrayThe supported schemes of the REST API (optional, defaults to ['http', 'https'])
producesarrayThe supported response media-types of the REST API (optional, defaults to ['application/json'])

Check the Swagger documentation for more information on these arguments.

Usage

var wfs2swagger = require('wfs2swagger');

wfs2swagger({
  wfs: 'https://geodata.nationaalgeoregister.nl/wijkenbuurten2014/wfs',
  version: '1.0',
  host: 'api.pdok.nl',
  basePath: '/v1'
}).then(function(spec) {
  console.log(spec);
}).catch(function(err) {
  console.error(err);
});

License

ISC License. See the LICENSE file.

0.0.2

8 years ago

0.0.1

8 years ago