1.3.2 • Published 5 years ago
odata2openapi v1.3.2
OData to OpenAPI converter
This node module converts an existing OData metadata to OpenAPI format.
Install
Run npm install --save odata2openapi
Usage
Converting existing XML string
Use the parse
and convert
methods if you have the metadata as XML.
JavaScript
const { parse, convert } = require('odata2openapi');
// Get the OData metadata as a string.
const xml = '';
const options = {
host: 'services.odata.org',
path: '/V4/Northwind/Northwind.svc'
};
parse(xml)
.then(service => convert(service.entitySets, options, service.version))
.then(swagger => console.log(JSON.stringify(swagger, null, 2)))
.catch(error => console.error(error))
TypeScript
import { parse, convert, Options } from 'odata2openapi';
const options: Options = {
host: 'services.odata.org',
path: '/V4/Northwind/Northwind.svc'
};
// Get the OData metadata as a string.
const xml = '';
parse(xml)
.then(service => convert(service.entitySets, options, service.version))
.then(swagger => console.log(JSON.stringify(swagger, null, 2)))
.catch(error => console.error(error))
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
6 years ago
1.2.4
7 years ago
1.2.3
7 years ago
1.2.2
7 years ago
1.2.1
7 years ago
1.2.0
7 years ago
1.1.0
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.2
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.0.22
8 years ago
0.0.21
8 years ago
0.0.20
8 years ago
0.0.19
8 years ago
0.0.18
8 years ago
0.0.17
8 years ago
0.0.16
8 years ago
0.0.15
8 years ago
0.0.14
8 years ago
0.0.13
8 years ago
0.0.11
8 years ago
0.0.10
8 years ago
0.0.9
8 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago