Skip to content

Form does not work correctly for schemas containing slashes or dots in property names #1952

Closed
@apirogov

Description

@apirogov

Describe the bug

When having slashes in keys, for each such key the form will have "No applicable renderer found".

Furthermore, when having dots in keys, there is some silent buggy behaviour so that the schema is parsed somehow incorrectly and I cant initialize data.

My current workaround is escaping both slashes and dots to make the form work correctly, and then unescape the keys in the resulting data.

Expected behavior

I expect that any string should be allowed as a key without issues.

The keys we use are Handle PIDs, looking like "21.T11148/dcd4e99d26a00b8132f8"

Steps to reproduce the issue

Initialize this component:

      <JsonForms
        schema= {{
            "$schema": "http://json-schema.org/draft-07/schema",
            "properties": {
              "21.T11148/dcd4e99d26a00b8132f8": {
                  "type": "string"
              }
            }
          }}
        data = {{
            "21.T11148/dcd4e99d26a00b8132f8": "test"
          }}
          renderers={materialRenderers}
          cells={materialCells}
      />

=> wont render

Remove slashes => will render, will not initialize with "test"

Remove dots => will render and initialize correctly

Screenshots

No response

In which browser are you experiencing the issue?

Firefox 99.0

Framework

React

RendererSet

Material

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions