0.0.2 • Published 8 years ago
wfs2swagger v0.0.2
WFS2Swagger
Introduction
WFS2Swagger is a module for converting WFS endpoints to a RESTful Swagger spec.
Installation
$ npm install wfs2swagger
Options
Option | Type | Description |
---|---|---|
wfs | string | The WFS endpoint URL (required) |
version | string | The version of the REST API (required) |
host | string | The hostname of the REST API (required) |
basePath | string | The base path of the REST API (optional, defaults to / ) |
schemes | array | The supported schemes of the REST API (optional, defaults to ['http', 'https'] ) |
produces | array | The 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.