rapi-doc / RapiDoc

RapiDoc -WebComponent for OpenAPI Spec
https://rapidocweb.com
MIT License
1.65k stars 277 forks source link

Question: get the token used for auth to add that to the spec-url #978

Closed WilliamStam closed 1 week ago

WilliamStam commented 10 months ago

Im trying to have the docs show only the endpoints that the user has access to. this works in the backend when viewing /openapi.json?token=xxxx. is there a way with a before-load to append the query string or whatever the "try now" auth block adds but to the spec-url

mrin9 commented 1 week ago

if your backend is returning a JSON you can programmatically load the spec using loadSpeac() method. Refer to this example