@diplodoc/cli-tests 5.35.3 → 5.36.0
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/e2e/__snapshots__/bundles.spec.ts.snap +26 -26
- package/e2e/__snapshots__/pdf-page.spec.ts.snap +6 -6
- package/e2e/__snapshots__/preprocess.test.ts.snap +78 -78
- package/e2e/__snapshots__/regression.test.ts.snap +4 -4
- package/e2e/preprocess.test.ts +2 -2
- package/e2e/regression.test.ts +3 -3
- package/fixtures/utils/test.ts +112 -22
- package/package.json +1 -1
|
@@ -1237,7 +1237,7 @@ exports[`Regression > internal 34`] = `
|
|
|
1237
1237
|
<body class="g-root g-root_theme_light">
|
|
1238
1238
|
<div id="root"></div>
|
|
1239
1239
|
<script type="application/json" id="diplodoc-state">
|
|
1240
|
-
{"data":{"leading":false,"html":"<p>Text {{not-var}} {{skip()}} default-var-value</p>/n<p>Text <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id
|
|
1240
|
+
{"data":{"leading":false,"html":"<p>Text {{not-var}} {{skip()}} default-var-value</p>/n<p>Text <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-1\\">{{not-var}}</code> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-2\\">{{skip()}}</code> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-3\\">default-var-value</code></p>/n<p>Text</p>/n/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs\\">{{not-var}}/n/n{{skip()}}/n/ndefault-var-value/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"9\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-9\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-9\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-9.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n<p><code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-4\\">[not a link](./path/to/relative/file.md)</code></p>/n<h2 id=\\"subtitle\\"><a href=\\"1.html#subtitle\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Subtitle</span></a>Subtitle</h2>/n<p><a href=\\"mermaid.html\\">Mermaid usage</a></p>/n<p><a href=\\"mermaid.html#info\\">Mermaid info</a></p>/n<p><a href=\\"latex.html\\">Latex usage</a></p>/n<p><a href=\\"includes\\">noext-link</a></p>/n<p>Bob</p>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"1.md"},"headings":[{"title":"Subtitle","href":"1.html#subtitle","level":2}],"title":"Title"},"router":{"pathname":"1","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1241
1241
|
</script>
|
|
1242
1242
|
<script type="application/javascript">
|
|
1243
1243
|
const data = document.querySelector('script#diplodoc-state');
|
|
@@ -1573,7 +1573,7 @@ exports[`Regression > internal 46`] = `
|
|
|
1573
1573
|
<body class="g-root g-root_theme_light">
|
|
1574
1574
|
<div id="root"></div>
|
|
1575
1575
|
<script type="application/json" id="diplodoc-state">
|
|
1576
|
-
{"data":{"leading":false,"html":"<p>Text</p>/n<p>Bob</p>/n<p>Test</p>/n<h3 id=\\"f1\\"><a href=\\"includes.html#f1\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">F1</span></a>F1</h3>/n<p>Content F1</p>/n<p id=\\"p1\\">Some paragraph with anchor</p>/n/n<p>Bob</p>/n<p><a href=\\"latex.html\\"><img src=\\"_assets/3.png\\" alt=\\"img 3\\" /></a></p>/n<p><sup><i class=\\"yfm yfm-term_title\\" term-key=\\":term\\" role=\\"button\\" aria-controls=\\":term_element\\" tabindex=\\"0\\" id=\\"vTERM-ID\\">?</i></sup></p>/n<p>[<i class=\\"yfm yfm-term_title\\" term-key=\\":term\\" role=\\"button\\" aria-controls=\\":term_element\\" tabindex=\\"0\\" id=\\"vTERM-ID\\">?</i>](http://ya.ru)</p>/n<p>Link after include<br />/n<a href=\\"1.html#subtitle\\">Subtitle</a></p>/n<p>Link after include</p>/n<dfn class=\\"yfm yfm-term_dfn\\" id=\\":term_element\\" role=\\"dialog\\"><p>Test terms</p>/n</dfn>","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"includes.md"},"headings":[],"title":""},"router":{"pathname":"includes","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1576
|
+
{"data":{"leading":false,"html":"<p>Text</p>/n<p>Bob</p>/n<p>Test</p>/n<h3 id=\\"f1\\"><a href=\\"includes.html#f1\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">F1</span></a>F1</h3>/n<p>Content F1</p>/n<p id=\\"p1\\">Some paragraph with anchor</p>/n/n<p>Bob</p>/n<p><a href=\\"latex.html\\"><img src=\\"_assets/3.png\\" alt=\\"img 3\\" /></a></p>/n<p><sup><i class=\\"yfm yfm-term_title\\" term-key=\\":term\\" role=\\"button\\" aria-controls=\\":term_element\\" tabindex=\\"0\\" id=\\"vTERM-ID-2\\">?</i></sup></p>/n<p>[<i class=\\"yfm yfm-term_title\\" term-key=\\":term\\" role=\\"button\\" aria-controls=\\":term_element\\" tabindex=\\"0\\" id=\\"vTERM-ID-1\\">?</i>](http://ya.ru)</p>/n<p>Link after include<br />/n<a href=\\"1.html#subtitle\\">Subtitle</a></p>/n<p>Link after include</p>/n<dfn class=\\"yfm yfm-term_dfn\\" id=\\":term_element\\" role=\\"dialog\\"><p>Test terms</p>/n</dfn>","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"vcsPath":"includes.md"},"headings":[],"title":""},"router":{"pathname":"includes","depth":1,"base":"./"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1577
1577
|
</script>
|
|
1578
1578
|
<script type="application/javascript">
|
|
1579
1579
|
const data = document.querySelector('script#diplodoc-state');
|
|
@@ -1774,7 +1774,7 @@ exports[`Regression > internal 54`] = `
|
|
|
1774
1774
|
<body class="g-root g-root_theme_light">
|
|
1775
1775
|
<div id="root"></div>
|
|
1776
1776
|
<script type="application/json" id="diplodoc-state">
|
|
1777
|
-
{"data":{"leading":false,"html":"<div class=\\"openapi\\">/n<h1>Test x-hidden attribute</h1>/n/n<p>Test various x-hidden scenarios</p>/n<h2 id=\\"request\\"><a href=\\"openapi/test-controller/getHiddenTest.html#request\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Request</span></a>Request</h2>/n<div class=\\"openapi__requests\\">/n<div class=\\"openapi__request__wrapper\\" style=\\"--method:var(--dc-openapi-methods-get);margin-bottom:12px\\">/n<div class=\\"openapi__request\\">/n<p class=\\"openapi__method\\">GET</p>/n/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs text\\">http://localhost:8080/hidden-test/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"17\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-17\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-17\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-17.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div>/n<p>Generated server url</p>/n</div>/n</div>/n<h2 id=\\"responses\\"><a href=\\"openapi/test-controller/getHiddenTest.html#responses\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Responses</span></a>Responses</h2>/n<div class=\\"openapi__response__code__200\\">/n<h2 id=\\"200-ok\\"><a href=\\"openapi/test-controller/getHiddenTest.html#200-ok\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">200 OK</span></a>200 OK</h2>/n<p>Response with hidden fields</p>/n<div class=\\"openapi-entity\\">/n<h3 id=\\"body\\"><a href=\\"openapi/test-controller/getHiddenTest.html#body\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Body</span></a>Body</h3>/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\">application/json</summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"visibleField\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"nestedObject\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"visibleNested\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n <span class=\\"hljs-punctuation\\">}</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"arrayWithHiddenItems\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-punctuation\\">[</span>/n <span class=\\"hljs-string\\">\\"example\\"</span>/n <span class=\\"hljs-punctuation\\">]</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"mixedVisibility\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"field1\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field3\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field5\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n <span class=\\"hljs-punctuation\\">}</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"43\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-43\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-43\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-43.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td>/n<p><strong>Name</strong></p>/n</td>/n<td>/n<p><strong>Description</strong></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">arrayWithHiddenItems</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: <a href=\\"openapi/test-controller/getHiddenTest.html#entity-HiddenField\\">HiddenField</a>[]</p>/n<p>Array with hidden item schema</p>/n<details class=\\"yfm-cut json-schema-example\\"><summary class=\\"yfm-cut-title\\"><strong>Example</strong></summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">[</span>/n <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">]</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"78\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-78\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-78\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-78.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details></td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">mixedVisibility</em></p>/n</td>/n<td class=\\"table-cell\\">/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\"><strong>Type</strong>: object</summary><div class=\\"yfm-cut-content\\"><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">field1</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id="inline-code-id-1">example</code></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">field3</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id="inline-code-id-2">example</code></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">field5</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id="inline-code-id-3">example</code></p>/n</td>/n</tr>/n</tbody>/n</table>/n</div></details><details class=\\"yfm-cut json-schema-example\\"><summary class=\\"yfm-cut-title\\"><strong>Example</strong></summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"field1\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field3\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field5\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"151\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-151\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-151\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-151.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details></td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">nestedObject</em></p>/n</td>/n<td class=\\"table-cell\\">/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\"><strong>Type</strong>: object</summary><div class=\\"yfm-cut-content\\"><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">visibleNested</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id="inline-code-id-4">example</code></p>/n</td>/n</tr>/n</tbody>/n</table>/n</div></details><p>Object with hidden properties</p>/n<details class=\\"yfm-cut json-schema-example\\"><summary class=\\"yfm-cut-title\\"><strong>Example</strong></summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"visibleNested\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"197\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-197\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-197\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-197.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details></td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">visibleField</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p>This field should be visible</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id="inline-code-id-5">example</code></p>/n</td>/n</tr>/n</tbody>/n</table>/n</div>/n</div>/n</div>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/cut-extension.css"],"script":["_assets/cut-extension.js"],"vcsPath":"openapi/test-controller/getHiddenTest.md"},"headings":[{"title":"Request","href":"openapi/test-controller/getHiddenTest.html#request","level":2},{"title":"Responses","href":"openapi/test-controller/getHiddenTest.html#responses","level":2},{"title":"200 OK","href":"openapi/test-controller/getHiddenTest.html#200-ok","level":2,"items":[{"title":"Body","href":"openapi/test-controller/getHiddenTest.html#body","level":3}]}],"title":""},"router":{"pathname":"openapi/test-controller/getHiddenTest","depth":3,"base":"../../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1777
|
+
{"data":{"leading":false,"html":"<div class=\\"openapi\\">/n<h1>Test x-hidden attribute</h1>/n/n<p>Test various x-hidden scenarios</p>/n<h2 id=\\"request\\"><a href=\\"openapi/test-controller/getHiddenTest.html#request\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Request</span></a>Request</h2>/n<div class=\\"openapi__requests\\">/n<div class=\\"openapi__request__wrapper\\" style=\\"--method:var(--dc-openapi-methods-get);margin-bottom:12px\\">/n<div class=\\"openapi__request\\">/n<p class=\\"openapi__method\\">GET</p>/n/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs text\\">http://localhost:8080/hidden-test/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"17\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-17\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-17\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-17.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div>/n<p>Generated server url</p>/n</div>/n</div>/n<h2 id=\\"responses\\"><a href=\\"openapi/test-controller/getHiddenTest.html#responses\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Responses</span></a>Responses</h2>/n<div class=\\"openapi__response__code__200\\">/n<h2 id=\\"200-ok\\"><a href=\\"openapi/test-controller/getHiddenTest.html#200-ok\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">200 OK</span></a>200 OK</h2>/n<p>Response with hidden fields</p>/n<div class=\\"openapi-entity\\">/n<h3 id=\\"body\\"><a href=\\"openapi/test-controller/getHiddenTest.html#body\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Body</span></a>Body</h3>/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\">application/json</summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"visibleField\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"nestedObject\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"visibleNested\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n <span class=\\"hljs-punctuation\\">}</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"arrayWithHiddenItems\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-punctuation\\">[</span>/n <span class=\\"hljs-string\\">\\"example\\"</span>/n <span class=\\"hljs-punctuation\\">]</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"mixedVisibility\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"field1\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field3\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field5\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n <span class=\\"hljs-punctuation\\">}</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"43\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-43\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-43\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-43.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td>/n<p><strong>Name</strong></p>/n</td>/n<td>/n<p><strong>Description</strong></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">arrayWithHiddenItems</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: <a href=\\"openapi/test-controller/getHiddenTest.html#entity-HiddenField\\">HiddenField</a>[]</p>/n<p>Array with hidden item schema</p>/n<details class=\\"yfm-cut json-schema-example\\"><summary class=\\"yfm-cut-title\\"><strong>Example</strong></summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">[</span>/n <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">]</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"78\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-78\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-78\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-78.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details></td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">mixedVisibility</em></p>/n</td>/n<td class=\\"table-cell\\">/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\"><strong>Type</strong>: object</summary><div class=\\"yfm-cut-content\\"><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">field1</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-1\\">example</code></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">field3</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-2\\">example</code></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">field5</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-3\\">example</code></p>/n</td>/n</tr>/n</tbody>/n</table>/n</div></details><details class=\\"yfm-cut json-schema-example\\"><summary class=\\"yfm-cut-title\\"><strong>Example</strong></summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"field1\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field3\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span><span class=\\"hljs-punctuation\\">,</span>/n <span class=\\"hljs-attr\\">\\"field5\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"151\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-151\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-151\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-151.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details></td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">nestedObject</em></p>/n</td>/n<td class=\\"table-cell\\">/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\"><strong>Type</strong>: object</summary><div class=\\"yfm-cut-content\\"><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">visibleNested</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-4\\">example</code></p>/n</td>/n</tr>/n</tbody>/n</table>/n</div></details><p>Object with hidden properties</p>/n<details class=\\"yfm-cut json-schema-example\\"><summary class=\\"yfm-cut-title\\"><strong>Example</strong></summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"visibleNested\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"197\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-197\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-197\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-197.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details></td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">visibleField</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p>This field should be visible</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-5\\">example</code></p>/n</td>/n</tr>/n</tbody>/n</table>/n</div>/n</div>/n</div>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/cut-extension.css"],"script":["_assets/cut-extension.js"],"vcsPath":"openapi/test-controller/getHiddenTest.md"},"headings":[{"title":"Request","href":"openapi/test-controller/getHiddenTest.html#request","level":2},{"title":"Responses","href":"openapi/test-controller/getHiddenTest.html#responses","level":2},{"title":"200 OK","href":"openapi/test-controller/getHiddenTest.html#200-ok","level":2,"items":[{"title":"Body","href":"openapi/test-controller/getHiddenTest.html#body","level":3}]}],"title":""},"router":{"pathname":"openapi/test-controller/getHiddenTest","depth":3,"base":"../../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1778
1778
|
</script>
|
|
1779
1779
|
<script type="application/javascript">
|
|
1780
1780
|
const data = document.querySelector('script#diplodoc-state');
|
|
@@ -1804,7 +1804,7 @@ exports[`Regression > internal 55`] = `
|
|
|
1804
1804
|
<body class="g-root g-root_theme_light">
|
|
1805
1805
|
<div id="root"></div>
|
|
1806
1806
|
<script type="application/json" id="diplodoc-state">
|
|
1807
|
-
{"data":{"leading":false,"html":"<div class=\\"openapi\\">/n<h1>Simple get operation. тест новой верстки 3</h1>/n/n<p>Defines a simple get operation with no inputs and a complex</p>/n<h2 id=\\"request\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#request\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Request</span></a>Request</h2>/n<div class=\\"openapi__requests\\">/n<div class=\\"openapi__request__wrapper\\" style=\\"--method:var(--dc-openapi-methods-get);margin-bottom:12px\\">/n<div class=\\"openapi__request\\">/n<p class=\\"openapi__method\\">GET</p>/n/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs text\\">http://localhost:8080/test/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"17\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-17\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-17\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-17.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div>/n<p>Generated server url</p>/n</div>/n</div>/n<h2 id=\\"responses\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#responses\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Responses</span></a>Responses</h2>/n<div class=\\"openapi__response__code__200\\">/n<h2 id=\\"200-ok\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#200-ok\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">200 OK</span></a>200 OK</h2>/n<p>200!!!!</p>/n<div class=\\"openapi-entity\\">/n<h3 id=\\"body\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#body\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Body</span></a>Body</h3>/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\">application/json</summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"A\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"43\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-43\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-43\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-43.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td>/n<p><strong>Name</strong></p>/n</td>/n<td>/n<p><strong>Description</strong></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">A</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id
|
|
1807
|
+
{"data":{"leading":false,"html":"<div class=\\"openapi\\">/n<h1>Simple get operation. тест новой верстки 3</h1>/n/n<p>Defines a simple get operation with no inputs and a complex</p>/n<h2 id=\\"request\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#request\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Request</span></a>Request</h2>/n<div class=\\"openapi__requests\\">/n<div class=\\"openapi__request__wrapper\\" style=\\"--method:var(--dc-openapi-methods-get);margin-bottom:12px\\">/n<div class=\\"openapi__request\\">/n<p class=\\"openapi__method\\">GET</p>/n/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs text\\">http://localhost:8080/test/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"17\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-17\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-17\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-17.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div>/n<p>Generated server url</p>/n</div>/n</div>/n<h2 id=\\"responses\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#responses\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Responses</span></a>Responses</h2>/n<div class=\\"openapi__response__code__200\\">/n<h2 id=\\"200-ok\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#200-ok\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">200 OK</span></a>200 OK</h2>/n<p>200!!!!</p>/n<div class=\\"openapi-entity\\">/n<h3 id=\\"body\\"><a href=\\"openapi/test-controller/getWithPayloadResponse.html#body\\" class=\\"yfm-anchor yfm-clipboard-anchor\\" aria-hidden=\\"true\\"><span class=\\"visually-hidden\\" data-no-index=\\"true\\">Body</span></a>Body</h3>/n<details class=\\"yfm-cut\\"><summary class=\\"yfm-cut-title\\">application/json</summary><div class=\\"yfm-cut-content\\">/n <div class=\\"yfm-code-floating-container\\">/n <pre><code class=\\"hljs json\\"><span class=\\"hljs-punctuation\\">{</span>/n <span class=\\"hljs-attr\\">\\"A\\"</span><span class=\\"hljs-punctuation\\">:</span> <span class=\\"hljs-string\\">\\"example\\"</span>/n<span class=\\"hljs-punctuation\\">}</span>/n</code></pre>/n/n <div class=\\"yfm-code-floating\\">/n /n <button role=\\"button\\" class=\\"yfm-code-button yfm-clipboard-button\\">/n <svg width=\\"16\\" height=\\"16\\" viewBox=\\"0 0 24 24\\" class=\\"yfm-code-icon yfm-clipboard-icon\\" data-animation=\\"43\\">/n <path fill=\\"currentColor\\" d=\\"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z\\"></path>/n <path stroke=\\"currentColor\\" fill=\\"transparent\\" stroke-width=\\"1.5\\" d=\\"M9.5 13l3 3l5 -5\\" visibility=\\"hidden\\">/n <animate id=\\"visibileAnimation-43\\" attributeName=\\"visibility\\" from=\\"hidden\\" to=\\"visible\\" dur=\\"0.2s\\" fill=\\"freeze\\" begin></animate>/n <animate id=\\"hideAnimation-43\\" attributeName=\\"visibility\\" from=\\"visible\\" to=\\"hidden\\" dur=\\"1s\\" begin=\\"visibileAnimation-43.end+1\\" fill=\\"freeze\\"></animate>/n </path>/n </svg>/n </button>/n </div>/n </div>/n</div></details><table class=\\"json-schema-properties\\">/n<tbody>/n<tr>/n<td>/n<p><strong>Name</strong></p>/n</td>/n<td>/n<p><strong>Description</strong></p>/n</td>/n</tr>/n<tr>/n<td class=\\"table-cell\\">/n<p><em class=\\"json-schema-reset json-schema-property\\">A</em></p>/n</td>/n<td class=\\"table-cell\\">/n<p><strong>Type</strong>: string</p>/n<p><em class=\\"json-schema-reset json-schema-example\\">Example:</em> <code class=\\"yfm-clipboard-inline-code\\" role=\\"button\\" tabindex=\\"0\\" id=\\"inline-code-id-1\\">example</code></p>/n</td>/n</tr>/n</tbody>/n</table>/n</div>/n</div>/n</div>/n","meta":{"metadata":[{"name":"generator","content":"Diplodoc Platform vDIPLODOC-VERSION"}],"style":["_assets/cut-extension.css"],"script":["_assets/cut-extension.js"],"vcsPath":"openapi/test-controller/getWithPayloadResponse.md"},"headings":[{"title":"Request","href":"openapi/test-controller/getWithPayloadResponse.html#request","level":2},{"title":"Responses","href":"openapi/test-controller/getWithPayloadResponse.html#responses","level":2},{"title":"200 OK","href":"openapi/test-controller/getWithPayloadResponse.html#200-ok","level":2,"items":[{"title":"Body","href":"openapi/test-controller/getWithPayloadResponse.html#body","level":3}]}],"title":""},"router":{"pathname":"openapi/test-controller/getWithPayloadResponse","depth":3,"base":"../../"},"lang":"ru","langs":["ru"],"viewerInterface":{"toc":true,"search":true,"feedback":true}}
|
|
1808
1808
|
</script>
|
|
1809
1809
|
<script type="application/javascript">
|
|
1810
1810
|
const data = document.querySelector('script#diplodoc-state');
|
package/e2e/preprocess.test.ts
CHANGED
|
@@ -12,12 +12,12 @@ const generateFilesYamlTestTemplate = (
|
|
|
12
12
|
await TestAdapter.testBuildPass(inputPath, outputPath, {
|
|
13
13
|
md2md: true,
|
|
14
14
|
md2html: false,
|
|
15
|
-
args: args.concat(['--keep-not-var']).join(' '),
|
|
15
|
+
args: args.concat(['--keep-not-var', '--id-generator', 'deterministic']).join(' '),
|
|
16
16
|
});
|
|
17
17
|
await TestAdapter.testBuildPass(outputPath, outputPath + '-html', {
|
|
18
18
|
md2md: false,
|
|
19
19
|
md2html: true,
|
|
20
|
-
args: args.join(' '),
|
|
20
|
+
args: args.concat(['--id-generator', 'deterministic']).join(' '),
|
|
21
21
|
});
|
|
22
22
|
await compareDirectories(outputPath);
|
|
23
23
|
});
|
package/e2e/regression.test.ts
CHANGED
|
@@ -10,17 +10,17 @@ function test(_description: string) {
|
|
|
10
10
|
await TestAdapter.testBuildPass(inputPath, outputPath, {
|
|
11
11
|
md2md: true,
|
|
12
12
|
md2html: false,
|
|
13
|
-
args: '-j2 --keep-not-var --add-system-meta',
|
|
13
|
+
args: '-j2 --keep-not-var --add-system-meta --id-generator deterministic',
|
|
14
14
|
});
|
|
15
15
|
await TestAdapter.testBuildPass(outputPath, outputPath + '-html', {
|
|
16
16
|
md2md: false,
|
|
17
17
|
md2html: true,
|
|
18
|
-
args: '-j2',
|
|
18
|
+
args: '-j2 --id-generator deterministic',
|
|
19
19
|
});
|
|
20
20
|
await TestAdapter.testBuildPass(outputPath, outputPath + '-static-html', {
|
|
21
21
|
md2md: false,
|
|
22
22
|
md2html: true,
|
|
23
|
-
args: '-j2 --static-content',
|
|
23
|
+
args: '-j2 --static-content --id-generator deterministic',
|
|
24
24
|
});
|
|
25
25
|
await compareDirectories(outputPath);
|
|
26
26
|
await compareDirectories(outputPath + '-html');
|
package/fixtures/utils/test.ts
CHANGED
|
@@ -31,35 +31,125 @@ export function platformless(text: string): string {
|
|
|
31
31
|
export function hashless(text: string): string {
|
|
32
32
|
return text
|
|
33
33
|
.replace(/-[a-z0-9]{12,16}\./g, '-hash.')
|
|
34
|
-
.replace(/rnd-[a-z0-9]{
|
|
34
|
+
.replace(/(rnd|svg)-[a-z0-9]{3,8}__/g, 'rnd-hash__')
|
|
35
35
|
.replace(/(\/|\\)[a-z0-9]{12,16}-(index|registry|resources)\./g, '/hash-$2.');
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Replaces hashed bundle filenames from the client manifest with stable labels
|
|
40
|
+
* and sorts bundle references to normalize platform-dependent ordering.
|
|
41
|
+
*
|
|
42
|
+
* Examples: "app-3ff8bc0b40bc2914.js" → "app-js",
|
|
43
|
+
* "vendor-00121562c7b7d3b5.rtl.css" → "vendor-rtl-css",
|
|
44
|
+
* "976-40cbc1d2518eb8ea.js" → "chunk-js" (numeric webpack chunk ID).
|
|
45
|
+
*/
|
|
38
46
|
export function bundleless(text: string): string {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
// On Windows the CLI may emit `_bundle\file` or JSON-escaped `_bundle\\/file`.
|
|
48
|
+
// Collapse any mix of backslashes and forward slashes after `_bundle` into `/`.
|
|
49
|
+
text = text.replace(/_bundle[/\\]+/g, '_bundle/');
|
|
50
|
+
|
|
51
|
+
for (const entry of Object.values(assets)) {
|
|
52
|
+
for (const files of Object.values(entry)) {
|
|
53
|
+
for (const filename of files) {
|
|
54
|
+
const match = filename.match(
|
|
55
|
+
/^([a-z0-9]+)-[a-f0-9]{12,16}((?:\.[a-z]+)*)\.([a-z]+)$/,
|
|
56
|
+
);
|
|
57
|
+
if (!match) continue;
|
|
58
|
+
|
|
59
|
+
const [, rawBase, suffixes, ext] = match;
|
|
60
|
+
const base = /^\d+$/.test(rawBase) ? 'chunk' : rawBase;
|
|
61
|
+
const suffixPart = suffixes.replace(/\./g, '-').slice(1); // ".rtl" → "rtl"
|
|
62
|
+
const label = suffixPart ? `${base}-${suffixPart}-${ext}` : `${base}-${ext}`;
|
|
63
|
+
const escapedSuffixes = suffixes.replace(/\./g, '\\.');
|
|
64
|
+
const pattern = new RegExp(
|
|
65
|
+
`${rawBase}-[a-f0-9]{12,16}${escapedSuffixes}\\.${ext}`,
|
|
66
|
+
'g',
|
|
67
|
+
);
|
|
68
|
+
text = text.replace(pattern, label);
|
|
60
69
|
}
|
|
61
70
|
}
|
|
62
71
|
}
|
|
63
72
|
|
|
73
|
+
return sortBundleTokens(text);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Sorts contiguous runs of `_bundle/` references so snapshots stay stable
|
|
78
|
+
* regardless of manifest ordering or platform.
|
|
79
|
+
*
|
|
80
|
+
* Pass 1 (line-level): sorts groups of consecutive lines containing `_bundle/`
|
|
81
|
+
* — handles HTML `<link>` / `<script>` tags on separate lines.
|
|
82
|
+
*
|
|
83
|
+
* Pass 2 (inline): sorts groups of `_bundle/` tokens on the same line separated
|
|
84
|
+
* only by punctuation — handles JSON arrays like `"cssLink":["_bundle/b","_bundle/a"]`.
|
|
85
|
+
*/
|
|
86
|
+
function sortBundleTokens(text: string): string {
|
|
87
|
+
const bundleRe = /_bundle\/[a-z0-9][-a-z0-9]*/;
|
|
88
|
+
|
|
89
|
+
// --- Pass 1: line-level sort ---
|
|
90
|
+
const lines = text.split('\n');
|
|
91
|
+
let i = 0;
|
|
92
|
+
while (i < lines.length) {
|
|
93
|
+
if (!bundleRe.test(lines[i])) {
|
|
94
|
+
i++;
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
const start = i;
|
|
98
|
+
while (i < lines.length && bundleRe.test(lines[i])) {
|
|
99
|
+
i++;
|
|
100
|
+
}
|
|
101
|
+
if (i - start < 2) continue;
|
|
102
|
+
|
|
103
|
+
const slice = lines.slice(start, i);
|
|
104
|
+
const sorted = [...slice].sort((a, b) => {
|
|
105
|
+
const ka = a.match(bundleRe)?.[0] ?? '';
|
|
106
|
+
const kb = b.match(bundleRe)?.[0] ?? '';
|
|
107
|
+
return ka < kb ? -1 : ka > kb ? 1 : 0;
|
|
108
|
+
});
|
|
109
|
+
for (let j = 0; j < sorted.length; j++) {
|
|
110
|
+
lines[start + j] = sorted[j];
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
text = lines.join('\n');
|
|
114
|
+
|
|
115
|
+
// --- Pass 2: inline sort (JSON arrays, etc.) ---
|
|
116
|
+
const tokenRe = /_bundle\/[a-z0-9][-a-z0-9]*/g;
|
|
117
|
+
const hits: {start: number; end: number; value: string}[] = [];
|
|
118
|
+
let m;
|
|
119
|
+
while ((m = tokenRe.exec(text)) !== null) {
|
|
120
|
+
hits.push({start: m.index, end: m.index + m[0].length, value: m[0]});
|
|
121
|
+
}
|
|
122
|
+
if (hits.length < 2) return text;
|
|
123
|
+
|
|
124
|
+
// Gap between two tokens is "glue" when it contains no alphanumeric chars
|
|
125
|
+
// (ignoring `_bundle` substrings that may appear in the gap).
|
|
126
|
+
const isGlue = (gap: string) => !/[a-zA-Z0-9]/.test(gap.replace(/_bundle/g, ''));
|
|
127
|
+
|
|
128
|
+
// Group consecutive same-line tokens into runs.
|
|
129
|
+
const runs: number[][] = [[0]];
|
|
130
|
+
for (let idx = 1; idx < hits.length; idx++) {
|
|
131
|
+
const gap = text.slice(hits[idx - 1].end, hits[idx].start);
|
|
132
|
+
if (!gap.includes('\n') && isGlue(gap)) {
|
|
133
|
+
runs[runs.length - 1].push(idx);
|
|
134
|
+
} else {
|
|
135
|
+
runs.push([idx]);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Sort each run with 2+ tokens, rewriting from the end to preserve offsets.
|
|
140
|
+
for (let r = runs.length - 1; r >= 0; r--) {
|
|
141
|
+
const run = runs[r];
|
|
142
|
+
if (run.length < 2) continue;
|
|
143
|
+
|
|
144
|
+
const values = run.map((idx) => hits[idx].value);
|
|
145
|
+
const sorted = [...values].sort();
|
|
146
|
+
if (values.every((v, idx) => v === sorted[idx])) continue;
|
|
147
|
+
|
|
148
|
+
for (let k = run.length - 1; k >= 0; k--) {
|
|
149
|
+
const {start: s, end: e} = hits[run[k]];
|
|
150
|
+
text = text.slice(0, s) + sorted[k] + text.slice(e);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
64
154
|
return text;
|
|
65
155
|
}
|