Skip to content

Commit 2325e67

Browse files
authored
Merge pull request #173 from PortalTechnologiesInc/fix/api-reference-redoc-iframe
fix(docs): replace inline Redoc script with hosted iframe
2 parents 7fce79b + 59a894e commit 2325e67

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

docs/sdk/api-reference-rest.md

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
# API Reference (OpenAPI)
22

3-
Full interactive reference for the Portal REST API, generated from the [openapi.yaml](https://github.com/PortalTechnologiesInc/lib/blob/master/crates/portal-rest/openapi.yaml) spec.
4-
5-
<div id="redoc-container"></div>
6-
7-
<script src="https://cdn.jsdelivr.net/npm/redoc@latest/bundles/redoc.standalone.js"></script>
8-
<script>
9-
Redoc.init(
10-
'https://raw.githubusercontent.com/PortalTechnologiesInc/lib/master/crates/portal-rest/openapi.yaml',
11-
{
12-
scrollYOffset: 50,
13-
hideDownloadButton: false,
14-
theme: {
15-
colors: { primary: { main: '#e8b468' } },
16-
typography: { fontSize: '15px', fontFamily: 'inherit' }
17-
}
18-
},
19-
document.getElementById('redoc-container')
20-
);
21-
</script>
22-
23-
> If the interactive viewer doesn't load, open the raw spec directly:
24-
> [openapi.yaml on GitHub](https://github.com/PortalTechnologiesInc/lib/blob/master/crates/portal-rest/openapi.yaml)
25-
> or paste the raw URL into [Redocly](https://redocly.github.io/redoc/) / [Swagger Editor](https://editor.swagger.io/).
3+
Full interactive reference for the Portal REST API, generated from the [`openapi.yaml`](https://github.com/PortalTechnologiesInc/lib/blob/master/crates/portal-rest/openapi.yaml) spec.
4+
5+
<iframe
6+
src="https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/PortalTechnologiesInc/lib/master/crates/portal-rest/openapi.yaml&nocors"
7+
width="100%"
8+
height="900px"
9+
style="border: none; border-radius: 6px;"
10+
title="Portal REST API Reference">
11+
</iframe>
12+
13+
> If the viewer above doesn't load, open the spec directly:
14+
> - [openapi.yaml on GitHub](https://github.com/PortalTechnologiesInc/lib/blob/master/crates/portal-rest/openapi.yaml)
15+
> - Paste the raw URL into [Redocly](https://redocly.github.io/redoc/) or [Swagger Editor](https://editor.swagger.io/)

0 commit comments

Comments
 (0)