Skip to content

Convert API descriptions between popular formats such as OpenAPI(fka Swagger), RAML, API Blueprint, WADL, etc.

License

Notifications You must be signed in to change notification settings

diamond0cat/api-spec-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-spec-converter

Convert between API description formats such as Swagger and RAML

Currently only supports conversion from Swagger 1.x to Swagger 2.0

Installation

Note: api-spec-converter is still in alpha. The API is not stable.

npm instal api-spec-converter

Usage

var Converter = require('api-spec-converter');
Converter.convert({
  from: 'swagger_1',
  to: 'swagger_2',
  url: 'https://api.gettyimages.com/swagger/api-docs',
}, function(err, converted) {
  console.log(converted.spec);
  FS.writeFileSync('swagger2.json', converted.stringify());
})

Supported Types

Swagger 1.x (swagger_1)

Can be converted to:

  • swagger_2

Can be converted from:

  • (none)

Swagger 2.0 (swagger_2)

Can be converted to:

  • (none)

Can be converted from:

  • swagger_1

RAML (raml)

Not yet implemented

API Blueprint (api_blueprint)

Not yet implemented

I/O Docs (io_docs)

Not yet implemented

Contributing

Contributions are welcome. I'll try to respond to pull requests within 24 hours.

About

Convert API descriptions between popular formats such as OpenAPI(fka Swagger), RAML, API Blueprint, WADL, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 49.6%
  • CSS 30.3%
  • TypeScript 12.1%
  • HTML 7.4%
  • RAML 0.6%