I'm wondering if its possible to programmatically discover all the endpoints of a particular API.
So for example if I GET this URL with a browser or curl:
https://api.twitter.com/1.1/
I might get something like this as a JSON response:
{"TwitterAPI":{
"version" : 1.1,
"GET" : {
"search/" : ["users", "trending"],
"users/" : ["id", "handle"]
}
}
Of course Twitter could choose to publish or not publish this format. So as a side question, are there any libraries for Java or Javascript that will automatically map and publish the API routes you created in your controllers?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…