Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postman-collection-transformer

Package Overview
Dependencies
Maintainers
4
Versions
148
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postman-collection-transformer

Perform rapid conversation and validation of JSON structure between Postman Collection Format v1 and v2

  • 4.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
225K
decreased by-64.69%
Maintainers
4
Weekly downloads
 
Created

What is postman-collection-transformer?

The postman-collection-transformer npm package is a utility library for transforming Postman collections between different versions and formats. It allows users to convert collections to and from various Postman schema versions, making it easier to manage and maintain API collections.

What are postman-collection-transformer's main functionalities?

Convert Collection to Latest Version

This feature allows you to convert a Postman collection from an older version (e.g., 1.0.0) to the latest version (e.g., 2.1.0). This is useful for updating collections to be compatible with the latest Postman features.

const transformer = require('postman-collection-transformer');
const collectionV1 = { /* V1 collection JSON */ };
transformer.convert(collectionV1, { inputVersion: '1.0.0', outputVersion: '2.1.0' }, (err, collectionV2) => {
  if (err) { console.error(err); }
  else { console.log(collectionV2); }
});

Convert Collection to Specific Version

This feature allows you to convert a Postman collection from a newer version (e.g., 2.1.0) to an older version (e.g., 1.0.0). This can be useful for backward compatibility with tools or environments that only support older versions.

const transformer = require('postman-collection-transformer');
const collectionV2 = { /* V2 collection JSON */ };
transformer.convert(collectionV2, { inputVersion: '2.1.0', outputVersion: '1.0.0' }, (err, collectionV1) => {
  if (err) { console.error(err); }
  else { console.log(collectionV1); }
});

Validate Collection

This feature allows you to validate a Postman collection against a specific version schema. It helps ensure that the collection conforms to the expected structure and format.

const transformer = require('postman-collection-transformer');
const collection = { /* collection JSON */ };
transformer.validate(collection, { version: '2.1.0' }, (err, result) => {
  if (err) { console.error(err); }
  else { console.log(result); }
});

Other packages similar to postman-collection-transformer

Keywords

FAQs

Package last updated on 22 Oct 2021

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