0

On a browser, i can go to http://hostname/swagger/index.html and see the different definitions of the exposed API. However, using a webclient instance or a httpclient, i do not get the same content as the one on the browser.

I understand that when using a browser, there's a javascript script that gets executed on page loads which basically renders the the content of the page. How do i get the same bit of information if i am trying to do it through code?

The code that we're developing is suppose to monitor any changes in the API. If we detect changes in any of the APIs exposed, it should trigger notification / workflow on our side to confirm that the clients using those API's are not impacted.

Thanks in advance

  • Yeah, I'm not 100% sure your paddling in the right canoe here, I'm not really all that sure that's how swagger is supposed to be used. Perhaps you could update your question with some detail of what exactly you intend to do with this info once you've got it – Hursey May 31 '22 at 04:21
  • Hi, thanks for the reply. I have updated the description to detail what we intend to do with it. From my understanding, swagger-ui is a way for api services to "self document" itself . Would you know of another way we can achieve this? – DotNetDevJ May 31 '22 at 05:38
  • Does this answer your question? [How to export swagger.json (or yaml)](https://stackoverflow.com/questions/48525546/how-to-export-swagger-json-or-yaml) – Tom W May 31 '22 at 06:08

0 Answers0