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

allowSchemaSuggestions Not Working #87

Open
eddysanoli opened this issue May 16, 2024 · 0 comments
Open

allowSchemaSuggestions Not Working #87

eddysanoli opened this issue May 16, 2024 · 0 comments

Comments

@eddysanoli
Copy link

  • django-json-widget version:
  • Django version: 3.2.20
  • Python version: 3.8.10
  • Operating System: Windows

Description

Hey, I was trying to use the allowSchemaSuggestions option from the jsoneditor package. Passed the argument as part of the options of the JSON editor widget, but when the page loads I get the warning:

Unknown option "allowSchemaSuggestions". This option will be ignored

What I Did

This is the configuration for my Widget

        widgets = {
            'configuration': JSONEditorWidget(
                attrs={"style": "width: 100%; border: none; padding: unset;"},
                options={
                    "allowSchemaSuggestions": True,
                    "schema": {
                        "$schema": "http://json-schema.org/draft-07/schema#",
                        "$id": "tag-configuration-schema",
                        "title": "Title",
                        "description": "Description",
                        "type": "object",
                        "additionalProperties": False,
                        "properties": {
                            "type": {
                               "type": "string",
                               "enum": ["access", "trunk"]
                            },
                            "vlan": {
                                "type": "number"
                            },
                            "isolationEnabled": {
                                "type": "boolean"
                            },
                        },
                        "required": []
                    }
                }
            ),
        }
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

No branches or pull requests

1 participant