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

Schema reference for JSON schemas #1198

Open
jcarlos92 opened this issue May 24, 2024 · 1 comment
Open

Schema reference for JSON schemas #1198

jcarlos92 opened this issue May 24, 2024 · 1 comment

Comments

@jcarlos92
Copy link

Description

Documentation

I’m encountering an issue with referencing a schema using $ref. Despite following the documentation example, the child reference is never resolved. It seems the library attempts to read from the file system but cannot locate the file in the specified path.

Error message:
compilation failed: invalid json file:///Users/user.name/kafka-go-producer/src/cmd/greeting_categories.schema.json: EOF"

How to reproduce

Parent Schema:
{ "$id": "zendesk-talk-streams", "$schema": "http://json-schema.org/draft/2020-12/schema", "oneOf": [ { "$ref": "greeting_categories.schema.json" } ], "title": "Zendesk Talk Streams" }

Child Schema:
{ "additionalProperties": false, "properties": { "id": { "type": [ "null", "integer" ] }, "name": { "type": [ "null", "string" ] } }, "required": [ "id", "name" ], "type": "object" }

image

If you attempt to serialize a JSON message with the provided values, the child reference remains unresolved.

@rayokota
Copy link
Member

@jcarlos92 , can you try again with v2.5.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants