Socket
Socket
Sign inDemoInstall

@readme/postman-to-openapi

Package Overview
Dependencies
Maintainers
9
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@readme/postman-to-openapi

Convert postman collection to OpenAPI spec


Version published
Weekly downloads
129K
decreased by-1.76%
Maintainers
9
Weekly downloads
 
Created

What is @readme/postman-to-openapi?

@readme/postman-to-openapi is an npm package that allows you to convert Postman collections to OpenAPI specifications. This is particularly useful for developers who want to document their APIs in a standardized format or migrate their API documentation from Postman to OpenAPI.

What are @readme/postman-to-openapi's main functionalities?

Convert Postman Collection to OpenAPI

This feature allows you to convert a Postman collection JSON file to an OpenAPI YAML file. You can specify options such as the default tag for the generated OpenAPI documentation.

const postmanToOpenApi = require('@readme/postman-to-openapi');

const postmanCollection = './path/to/your/postman/collection.json';
const outputFile = './path/to/output/openapi.yaml';

postmanToOpenApi(postmanCollection, outputFile, { defaultTag: 'General' })
  .then(result => {
    console.log(`OpenAPI specs written to: ${result}`);
  })
  .catch(err => {
    console.error(err);
  });

Convert Postman Collection to OpenAPI with Custom Options

This feature allows you to convert a Postman collection to an OpenAPI file with custom options such as title, version, and description for the API documentation.

const postmanToOpenApi = require('@readme/postman-to-openapi');

const postmanCollection = './path/to/your/postman/collection.json';
const outputFile = './path/to/output/openapi.yaml';

const options = {
  defaultTag: 'General',
  info: {
    title: 'My API',
    version: '1.0.0',
    description: 'This is a sample API'
  }
};

postmanToOpenApi(postmanCollection, outputFile, options)
  .then(result => {
    console.log(`OpenAPI specs written to: ${result}`);
  })
  .catch(err => {
    console.error(err);
  });

Other packages similar to @readme/postman-to-openapi

Keywords

FAQs

Package last updated on 01 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc