We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a27afb1 commit 28a0f19Copy full SHA for 28a0f19
app/views/email-api.pug
@@ -0,0 +1,28 @@
1
+block body
2
+ #app
3
+
4
+ // Load the Script
5
+ script(src="https://cdn.jsdelivr.net/npm/@scalar/api-reference")
6
7
+ // Initialize the Scalar API Reference
8
+ script.
9
+ window.WEB_URL = "#{ config.WEB_URL }";
10
+ window.API_TOKEN = "#{user[config.userFields.apiToken]}";
11
+ Scalar.createApiReference("#app", {
12
+ // The URL of the OpenAPI/Swagger document
13
+ url: `${window.WEB_URL}/api-spec.json`,
14
+ authentication: {
15
+ preferredSecurityScheme: "ApiKeyAuth",
16
+ securitySchemes: {
17
+ ApiKeyAuth: {
18
+ username: window.API_TOKEN,
19
+ password: "",
20
+ },
21
+ AliasAuth: {
22
+ name: "Authorization",
23
+ in: "header",
24
+ value: window.API_TOKEN,
25
26
27
28
+ });
0 commit comments