SlideShare a Scribd company logo
Converting Postman Collections
to Swagger Build
Prerequisites
● Apache Server
● pip installed on your machine
● Swagman tool
● Github basics
● Terminal Commands (unzip, mv, mkdir etc.)
● Postman Collection to convert
Installation: Apache Server
1. $ sudo apt-get install apache2
2. Update the default firewall:
a. $ sudo apt-get install apache2
b. Sudo ufw app list
c. Sudo ufw allow ‘Apache Full’
3. Type 127.0.0.1 in your web browser to confirm.
Installation: pip utility
1. $ sudo apt install python-pip
Do not upgrade the pip
version. Check the current
version with $ pip --version
pip is a python manager utility.
Swagman is a python built hence the pip
is required
TIPS
Installation: Swagman
1. $ Clone a repository from https://github.com/peopledoc/swagman
2. cd where the downloaded swagman-master.zip file:
a. $ cd swagman-master
3. Extract the .zip there itself: $ unzip swagman-master.zip
4. Install swagman:
a. $ pip install swagman
b. $ pip install -e . Do not miss the .
Postman Collections
● environment.json
Environment Quick Look > Edit > Download Environment
● Global.json
Quick look > Globals > edit > download
● Postman.json
.json of collection you have from Postman.
Using Swagman
● Command
swagman -e <environment.json file path> -g <global.json
file path> -f json -H 127.0.0.1 -o <Path where the
new.json file should be created> <Path of json
collection exported from Postman>
If json is not specified in the
command, this returns a
YAML file by default.
The localhost becomes active when
Apache Server (or any other) is installed
TIPS
Ping me or
Google if stuck!

More Related Content

PDF
POO - 01 - Introdução ao Paradigma Orientado a Objetos
PDF
POO - 10 - Herança
PDF
Go mobileでモバイルアプリを作ろう
PPTX
행동 기반 게임오브젝트
PDF
POO - 11 - Prática de Herança
PDF
모두의 마블 부분 유료화 아이템 제안서(고유 랜드마크) Ver.1.0.0
DOCX
PAROLA KIRMA SALDIRILARI
PDF
Caracterizacao de sistemas distribuidos
POO - 01 - Introdução ao Paradigma Orientado a Objetos
POO - 10 - Herança
Go mobileでモバイルアプリを作ろう
행동 기반 게임오브젝트
POO - 11 - Prática de Herança
모두의 마블 부분 유료화 아이템 제안서(고유 랜드마크) Ver.1.0.0
PAROLA KIRMA SALDIRILARI
Caracterizacao de sistemas distribuidos

What's hot (20)

PPTX
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)
PDF
BT Güvenlik ve Kariyer Klavuzu
PDF
Aula 4 - Estruturas condicionais
PDF
Sızma Testlerinde Armitage Kullanımı
PDF
Go MobileでAndroidアプリ開発
PDF
Controle de versão com Git
PPTX
Unreal python
PDF
Token, token... From SAML to OIDC
PPTX
Windows 10 CredentialGuard vs Mimikatz - SEC599
PDF
POO - 20 - Wrapper Classes
PDF
[IGC 2017] 아마존 구승모 - 게임 엔진으로 서버 제작 및 운영까지
PDF
POO - 19 - Elementos Estáticos
PDF
Siber Güvenlik ve Etik Hacking Sunu - 4
PDF
LLMNR ve NetBIOS Poisoning
PDF
Apostila Java Web (Servlets e JSPs)
PPTX
NDC17. "솔리테어: 덱다웃" 유니티 모바일 테스팅 기법들
PPTX
Comparison between Harry Potter and Holy Bible
PDF
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
PPTX
Nmapの真実(続)
PPTX
PHP と SAPI と ZendEngine3 と
GraalVMを3つの主機能から眺めてみよう(Oracle Groundbreakers APAC Virtual Tour 2020 講演資料)
BT Güvenlik ve Kariyer Klavuzu
Aula 4 - Estruturas condicionais
Sızma Testlerinde Armitage Kullanımı
Go MobileでAndroidアプリ開発
Controle de versão com Git
Unreal python
Token, token... From SAML to OIDC
Windows 10 CredentialGuard vs Mimikatz - SEC599
POO - 20 - Wrapper Classes
[IGC 2017] 아마존 구승모 - 게임 엔진으로 서버 제작 및 운영까지
POO - 19 - Elementos Estáticos
Siber Güvenlik ve Etik Hacking Sunu - 4
LLMNR ve NetBIOS Poisoning
Apostila Java Web (Servlets e JSPs)
NDC17. "솔리테어: 덱다웃" 유니티 모바일 테스팅 기법들
Comparison between Harry Potter and Holy Bible
전형규, M2 클라이언트 스레딩 아키텍쳐, NDC2013
Nmapの真実(続)
PHP と SAPI と ZendEngine3 と
Ad

