postman and postman2md

postman
API μμ
μ ν λ ν
μ€νΈν μ μλ ν΄μ΄ νμνλ°, μ½κ² ν
μ€νΈ ν μ μλ postman μ΄λΌλ ν΄μ΄ μλ€. λ‘κ·ΈμΈλ νμμκ³ μ½κ² GET, POST λ±μ HTTP κΈ°λ°μ APIλ€μ ν
μ€νΈν μ μλ€. νΉν history κΈ°λ₯μ΄ μμ΄μ λ§€μ° μ’μλ° μΈμ λ€μ΄κ°λλΌλ μ΄μ μ λ΄κ° ν
μ€νΈνλ λ΄μλ€μ λ³Ό μκ° μλ€. postman μ΄ 2.0 μΌλ‘ λ²μ μ
μ νλ©΄μ λ‘κ·ΈμΈμ ν μκ° μκ³ collection μ΄λΌλ κ°λ
μ λμ
νλ€. collection μ κΈ°μ‘΄μ ν
μ€νΈ λ΄μμ λν μ§ν©κ°λ
μΈλ°, λ΄κ° ν
μ€νΈ νλ κ²λ€μ λ¬Άμ΄μ κ΄λ¦¬ ν μκ° μλ€. κ·Έλμ μ¬λ¬ collection μ λ§λ€μ μλλ°, νΉλ³ν κΈ°λ₯μ€ νλλ collection μ¦, ν
μ€νΈ νλͺ©μ μ§ν©λ€μ json ννλ‘ λ€μ΄ λ°λ κΈ°λ₯μ μ 곡νκ³ μλ€. Β
postman2md μκ° λ° κ°λ°κΈ°
postman-to-markdown(μ΄ν postman2md)μ postman μμ λ€μ΄λ°μ collection json νμμ markdown μΌλ‘ λ³νν΄μ£Όλ νμ΄μ¬(python)μΌλ‘ λ§λ ν΄μ΄λ€. μΌλ¨ λ³΄ν΅ API λ₯Ό μ μνκ³ (λ¬Έμκ° μλ λλ΅ μκ°μΌλ‘) λ§λ€λ©΄μ postman μΌλ‘ ν
μ€νΈνλ λ°©μμΌλ‘ κ°λ°μ νκ² λλλ°, μ°¨νμ λ€μ κ°λ°ν κ²μ λ°νμΌλ‘ API λ¬Έμλ₯Ό markdown νμμΌλ‘ λ§λλ κ³Όμ μ κ±°μΉλ κ²μ μκ² λμλ€.(λ€λ₯Έ λΆλ€μ λ€λ₯Έ κ³Όμ μΌλ‘ κ°λ°νκ² μ§λ§.) κ·Έλμ κ΅³μ΄ λ€μ APIλ₯Ό λ³΄κ³ markdown μ λ§λ€κΈ° 보λ€λ ν
μ€νΈν postmanμ μ΄μ©ν΄μ μ΄λμ λμ markdown κΈ°λ°μ APIλ¬Έμλ₯Ό λ§λλκ² νμνλ€κ³ μκ°νκ² λμλ€.
μ¬μ©λ²μ μμ κ°λ€. postman collection jsonμ λ΄λΆμ νλ μ΄μμ API ν
μ€νΈλ₯Ό κ°μ§κ³ μκΈ° λλ¬Έμ markdown νμΌ μμ νλ νΉμ νλμ΄μμΌλ‘ λ§λ€μ§λ₯Ό μ νν μ μλλ° multi_file
μ false κ°μ μ£Όκ² λλ©΄ νλμ νμΌλ‘ λ§λ€μ΄ μ€λ€. λ§λ€μ΄μ§λ νμΌμ κ²½λ‘λ νμ¬ κ²½λ‘μμ ν΄λΉ collection μ΄λ¦μ λλ ν λ¦¬κ° μκΈ°κ³ νμμ νμΌλ‘ μκΈ΄λ€. μλ₯Όλ€λ©΄ example.json.postman_collection νμΌλ΄ name νλͺ©μ΄ example μ΄λΌλ©΄, example μ΄λΌλ λλ ν 리λ₯Ό λ§λ€κ³ , κ·Έ μμμ κ° API μ μ΄λ¦μ λ°λΌμ markdown νμΌμ λ§λ€μ΄ μ€λ€. λ§μ½ multi_file
λ₯Ό falseλ‘ μ€μ νλ€λ©΄, example.md λΌλ μ΄λ¦μΌλ‘ νλμ νμΌμ΄ μμ±λλ€.
markdown λ΄μλ ResourceURL, Request Parameters, Request Example ν€λλ₯Ό λμ΄μ μμ±νκ³ μλλ°, μμ½κ²λ postman collection json μμλ response μ λν΄μλ μ μ₯νκ³ μμ§ μκΈ° λλ¬Έμ Responseμ λν΄μλ 보μ¬μ€ λ΄μ©μ΄ μλ€. κ·Έλ¦¬κ³ μμ§μ postman2md μμ headers λΆλΆμ markdownμΌλ‘ λ§λ€κ³ μμ§λ μλ€.
postman2md λ λ΄λΆμ μΌλ‘ markdownwriter λΌμ΄λΈλ¬λ¦¬λ₯Ό μ΄μ©νκ³ μλ€. postman2md __init__.py
λ₯Ό 보면 json νμ± λΆλΆκ³Ό markdownwriter μ¬μ©νλ λΆλΆμ λ³Ό μ μλ€. Β
postman ν ν κ°μ§λ
postman μμ νλ‘κ·Έλλ° μΈμ΄λ³λ‘ ν
μ€ν
ν APIμ λν μ½λμ‘°κ°μ λ°μμκ° μλ€. λ€μν μΈμ΄λ₯Ό μ§μνκ³ μλλ° νΉμ΄ν μ μ κ° μΈμ΄λ³λ‘ APIλ₯Ό νΈμΆνλ μ¬λ¬ λ°©μμ μ§μνκ³ μλ€λ μ μ΄λ€. μλ₯Ό λ€λ©΄, νμ΄μ¬μ κ²½μ°, python3 λ₯Ό μ ννλ©΄ http.client
μ μλ λΌμ΄λΈλ¬λ¦¬λ‘ μ½λλ₯Ό νμνμ§λ§, requests
λ₯Ό μ ννλ©΄ ν΄λΉ λΌμ΄λΈλ¬λ¦¬μ λ§κ² μ€μ λ μ½λκ° μΆλ ₯λλ€.