Skip to content
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

special character in property name (dot) #1631

Closed
Deepak1100 opened this issue Aug 27, 2020 · 5 comments
Closed

special character in property name (dot) #1631

Deepak1100 opened this issue Aug 27, 2020 · 5 comments

Comments

@Deepak1100
Copy link

Describe the bug
I have '.' in one property name it's creating key in form like object.key
example:

"parameters": {
          "type": "object",
          "properties": {
            "rds.logical_replication": {
              "type": "string",
              "enum": [
                "1",
                "0"
              ],
              "default": "1"
            }
          }
},
        {
          "type": "FoldableGroup",
          "id": "parameters",
          "parentId": "database",
          "label": "DB Parameter",
          "scope": "#/properties/extraResources/properties/database/properties/parameters",
          "elements": [
            {
              "type": "Control",
              "label": "rds.logical_replication",
              "scope": "#/properties/extraResources/properties/database/properties/parameters/properties/rds.logical_replication"
            }
          ]
        },

The output looks like this

      "parameters": {
        "rds": {
          "logical_replication": "0"
        },
        "rds.logical_replication": "1"
      },

Expected behavior

      "parameters": {
        "rds.logical_replication": "1"
      },

i think the problem is with the scope

#/properties/extraResources/properties/database/properties/parameters/properties/rds.logical_replication

is there way i can escap special characther?

Used Setup (please complete the following information):
react

@sdirix
Copy link
Member

sdirix commented Sep 16, 2020

Hi @Deepak1100, we're using lodash's get internally so you could try escaping the property with quotation marks.

Either way we should get this fixed in JSON Forms at some point! Thanks for the report!

@sdirix sdirix added this to the Backlog milestone Nov 21, 2020
@emergencyofstate
Copy link

emergencyofstate commented Nov 24, 2021

Hello. We are using jsonforms with the Material UI renderers. Would this issue be related to why when using the boolean control, special characters are getting stripped from property names? The label of the control seems to be sanitized.

Property in schema: Band & Orchestra: {type: Boolean}

This is rendered via MaterialBooleanControl/MUI Checkbox
Screen Shot 2021-11-23 at 4 44 42 PM

Update: It turns out the we just did not have label properties included in the schema for these items. Once adding, the special characters rendered fine.

@sdirix sdirix modified the milestones: Backlog, 3.x Dec 13, 2021
@sdirix
Copy link
Member

sdirix commented Dec 13, 2021

Hello. We are using jsonforms with the Material UI renderers. Would this issue be related to why when using the boolean control, special characters are getting stripped from property names? The label of the control seems to be sanitized.

Property in schema: Band & Orchestra: {type: Boolean}

This is rendered via MaterialBooleanControl/MUI Checkbox Screen Shot 2021-11-23 at 4 44 42 PM

Update: It turns out the we just did not have label properties included in the schema for these items. Once adding, the special characters rendered fine.

Hi @emergencyofstate, we use lodash's startCase on the property name when there are no JSON Schema title or UI Schema label defined. Among other things it removes special characters.

@sdirix sdirix linked a pull request Dec 13, 2021 that will close this issue
@cmeng-talend
Copy link

cmeng-talend commented Jan 3, 2023

Hello, may I know that is there any plan for this issue? thanks.

@sdirix sdirix removed this from the 3.x milestone Jun 29, 2023
@sdirix
Copy link
Member

sdirix commented Jun 29, 2023

We settled on an improvement, documented it in #2153 and will start developing it soon. Therefore I'll close this issue as the follow up already exists.

@sdirix sdirix closed this as completed Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants