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

UI says JSON field not valid but the schema works with schema-registry REST API #106

Open
j-a-h-i-r opened this issue Jul 27, 2021 · 0 comments

Comments

@j-a-h-i-r
Copy link

Hi, thanks for this cool tool! This makes working with schema-registry easier.

I have noticed an issue during the "Validate" step when trying to create a new subject. My schema is as follows,

{
  "type": "record",
  "name": "evolution",
  "doc": "This is a sample Avro schema to get you started. Please edit",
  "namespace": "com.landoop",
  "fields": [
    {
                "name": "json_field",
                "default": {"identifier": "", "type": ""},
                "type": {
                    "type": "record",
                    "name": "json_field",
                    "fields": [
                        {
                            "type": "string",
                            "name": "identifier"
                        },
                        {
                            "type": "string",
                            "name": "type"
                        }
                    ]
                }
            }
  ]
}

Upon clicking the Validate button, the UI displays is not valid. But if I POST the schema to the schema registry then it works fine.

curl -vs --stderr - -XPOST -i -H "Content-Type: application/vnd.schemaregistry.v1+json" --data '{"schema":"{\"type\":\"record\",\"name\":\"evolution\",\"doc\":\"This is a sample Avro schema to get you started. Please edit\",\"namespace\":\"com.landoop\",\"fields\":[{\"name\":\"json_field\",\"default\":{\"identifier\":\"\",\"type\":\"\"},\"type\":{\"type\":\"record\",\"name\":\"json_field\",\"fields\":[{\"type\":\"string\",\"name\":\"identifier\"},{\"type\":\"string\",\"name\":\"type\"}]}}]}"}' /api/schema-registry/subjects/asdfadsfasdfads/versions
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