Skip to content

Commit

Permalink
fix: open api doc page display
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanbogale committed Oct 17, 2024
1 parent a848e87 commit 2ff8a30
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
14 changes: 11 additions & 3 deletions catalyst-gateway/bin/src/service/docs/stoplight_elements/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ const STOPLIGHT_UI_TEMPLATE: &str = r#"
<style charset="UTF-8">{:style}</style>
<script charset="UTF-8">{:script}</script>
</head>
<body>
<body style="margin: 0; overflow: hidden;">
<nav style="display: flex;
justify-content: space-around;
background-color: #f8f9fa;
padding: 10px;
position: relative;
z-index: 100000000;
top: 0px;">
<elements-api id="docs"
<elements-api id="docs"
router="hash"
layout="sidebar">
style="width: 100%; height: calc(100vh - 50px); position: absolute; top: 30px; left: 0; background: white;">
</elements-api>
<script>
Expand Down
3 changes: 1 addition & 2 deletions docs/src/api/cat-gateway/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ icon: material/server
<!-- markdownlint-disable no-inline-html -->
<iframe src="../stoplight_template.html"
frameborder="0"
style="overflow: hidden; width: 100%; height: 100vh;"
></iframe>
style="position: absolute; top: 115px; left: 0; width: 100%; height: 100%;">
16 changes: 14 additions & 2 deletions docs/src/api/cat-gateway/stoplight_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,20 @@

<body>

<elements-api apiDescriptionUrl="./rust-docs/cat-gateway-api.json" router="memory" layout="sidebar"
hideInternal="true" />
<nav style="display: flex;
justify-content: space-around;
background-color: #f8f9fa;
padding: 10px;
position: relative;
z-index: 100000000;
top: 0px;">
<a href="../cat-gateway/index.html">Catalyst Gateway</a>
<a href="../cat-gateway/rust.html">Rust Docs</a>
</nav>
<elements-api apiDescriptionUrl="./rust-docs/cat-gateway-api.json" router="memory"
hideInternal="true" style="width: 100%; height: calc(100vh - 50px); position: absolute; top: 30px; left: 0; background: white;" >

</elements-api>

</body>

Expand Down

0 comments on commit 2ff8a30

Please sign in to comment.