Skip to content

Commit b217c54

Browse files
authored
Display learn api docs using scalar (#62)
1 parent 5ea1cbe commit b217c54

File tree

6 files changed

+37
-3
lines changed

6 files changed

+37
-3
lines changed

docs/graphql/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="preconnect" href="https://fonts.googleapis.com">
66
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
77
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
8-
<link rel="icon" type="image/png" href="/images/favicon.png" sizes="32x32"/>
8+
<link rel="icon" href="/images/favicon.ico" type="image/x-icon" sizes="48x48">
99
<title>CodeSignal GraphQL API</title>
1010
<meta name="description" content="GraphQL API documentation for the most advanced technical assessment solution on the market."/>
1111
<link type="text/css" rel="stylesheet" href="index.css" />

docs/images/favicon.ico

7.23 KB
Binary file not shown.

docs/images/favicon.png

-943 Bytes
Binary file not shown.

docs/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link rel="preconnect" href="https://fonts.googleapis.com">
66
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
77
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
8-
<link rel="icon" type="image/png" href="/images/favicon.png" sizes="32x32"/>
8+
<link rel="icon" href="/images/favicon.ico" type="image/x-icon" sizes="48x48">
99
<title>CodeSignal API for Developers</title>
1010
<meta name="description" content="Developer API documentation for the most advanced technical interview and assessment skills evaluation platform on the market."/>
1111
<link type="text/css" rel="stylesheet" href="index.css" />
@@ -25,6 +25,7 @@ <h1 class="header-title">API for Developers</h1>
2525
<div>
2626
<a class="doc-link" href="./graphql/">GraphQL API</a>
2727
<a class="doc-link" href="./webhooks/">Webhook API</a>
28+
<a class="doc-link" href="./learn-api/">Learn API</a>
2829
</div>
2930
</div>
3031
</div>

docs/learn-api/index.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1" />
6+
<title>CodeSignal Learn API for Developers</title>
7+
<link rel="icon" href="/images/favicon.ico" type="image/x-icon" sizes="48x48">
8+
<meta name="description" content="Developer API documentation for the Learn platform"/>
9+
</head>
10+
<body>
11+
<div id="app"></div>
12+
<!-- Load the Script -->
13+
<script src="https://cdn.jsdelivr.net/npm/@scalar/api-reference"></script>
14+
<script>
15+
let baseServerURL;
16+
if (window.location.hostname === 'localhost') {
17+
baseServerURL = `http://localhost:9000`;
18+
} else {
19+
baseServerURL = `https://codesignal.com`;
20+
}
21+
Scalar.createApiReference('#app', {
22+
// List of sources will allow us to add multiple versions in the future
23+
sources: [
24+
{
25+
id: 'v1',
26+
title: 'Version 1.0.0',
27+
url: `${baseServerURL}/learn/api/v1/openapi`,
28+
},
29+
],
30+
});
31+
</script>
32+
</body>
33+
</html>

docs/webhooks/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<link rel="preconnect" href="https://fonts.googleapis.com">
55
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
66
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&family=Work+Sans:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
7-
<link rel="icon" type="image/png" href="/images/favicon.png" sizes="32x32" />
7+
<link rel="icon" href="/images/favicon.ico" type="image/x-icon" sizes="48x48">
88
<title>CodeSignal Webhook API</title>
99
<meta
1010
name="description"

0 commit comments

Comments
 (0)