question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot render a form for a valid JSON schema

See original GitHub issue

Prerequisites

  • I have read the documentation;
  • In the case of a bug report, I understand that providing a SSCCE example is tremendously useful to the maintainers.

Description

The form shows an error for a part of valid JSON schema

Steps to Reproduce

Provide the folllowing JSON schema (from https://github.com/Azure/open-service-broker-azure):

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "properties": {
    "firewallRules": {
      "description": "Firewall rules to apply to instance. If left unspecified, defaults to only Azure IPs",
      "items": {
        "description": "Individual Firewall Rule",
        "properties": {
          "endIPAddress": {
            "description": "End of firewall rule range",
            "type": "string"
          },
          "name": {
            "description": "Name of firewall rule",
            "type": "string"
          },
          "startIPAddress": {
            "description": "Start of firewall rule range",
            "type": "string"
          }
        },
        "required": [
          "name",
          "startIPAddress",
          "endIPAddress"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "location": {
      "description": "The Azure region in which to provision applicable resources.",
      "type": "string"
    },
    "resourceGroup": {
      "description": "The (new or existing) resource group with which to associate new resources.",
      "type": "string"
    },
    "sslEnforcement": {
      "default": "",
      "description": "Specifies whether the server requires the use of TLS when connecting. Left unspecified, SSL will be enforced",
      "enum": [
        "",
        "enabled",
        "disabled"
      ],
      "type": "string"
    },
    "tags": {
      "additionalProperties": {
        "type": "string"
      },
      "description": "Tags to be applied to new resources, specified as key/value pairs.",
      "type": "object"
    }
  },
  "type": "object"
}

Expected behavior

Rendering the whole form

Actual behavior

Rendering the form until the tags key appears

Invalid tags object field configuration:Cannot convert undefined or null to object.

{"additionalProperties":{"type":"string"},"description":"Tags to be applied to new resources, specified as key/value pairs.","type":"object"}

This part is problematic:

"tags": {
  "additionalProperties": {
    "type": "string"
  },
  "description": "Tags to be applied to new resources, specified as key/value pairs.",
  "type": "object"
}

Commenting it makes the error disappear.

Version

1.0.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
derbergcommented, Jul 29, 2019

@epicfaace yeap, this is fixed, I think we did some additional PRs for this topic afaik. Tags are handled super nice by the lib

1reaction
edi9999commented, Jul 31, 2018

If you make a pull request I will review it and merge it if ok. rjsf is in fact not actively maintained.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't render null fields · Issue #1232 · rjsf-team/react ... - GitHub
The title is rendered but the following error appears: ... react-jsonschema-form has not previously supported null fields.
Read more >
Home - react-jsonschema-form documentation - Read the Docs
react-jsonschema-form validates that the data conforms to the given schema, but doesn't prevent the user from inputing data that doesn't fit (for example, ......
Read more >
Error while using react-jsonschema-form with material in ...
I am using react-jsonschema-form package with React, Material UI and Typescript. I am using the Material UI themed form called MuiForm5.
Read more >
Guide to using JSON schema forms - Remote
JSON Schema is a vocabulary that is primarily used to annotate and validate JSON data. So going back to our example, we could...
Read more >
Error doesn't show up in custom renderer
I have crated a custom renderer and have a schema that defines an object. Within that object there is a string property for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found