Skip to content

Commit 3638fca

Browse files
committed
Added deprecation marker in render-style=read
1 parent 729549f commit 3638fca

File tree

7 files changed

+13
-8
lines changed

7 files changed

+13
-8
lines changed

dist/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<rapi-doc
2424
id = "thedoc"
25-
spec-url = "./specs/server.yaml"
25+
spec-url = "./specs/petstore_extended.yaml"
2626
theme = "dark"
2727
render-style = "read"
2828
regular-font = 'Open Sans'

dist/index.html.gz

-7 Bytes
Binary file not shown.

dist/rapidoc-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rapidoc-min.js.gz

66 Bytes
Binary file not shown.

dist/report.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

src/styles/font-styles.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export default html`
2121
.bold-text { font-weight:bold; }
2222
.gray-text { color: var(--light-fg); }
2323
.upper { text-transform: uppercase; }
24+
.red-text {color: var(--red)}
2425
.multiline {
2526
overflow: scroll;
2627
max-height: 200px;

src/templates/expanded-endpoint-template.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,17 @@ function endpointBodyTemplate(path) {
3232
return html`
3333
<div class='divider'></div>
3434
<div class='expanded-endpoint-body observe-me ${path.method}' id='${path.method}-${path.path.replace(/[\s#:?&=]/g, '-')}' >
35+
36+
${path.deprecated ? html`<div class="bold-text red-text" > DEPRECATED </div>` : ''}
3537
${html`
36-
<h1> ${path.summary || html`<span class='upper method-fg ${path.method}'> ${path.method}</span> ${path.path}`} </h1>
38+
<h1 class = "${path.deprecated ? 'gray-text' : ''}">
39+
${path.summary || html`<span class='upper ${path.deprecated ? ' method-fg gray-text' : path.method} '> ${path.method}</span> ${path.path}`}
40+
</h1>
3741
${path.summary
3842
? html`
3943
<div class='mono-font regular-font-size' style='padding: 8px 0; color:var(--fg3)'>
40-
<span class='regular-font upper bold-text method-fg ${path.method}'>${path.method}</span>
41-
${path.path}
44+
<span class='regular-font upper method-fg ${path.deprecated ? ' gray-text' : ` bold-text ${path.method}`} '>${path.method}</span>
45+
<span class = '${path.deprecated ? 'gray-text' : ''}'> ${path.path} </span>
4246
</div>`
4347
: ''
4448
}

0 commit comments

Comments
 (0)