rapi-doc / RapiDoc

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

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

Closed WilliamStam closed 2 months ago

WilliamStam commented 1 year 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 2 months ago

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