Recently uploaded (20)

PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPT
Project quality management in manufacturing
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
additive manufacturing of ss316l using mig welding
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Welding lecture in detail for understanding
PPTX
Sustainable Sites - Green Building Construction
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPT
Mechanical Engineering MATERIALS Selection
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Project quality management in manufacturing
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
UNIT 4 Total Quality Management .pptx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
CH1 Production IntroductoryConcepts.pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
additive manufacturing of ss316l using mig welding
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
R24 SURVEYING LAB MANUAL for civil enggi
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Welding lecture in detail for understanding
Sustainable Sites - Green Building Construction
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Mechanical Engineering MATERIALS Selection
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Ad

Swagman - Converting Postman Collection to Swagger Build

  • 2. Prerequisites ● Apache Server ● pip installed on your machine ● Swagman tool ● Github basics ● Terminal Commands (unzip, mv, mkdir etc.) ● Postman Collection to convert
  • 3. Installation: Apache Server 1. $ sudo apt-get install apache2 2. Update the default firewall: a. $ sudo apt-get install apache2 b. Sudo ufw app list c. Sudo ufw allow ‘Apache Full’ 3. Type 127.0.0.1 in your web browser to confirm.
  • 4. Installation: pip utility 1. $ sudo apt install python-pip Do not upgrade the pip version. Check the current version with $ pip --version pip is a python manager utility. Swagman is a python built hence the pip is required TIPS
  • 5. Installation: Swagman 1. $ Clone a repository from https://github.com/peopledoc/swagman 2. cd where the downloaded swagman-master.zip file: a. $ cd swagman-master 3. Extract the .zip there itself: $ unzip swagman-master.zip 4. Install swagman: a. $ pip install swagman b. $ pip install -e . Do not miss the .
  • 6. Postman Collections ● environment.json Environment Quick Look > Edit > Download Environment ● Global.json Quick look > Globals > edit > download ● Postman.json .json of collection you have from Postman.
  • 7. Using Swagman ● Command swagman -e <environment.json file path> -g <global.json file path> -f json -H 127.0.0.1 -o <Path where the new.json file should be created> <Path of json collection exported from Postman> If json is not specified in the command, this returns a YAML file by default. The localhost becomes active when Apache Server (or any other) is installed TIPS
  • 8. Ping me or Google if stuck!

Editor's Notes

  • #4: 2.a. is sufficient. b and c are done to take https request (on 443) also.
  • #5: 2.a. is sufficient. b and c are done to take https request (on 443) also.
  • #7: Save all these files in a single location for it is easy to remember. Only the path of these files are to be passed as parameters in the swagman command.
  • #8: For Example: swagman -e /home/ajinkya.d/Downloads/e.json -g /home/ajinkya.d/Downloads/g.json -f json -H 127.0.0.1 -o /home/ajinkya.d/Downloads/resultsAjinkya.json /home/ajinkya.d/Downloads/clearLimits.postman_collection.json