Last active
August 22, 2018 08:49
-
-
Save mythes/6a14c926c53f519fd695a505fc1319a9 to your computer and use it in GitHub Desktop.
#swagger #console #parser #js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. open swagger url | |
// 2. paste into console | |
// 3. execute | |
document.querySelectorAll(".endpoint").forEach(function(e) { | |
let method = e | |
.querySelector(".http_method > .toggleOperation") | |
.textContent.toUpperCase(); | |
let path = e.querySelector(".path > .toggleOperation").textContent; | |
let result = method + " " + path; | |
console.log(result); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment