Skip to content

Commit 82f56b4

Browse files
committed
Fix nullable object with any-key.
1 parent a4f708f commit 82f56b4

4 files changed

Lines changed: 13 additions & 52 deletions

File tree

.eslintrc

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/components/schema-table.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ export default class SchemaTable extends LitElement {
117117
.tr.object:not(.circular-object) .key-label {
118118
margin-left: -6px
119119
}
120+
121+
/* Fix alignment with above for non-object keys */
122+
.tr .xxx-of-key {
123+
margin-left: 4px;
124+
}
120125
`,
121126
];
122127
}

src/utils/schema-utils.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,10 @@ export function schemaInObjectNotation(rawSchema, options, level = 0, suffix = '
455455
objTypeOption[key] = schemaInObjectNotation(schemaProperties[key], options, (level + 1));
456456
}
457457
}
458+
459+
if (schema.additionalProperties) {
460+
objTypeOption['<any-key>'] = schemaInObjectNotation(schema.additionalProperties, options);
461+
}
458462
multiTypeOptions[`::OPTION~${i + 1}`] = objTypeOption;
459463
} else if (v === 'array') {
460464
multiTypeOptions[`::OPTION~${i + 1}`] = {

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ export default {
6969
devServer: {
7070
port: 8080,
7171
hot: true,
72+
static: {
73+
directory: path.join(__dirname, 'mocks'),
74+
publicPath: '/mocks',
75+
},
7276
},
7377
module: {
7478
rules: [

0 commit comments

Comments
 (0)