Skip to content

fix: nested additional props cause data corruption #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VinzSpring
Copy link

@VinzSpring VinzSpring commented Jan 31, 2025

Fixed invalid path composition that causes nested additional properties to have invalid values.

An example that previously wouldn't have worked:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "SomeNestedConfig": {
      "type": "object",
      "default": {},
      "properties": {
        "CsvImportDirectory": {
          "type": ["string", "null"],
          "default": "import"
        },
        "KeyToValueMapping": {
          "type": "object",
          "patternProperties": {
            ".*": {
              "type": "string",
              "title": "Key"
            }
          },
          "additionalProperties": {
            "type": "string",
            "title": "Value"
          },
          "default": {}

        }
      },
      "required": ["CsvImportDirectory", "KeyToValueMapping"],
      "additionalProperties": true
    }
  },

  "required": [
    "SomeNestedConfig"
  ],
  "additionalProperties": true
}

Now it produces valid output.

Fixed invalid path composition that causes nested additional properties to have invalid values.
@CLAassistant
Copy link

CLAassistant commented Jan 31, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

netlify bot commented Jan 31, 2025

Deploy Preview for jsonforms-vuetify-renderers failed.

Name Link
🔨 Latest commit 991855b
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-vuetify-renderers/deploys/679ce3f2671d060008b73c9f

@Yekt
Copy link

Yekt commented Jan 31, 2025

We stumbled across issues when trying to use "additionalProperties" in nested objects.
This fix resovled those problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants