Skip to content

Commit 3f3f955

Browse files
lornajaneHClowardAlexVarchuk
authored
docs: Update API examples list to include Museum API (#2506)
* feat: Update API examples list to include Museum API * updates museum.yaml with logo and replaces petstore with museum api in playground for local dev and some minor edits to redoc name * docs: update definition --------- Co-authored-by: Heather Cloward <[email protected]> Co-authored-by: Alex Varchuk <[email protected]>
1 parent 8c39149 commit 3f3f955

File tree

7 files changed

+862
-71
lines changed

7 files changed

+862
-71
lines changed

demo/index.html

Lines changed: 61 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,63 @@
11
<!DOCTYPE html>
22
<html>
3-
4-
<head>
5-
<meta charset="UTF-8" />
6-
<title>ReDoc Interactive Demo</title>
7-
<meta name="description" content="ReDoc Interactive Demo. OpenAPI/Swagger-generated API Reference Documentation" />
8-
<meta name="viewport" content="width=device-width, initial-scale=1">
9-
10-
<meta property="og:title" content="ReDoc Interactive Demo">
11-
<meta property="og:description" content="ReDoc Interactive Demo. OpenAPI/Swagger-generated API Reference Documentation">
12-
<meta property="og:image" content="https://user-images.githubusercontent.com/3975738/37729752-8a9ea38a-2d46-11e8-8438-42ed26bf1751.png">
13-
<meta name="twitter:card" content="summary_large_image">
14-
15-
<style>
16-
body {
17-
margin: 0;
18-
padding: 0;
19-
}
20-
21-
redoc {
22-
display: block;
23-
}
24-
</style>
25-
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
26-
</head>
27-
28-
<body>
29-
<div id="container"> </div>
30-
31-
<script>
32-
(function (i, s, o, g, r, a, m) {
33-
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
34-
(i[r].q = i[r].q || []).push(arguments)
35-
}, i[r].l = 1 * new Date(); a = s.createElement(o),
36-
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
37-
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
38-
39-
if (window.location.host === 'rebilly.github.io') {
40-
ga('create', 'UA-81703547-1', 'auto');
41-
ga('send', 'pageview');
42-
}
43-
</script>
44-
</body>
45-
46-
</html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Redoc Interactive Demo</title>
6+
<meta
7+
name="description"
8+
content="Redoc Interactive Demo. OpenAPI-generated API Reference Documentation"
9+
/>
10+
<meta name="viewport" content="width=device-width, initial-scale=1" />
11+
12+
<meta property="og:title" content="Redoc Interactive Demo" />
13+
<meta
14+
property="og:description"
15+
content="Redoc Interactive Demo. OpenAPI-generated API Reference Documentation"
16+
/>
17+
<meta
18+
property="og:image"
19+
content="https://user-images.githubusercontent.com/3975738/37729752-8a9ea38a-2d46-11e8-8438-42ed26bf1751.png"
20+
/>
21+
<meta name="twitter:card" content="summary_large_image" />
22+
23+
<style>
24+
body {
25+
margin: 0;
26+
padding: 0;
27+
}
28+
29+
redoc {
30+
display: block;
31+
}
32+
</style>
33+
<link
34+
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
35+
rel="stylesheet"
36+
/>
37+
</head>
38+
39+
<body>
40+
<div id="container"></div>
41+
42+
<script>
43+
(function (i, s, o, g, r, a, m) {
44+
i['GoogleAnalyticsObject'] = r;
45+
(i[r] =
46+
i[r] ||
47+
function () {
48+
(i[r].q = i[r].q || []).push(arguments);
49+
}),
50+
(i[r].l = 1 * new Date());
51+
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
52+
a.async = 1;
53+
a.src = g;
54+
m.parentNode.insertBefore(a, m);
55+
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
56+
57+
if (window.location.host === 'rebilly.github.io') {
58+
ga('create', 'UA-81703547-1', 'auto');
59+
ga('send', 'pageview');
60+
}
61+
</script>
62+
</body>
63+
</html>

demo/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ import { RedocStandalone } from '../src';
55
import ComboBox from './ComboBox';
66
import FileInput from './components/FileInput';
77

8-
const DEFAULT_SPEC = 'openapi.yaml';
9-
const NEW_VERSION_SPEC = 'openapi-3-1.yaml';
8+
const DEFAULT_SPEC = 'museum.yaml';
9+
const NEW_VERSION_PETSTORE = 'openapi-3-1.yaml';
1010

1111
const demos = [
12-
{ value: NEW_VERSION_SPEC, label: 'Petstore OpenAPI 3.1' },
12+
{ value: DEFAULT_SPEC, label: 'Museum API' },
13+
{ value: NEW_VERSION_PETSTORE, label: 'Petstore OpenAPI 3.1' },
1314
{ value: 'https://api.apis.guru/v2/specs/instagram.com/1.0.0/swagger.yaml', label: 'Instagram' },
1415
{
1516
value: 'https://api.apis.guru/v2/specs/googleapis.com/calendar/v3/openapi.yaml',
@@ -54,7 +55,7 @@ class DemoApp extends React.Component<
5455
};
5556

5657
handleChange = (url: string) => {
57-
if (url === NEW_VERSION_SPEC) {
58+
if (url === NEW_VERSION_PETSTORE) {
5859
this.setState({ cors: false });
5960
0;
6061
}

demo/museum-logo.png

2.54 KB
Loading

0 commit comments

Comments
 (0)