Swagger 匯入 Postman 筆記

Daniel Huang
2 min readAug 24, 2020

--

方法一

取得Swagger的 JSON Link。

打開Postman 點選 Import。

打開 Postman 點選 Import

選擇 Import From Link 頁籤並填入 JSON Link。

選擇 Import From Link 頁籤並填入 Json Link

勾選 Generate a Postman Collection 後下一步。

Generate a Postman Collection

完成!

方法二

有別於方法一是使用Link的方式Import,另一個方法則是直接將該JSON貼到Paste Raw Text的欄位,其餘步驟皆與方法一相同。

補充: 單一API匯入

在Swagger上選擇要測試的API並執行,執行完成後複製 curl 區塊的內容。

複製 curl 區塊的內容

接著打開 Postman 選擇 Import/Paste Raw Text 貼上,再點選下一步即完成API匯入。

參考資料

  1. How to import Swagger APIs into Postman?
  2. API連線測試_使用Swagger+Postman+Newman進行API測試

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Daniel Huang
Daniel Huang

Written by Daniel Huang

一位Android工程師,每天對於如何在茫茫技術海中存活感到憂慮。每次動筆都不斷告訴自已,筆記不是為了別人,是為了自己。

No responses yet

Write a response