openapi-explorer 0.8.270 → 0.8.271
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi-explorer.min.js +4 -4
- package/dist/openapi-explorer.min.js.LICENSE.txt +1 -1
- package/dist/openapi-explorer.min.js.LICENSE.txt.gz +0 -0
- package/dist/openapi-explorer.min.js.gz +0 -0
- package/dist/report.html +2 -2
- package/package.json +1 -1
- package/src/components/api-request.js +3 -3
- package/src/styles/input-styles.js +8 -0
- package/src/templates/code-samples-template.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openapi-explorer",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.271",
|
|
4
4
|
"description": "OpenAPI Explorer - API viewer with dynamically generated components, documentation, and interaction console",
|
|
5
5
|
"author": "Rhosys Developers <developers@rhosys.ch>",
|
|
6
6
|
"repository": {
|
|
@@ -733,7 +733,7 @@ export default class ApiRequest extends LitElement {
|
|
|
733
733
|
: html`
|
|
734
734
|
<div class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab === 'response' ? 'flex' : 'none'};" >
|
|
735
735
|
<button class="toolbar-btn" @click='${(e) => { copyToClipboard(this.responseText, e); }}' part="btn btn-fill"> Copy </button>
|
|
736
|
-
<pre
|
|
736
|
+
<pre>${responseFormat
|
|
737
737
|
? html`<code>${unsafeHTML(Prism.highlight(this.responseText, Prism.languages[responseFormat], responseFormat))}</code>`
|
|
738
738
|
: `${this.responseText}`
|
|
739
739
|
}
|
|
@@ -742,11 +742,11 @@ export default class ApiRequest extends LitElement {
|
|
|
742
742
|
}
|
|
743
743
|
<div class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab === 'headers' ? 'flex' : 'none'};" >
|
|
744
744
|
<button class="toolbar-btn" @click='${(e) => { copyToClipboard(this.responseHeaders, e); }}' part="btn btn-fill"> Copy </button>
|
|
745
|
-
<pre
|
|
745
|
+
<pre><code>${unsafeHTML(Prism.highlight(this.responseHeaders, Prism.languages.css, 'css'))}</code></pre>
|
|
746
746
|
</div>
|
|
747
747
|
<div class="tab-content col m-markdown" style="flex:1;display:${this.activeResponseTab === 'curl' ? 'flex' : 'none'};">
|
|
748
748
|
<button class="toolbar-btn" @click='${(e) => { copyToClipboard(this.curlSyntax.replace(/\\$/, ''), e); }}' part="btn btn-fill"> Copy </button>
|
|
749
|
-
<pre
|
|
749
|
+
<pre><code>${unsafeHTML(Prism.highlight(this.curlSyntax.trim().replace(/\\$/, ''), Prism.languages.shell, 'shell'))}</code></pre>
|
|
750
750
|
</div>
|
|
751
751
|
</div>`;
|
|
752
752
|
}
|
|
@@ -59,6 +59,14 @@ export default css`
|
|
|
59
59
|
position: absolute;
|
|
60
60
|
top: 8px;
|
|
61
61
|
right: 8px;
|
|
62
|
+
margin-right: 8px;
|
|
63
|
+
}
|
|
64
|
+
.tab-content .toolbar-btn + pre {
|
|
65
|
+
white-space: pre;
|
|
66
|
+
max-height:400px;
|
|
67
|
+
overflow: auto;
|
|
68
|
+
display: flex;
|
|
69
|
+
padding-right: 70px;
|
|
62
70
|
}
|
|
63
71
|
|
|
64
72
|
input, textarea, select, button, pre {
|
|
@@ -25,7 +25,7 @@ export default function codeSamplesTemplate(xCodeSamples) {
|
|
|
25
25
|
${xCodeSamples.map((v, i) => html`
|
|
26
26
|
<div class="tab-content m-markdown code-sample-wrapper" style= "display:${i === 0 ? 'block' : 'none'}" data-tab = '${v.lang}${i}'>
|
|
27
27
|
<button class="toolbar-btn" @click='${(e) => { copyToClipboard(v.source, e); }}'> Copy </button>
|
|
28
|
-
<pre
|
|
28
|
+
<pre>
|
|
29
29
|
<code>${Prism.languages[v.lang && v.lang.toLowerCase()] ? unsafeHTML(Prism.highlight(v.source, Prism.languages[v.lang && v.lang.toLowerCase()], v.lang && v.lang.toLowerCase())) : v.source}</code>
|
|
30
30
|
</pre>
|
|
31
31
|
</div>`)
|