My tired eyes have probably missed an obvious option to do this, but i can’t seem to find out how to deeplink to the raw .oas2 file, in order to have it downloaded by external parties e.g. https://apis.guru/add-api/
Hey @aden.forshaw, you are not mistaken. For private projects, this is not possible right now. We’ve got an internal issue opened to push a feature update with this and more sharing options for private OAS documents.
@aden.forshaw it is possible!
Step 1/3: Generate access token
On the Stoplight dashboard, go to “Settings > Access Tokens > Create a Token”.
2 different tokens are generated - you’ll need the first one:
Step 2/3: Fetch the correct export link
In your project, hover over an OAS file.
The export button will appear, click to retrieve the URL.
(You’ll receive an HTTP 401 Unauthorized)
Step 3/3: Request the file with access token
Use the token generated in step 1 as Bearer Authorization header to request the file:
Hint: use the “deref=all” query parameters to merge all external references into the output.
Hope that helps.
I should clarify, when I said it isn’t possible. I meant without using access tokens.