Swagger Docs: Add params to the swagger docs request URI #139
Labels
documentation
Improvements or additions to documentation
ease:low
enhancement
New feature or request
urgency:low
Description
In the swagger documentation UI, each endpoint automatically has at least two links: (1) a link to the part of the swagger interface for the given endpoint, and (2) a link to get a raw response from the API. Regarding (2), the swagger link that is generated will automatically include the parameters and their values that the user has provided in the swagger interface. It would be nice if the same params and their values coulda also be populated into the link referred to in (1).
To do this, we'd need to at least do 2 things:
(i) generate the URL
(ii) resolve these URLs
There is a way to do this, it appears, but it would require some time. For (ii), a way to resolve is outlined here:
https://stackoverflow.com/questions/31056771/swagger-ui-url-with-parameters
This answer involves some JavaScript. The main issue here is that the swagger docs are auto-generated by FastAPI. So it's not as simple as updating a single file with some JavaScript. This edit would likely have to be a hack around the FastAPI auto-generation. That is the main issue. After solving that, we could use the advice in the stackoverflow article to handle (ii). For (i), we could also likely solve that with some custom JavaScript.
The text was updated successfully, but these errors were encountered: