jsonform / jsonform

Build forms from JSON Schema. Easily template-able. Compatible with Bootstrap 3 out of the box.
https://jsonform.github.io/jsonform/playground/index.html
MIT License
2.72k stars 553 forks source link

How to escape slash in scope #438

Closed amojisys closed 4 months ago

amojisys commented 6 months ago

Hi,

I have such a usecase:

In my values.schema.json:

...
"annotations": {
          "type": "object",
          "properties": {
            "nginx.ingress.kubernetes.io/proxy-request-buffering": {
              "type": "string",
              "title": "Nginx proxy-request-buffering",
              "default": "off"
            },
            "nginx.ingress.kubernetes.io/proxy-buffering": {
              "type": "string",
              "title": "Nginx proxy-buffering",
              "default": "off"
            },
            "nginx.ingress.kubernetes.io/proxy-read-timeout": {
              "type": "string",
              "title": "Nginx proxy-request-buffering",
              "default": "300"
            }
          }
        }
...

In my ui.schema.json:

{
   "type": "Control",
   "scope": "#/properties/ingress/properties/annotations/properties/nginx.ingress.kubernetes.io/proxy-request-buffering"
 }

Becasue of slash in key of "nginx.ingress.kubernetes.io/proxy-request-buffering" I won't be able to print controls well. I need exact key for my values.

How can I handle this situation?

Thanks

sdetweil commented 6 months ago

sorry, I do not understand 'print' .. if the 'print' is a button that causes a javascript event, then u are in your javsacript code not in the form anymore.. and u can use replace, or split, or....

sdetweil commented 4 months ago

any feedback ?

sdetweil commented 4 months ago

I'm going to close this issue... if you still think its a problem , re-open it..