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

Content NOT SUPPORTED: keyword "id", use "$id" for schema ID #476

Open
4 tasks done
vicziani opened this issue Jul 11, 2024 · 6 comments
Open
4 tasks done

Content NOT SUPPORTED: keyword "id", use "$id" for schema ID #476

vicziani opened this issue Jul 11, 2024 · 6 comments
Assignees
Labels
area/messages scope/frontend Related to frontend changes status/confirmed A bug that is a confirmed one. Applicable only for the bug label. status/triage/completed Automatic triage completed type/bug Something isn't working

Comments

@vicziani
Copy link

Issue submitter TODO list

  • I've looked up my issue in FAQ
  • I've searched for an already existing issues here
  • I've tried running main-labeled docker image and the issue still persists there
  • I'm running a supported version of the application which is listed here

Describe the bug (actual behavior)

I'am using the Apicurio Schema Registry. After I create a JSON schema and try to send a message, I get the following error message:

Content NOT SUPPORTED: keyword "id", use "$id" for schema ID

JSON Schema:

{
  "$id": "https://training.com/EmployeeHasBeenCreatedEvent.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "EmployeeHasBeenCreatedEvent",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "format": "int64",
      "description": "The employee's id."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "The employee's name."
    }
  }
}

Reading messages based on the schema works well.

Expected behavior

Send the message.

Your installation details

Same with v1.0.0 and 4de0d53.

  schema-registry:
    image: apicurio/apicurio-registry-mem:2.6.1.Final
    ports: 
      - "8081:8080"
  kafka-ui:
    #image: ghcr.io/kafbat/kafka-ui:v1.0.0
    image: ghcr.io/kafbat/kafka-ui:4de0d5330d0c615e70fd9693bba265e6536029e9
    depends_on:
      - kafka
      - schema-registry
    ports:
      - 8082:8080
    environment:
      - KAFKA_CLUSTERS_0_NAME=local
      - KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka:9093
      - KAFKA_CLUSTERS_0_SCHEMAREGISTRY=http://schema-registry:8080/apis/ccompat/v7
      - DYNAMIC_CONFIG_ENABLED='true'

Steps to reproduce

  1. Create schema
  2. Create topic
  3. Send message

Screenshots

image
image
image

The JSON is generated by Kafka UI.

Logs

Nothing appears in the log.

Additional context

No response

@vicziani vicziani added status/triage Issues pending maintainers triage type/bug Something isn't working labels Jul 11, 2024
@kapybro kapybro bot added status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Jul 11, 2024
Copy link

Hi vicziani! 👋

Welcome, and thank you for opening your first issue in the repo!

Please wait for triaging by our maintainers.

As development is carried out in our spare time, you can support us by sponsoring our activities or even funding the development of specific issues.
Sponsorship link

If you plan to raise a PR for this issue, please take a look at our contributing guide.

@Haarolean
Copy link
Member

  • Is it just one of the schemas or json schemas don't work in general?
  • Are you using SR compatible API in apicurio?

@vicziani
Copy link
Author

  • For all schema.
  • What does it mean SR compatible? I'am using the Confluent Schema Registry API (Version 7) (/apis/ccompat/v7). As you see the Docker Compose file above:
KAFKA_CLUSTERS_0_SCHEMAREGISTRY=http://schema-registry:8080/apis/ccompat/v7

As you can see on the screenshots, the Kafka UI can download the schema, using it when consuming messages, create sample JSON based on the schema. It only throws error while producing message.

@vicziani
Copy link
Author

vicziani commented Jul 14, 2024

I tried with another schema draft(http://json-schema.org/draft-07/schema#).

Kafka UI can download the schema, using it when consuming messages, create sample JSON based on the schema.

But another error message while producing message: Content no schema with key or ref "http://json-schema.org/draft-07/schema#". Kafka UI supports only the draft https://json-schema.org/draft/2020-12/schema?!

@Haarolean
Copy link
Member

@Nilumilak can you take a look, please? It looks like a frontend issue, the validator either can't parse schema references or something.

@Haarolean Haarolean added scope/frontend Related to frontend changes area/messages status/confirmed A bug that is a confirmed one. Applicable only for the bug label. and removed status/triage/manual Manual triage in progress labels Jul 16, 2024
@kbzowski

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/messages scope/frontend Related to frontend changes status/confirmed A bug that is a confirmed one. Applicable only for the bug label. status/triage/completed Automatic triage completed type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants