npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

openapi2postman

v2.0.8

Published

openapi2postman

Downloads

177

Readme

🛠️ Openapi2Postman Release OpenApi Postman NPM License: LGPL v3

Openapi2Postman creates automatic tests from Openapi 3.0 using postman format. Also, it creates environments files, depending of configuration. Those collections can be importend in postan application. The tests includes tests for 2xx, 4xx... and tests to validate output formats.

This repository is intended for :octocat: community use, it can be modified and adapted without commercial use. If you need a version, support or help for your enterprise or project, please contact us 📧 [email protected]

Twitter Discord LinkedIn Facebook YouTube

🙌 Join the Openapi2postman Adopters list

📢 If Openapi2postman is part of your organization's toolkit, we kindly encourage you to include your company's name in our Adopters list. 🙏 This not only significantly boosts the project's visibility and reputation but also represents a small yet impactful way to give back to the project.

| Organization | Description of Use / Referenc | |---|---| | CloudAppi | Apification and generation of microservices | | Madrid Digital | Generation of microservices |

👩🏽‍💻 Contribute to ApiAddicts

We're an inclusive and open community, welcoming you to join our effort to enhance ApiAddicts, and we're excited to prioritize tasks based on community input, inviting you to review and collaborate through our GitHub issue tracker.

Feel free to drop by and greet us on our GitHub discussion or Discord chat. You can also show your support by giving us some GitHub stars ⭐️, or by following us on Twitter, LinkedIn, and subscribing to our YouTube channel! 🚀

"Buy Me A Coffee"

📑 Getting started

NPM

Install package

npm i openapi2postman -g

First steps

Arguments

| argv | a |description | |---|---|---| | --file | -f | path openapi file | | --configuration | -c | path config file |

Normal usage

o2p -c .\example\o2p_config_file.json -f .\example\petstore.yaml

Default config

o2p  -f .\example\petstore.yaml

If you do not use the -c argument, the following default configuration will be used. The output path target_folder is ./out.

  api_name: filename,
  is_inline: false,
  schema_is_inline: false,
  schema_pretty_print: true,
  environments:[
    {
      name : "DEV",
      postman_collection_name: "%api_name%_DEV",
      postman_environment_name: "%api_name%_DEV",
      target_folder: "./out",
      has_scopes: false,
      application_token: false,
      number_of_scopes: 0
    }
  ]

Table of content

Structure and submodules

  • docs - This module contents the guides to configurate and run the product. Documents Pdfs by CloudAppi.
  • example - Integration and system tests for SoapUI.
  • src – Source code
  • test - Testing folder

Build and run

Prerequisites

You need node v10 or later.

run

Please review the o2p_config_file.json before to execute the command Execute node index.js --configuration o2p_config_file.json --file example/swagger_provincias.yml

The output files are the following (in example folder):

  • SWAGGER_API_TestSuite_DEV.postman_collection.json
  • SWAGGER_API_TestSuiteEnv_DEV.postman_environment.json
  • SWAGGER_API_TestSuite_PROD.postman_collection.json
  • SWAGGER_API_TestSuiteEnv_PROD.postman_environment.json

In postman:

  • import generated postman collection file in postman
  • import generated postman environment file in postman
  • update variables in the envirnoment to test all cases

Configuration file

Collections and environments to generate can be configured using a JSON configuration file. Collection and environment name can be specified, as well as the target folder for resulting files, the authorizations collection to be used and some other characteristics. This configuration file has an specification and examples that can be read on the following document:
Configuration file openapi2postman. This document is only available in spanish by now. it will be soon translated to english.

an example configuration file is included in file structure.

Workspace configuration

Node.js and npm package manager are required to run the tool. Its adviced to use preconfigured installation tools provided by the manufacturer: https://nodejs.org/es/download/

💛 Sponsors