Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions dist/index.html

This file was deleted.

Binary file removed dist/index.html.gz
Binary file not shown.
3,918 changes: 0 additions & 3,918 deletions dist/rapidoc-min.js

This file was deleted.

64 changes: 0 additions & 64 deletions dist/rapidoc-min.js.LICENSE.txt

This file was deleted.

Binary file removed dist/rapidoc-min.js.LICENSE.txt.gz
Binary file not shown.
Binary file removed dist/rapidoc-min.js.gz
Binary file not shown.
1 change: 0 additions & 1 deletion dist/rapidoc-min.js.map

This file was deleted.

Binary file removed dist/rapidoc-min.js.map.gz
Binary file not shown.
21,639 changes: 0 additions & 21,639 deletions dist/rapidoc.js

This file was deleted.

39 changes: 0 additions & 39 deletions dist/report.html

This file was deleted.

4 changes: 2 additions & 2 deletions src/components/json-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ export default class JsonTree extends LitElement {
if (e.target.classList.contains('open-bracket')) {
if (openBracketEl.classList.contains('expanded')) {
openBracketEl.classList.replace('expanded', 'collapsed');
e.target.innerHTML = e.target.classList.contains('array') ? '[...]' : '{...}';
e.target.innerHTML = e.target.classList.contains('one-of') ? '...' : e.target.classList.contains('array') ? '[...]' : '{...}';
} else {
openBracketEl.classList.replace('collapsed', 'expanded');
e.target.innerHTML = e.target.classList.contains('array') ? '[' : '{';
e.target.innerHTML = e.target.classList.contains('one-of') ? ' ' : e.target.classList.contains('array') ? '[' : '{';
}
}
}
Expand Down
14 changes: 11 additions & 3 deletions src/components/schema-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,15 @@ export default class SchemaTree extends LitElement {
const newSchemaLevel = data['::type']?.startsWith('xxx-of') ? schemaLevel : (schemaLevel + 1);
// const newIndentLevel = dataType === 'xxx-of-option' || data['::type'] === 'xxx-of-option' ? indentLevel : (indentLevel + 1);
const newIndentLevel = dataType === 'xxx-of-option' || data['::type'] === 'xxx-of-option' || key.startsWith('::OPTION') ? indentLevel : (indentLevel + 1);
if (data['::type'] === 'object') {

if (data['::ONE~OF'] !== undefined || data['::ONE~OF '] !== undefined) {
if (schemaLevel < this.schemaExpandLevel) {
openBracket = html`<span class="open-bracket one-of">${data['::nullable'] ? 'null┃' : ''}&nbsp;</span>`;
} else {
openBracket = html`<span class="open-bracket one-of">${data['::nullable'] ? 'null┃' : ''}...</span>`;
}
closeBracket = '';
} else if (data['::type'] === 'object') {
if (dataType === 'array') {
if (schemaLevel < this.schemaExpandLevel) {
openBracket = html`<span class="open-bracket array-of-object" >[{</span>`;
Expand Down Expand Up @@ -359,7 +367,7 @@ export default class SchemaTree extends LitElement {
const nullable = rowEl.classList.contains('nullable');
if (rowEl.classList.contains('expanded')) {
rowEl.classList.replace('expanded', 'collapsed');
e.target.innerHTML = e.target.classList.contains('array-of-object')
e.target.innerHTML = e.target.classList.contains('one-of') ? '...' : e.target.classList.contains('array-of-object')
? '[{...}]'
: e.target.classList.contains('array-of-array')
? '[[...]]'
Expand All @@ -368,7 +376,7 @@ export default class SchemaTree extends LitElement {
: `${nullable ? 'null┃' : ''}{...}`;
} else {
rowEl.classList.replace('collapsed', 'expanded');
e.target.innerHTML = e.target.classList.contains('array-of-object')
e.target.innerHTML = e.target.classList.contains('one-of') ? '&nbsp;' : e.target.classList.contains('array-of-object')
? '[{'
: e.target.classList.contains('array-of-array')
? `[[ ${e.target.dataset.arrayType}`
Expand Down