Navigate to your Swagger UI URL, which may looks like `https://localhost/api/schema/swagger-ui/`
Run the following code in the browser’s development tools console:
I’m using drf-spectacular
for the schema.
The code is based on this StackOverflow answer.