Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 3dcd1bc

Browse files
authored
Merge pull request #3240 from magento/yb_redoc-theme
Redoc updates
2 parents fe89748 + 832ede3 commit 3dcd1bc

File tree

7 files changed

+53
-36
lines changed

7 files changed

+53
-36
lines changed

_layouts/redoc.html

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,51 @@
11
{% include layout/header.html %}
22

33
<div class="content-container">
4-
{{ content }}
4+
<div id="redoc-container"></div>
55
</div>
66

7+
<script src="https://cdn.jsdelivr.net/npm/redoc@2.0.0-alpha.41/bundles/redoc.standalone.js"> </script>
8+
<script>
9+
Redoc.init('{{ page.specUrl }}', {
10+
scrollYOffset: '.site-nav',
11+
hideHostname: true,
12+
sortPropsAlphabetically: true,
13+
pathInMiddlePanel: true,
14+
hideDownloadButton: true,
15+
showExtensions: true,
16+
nativeScrollbars: true,
17+
lazyRendering: true,
18+
theme: {
19+
colors: {
20+
tonalOffset: 0.2,
21+
primary: {
22+
main: '#2b2b2c',
23+
},
24+
success: {
25+
main: '#008000',
26+
light: '#ecf7ed',
27+
},
28+
error: {
29+
main: '#cc0000',
30+
},
31+
responses: {
32+
success: {
33+
backgroundColor: '#ecf7ed',
34+
},
35+
error: {
36+
backgroundColor: '#ffebeb',
37+
}
38+
}
39+
},
40+
typography: {
41+
fontFamily: '',
42+
headings: {
43+
fontFamily: '',
44+
}
45+
},
46+
}
47+
}, document.getElementById('redoc-container'))
48+
49+
</script>
50+
751
{% include layout/footer.html %}

redoc/2.3/admin-rest-api.html

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
---
22
layout: redoc
3+
specUrl: admin-schema.json
34
---
4-
<redoc spec-url='admin-schema.json'
5-
hide-hostname=true
6-
sort-props-alphabetically=true
7-
path-in-middle-panel=true
8-
hide-download-button=true
9-
show-extensions=true
10-
scroll-y-offset='.site-nav'
11-
native-scrollbars=true
12-
lazy-rendering=true
13-
></redoc>
14-
<script src="https://rebilly.github.io/ReDoc/releases/v1.22.1/redoc.min.js"> </script>

redoc/2.3/admin-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"info": { "version": "2.3", "title": "Magento Admin API - All inclusive" },
44
"host": "magento2.vagrant12",
55
"basePath": "/rest/default",
6+
"produces": ["application/json"],
67
"schemes": ["http"],
78
"tags": [
89
{ "name": "addresses/{addressId}" },

redoc/2.3/customer-rest-api.html

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
---
22
layout: redoc
3-
---
4-
<redoc spec-url='customer-schema.json'
5-
hide-hostname=true
6-
sort-props-alphabetically=true
7-
path-in-middle-panel=true
8-
hide-download-button=true
9-
show-extensions=true
10-
scroll-y-offset='.site-nav'
11-
native-scrollbars=true
12-
lazy-rendering=true
13-
></redoc>
14-
<script src="https://rebilly.github.io/ReDoc/releases/v1.22.1/redoc.min.js"> </script>
3+
specUrl: customer-schema.json
4+
---

redoc/2.3/customer-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"info": { "version": "2.3", "title": "Magento Customer API" },
44
"host": "magento2.vagrant12",
55
"basePath": "/rest/default",
6+
"produces": ["application/json"],
67
"schemes": ["http"],
78
"tags": [
89
{ "name": "carts/guest-carts/{cartId}/checkGiftCard/{giftCardCode}" },

redoc/2.3/guest-rest-api.html

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11
---
22
layout: redoc
3-
---
4-
<redoc spec-url='guest-schema.json'
5-
hide-hostname=true
6-
sort-props-alphabetically=true
7-
path-in-middle-panel=true
8-
hide-download-button=true
9-
show-extensions=true
10-
scroll-y-offset='.site-nav'
11-
native-scrollbars=true
12-
lazy-rendering=true
13-
></redoc>
14-
<script src="https://rebilly.github.io/ReDoc/releases/v1.22.1/redoc.min.js"> </script>
3+
specUrl: guest-schema.json
4+
---

redoc/2.3/guest-schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"info": { "version": "2.3", "title": "Magento Guest API" },
44
"host": "magento2.vagrant12",
55
"basePath": "/rest/default",
6+
"produces": ["application/json"],
67
"schemes": ["http"],
78
"tags": [
89
{ "name": "carts/guest-carts/{cartId}/checkGiftCard/{giftCardCode}" },

0 commit comments

Comments
 (0)