brutusin / brutusin/json-forms

Static Property

Open
#33 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
618
Forks
171
PR merge metrics
No merged PRs in 30d

Description

Can we have support to add static properties in the schema such that it's replicated into the data.

```
// schema.json
// code before this
"someKey": {
"type": "array",
"items": {
"someInnerKey": {
},
"someStaticKey": {
},
},
},
// code after this
```

And the resulting data would look like this, where the contents of `someStaticKey` is the same for all array elements of `someKey`.

```
// data before this
"someKey": [
{
"someInnerKey": {
// InnerKeyData1
},
"someStaticKey": {
// StaticData
},
},
{
"someInnerKey": {
// InnerKeyData2
},
"someStaticKey": {
// StaticData
},
},
],
// data after this
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.