Bad Request: "Cannot decode JSON schema"

Hi Folks,

I am not able to upload a self-describing schema to self hosted iglu schema registry.

Please me if I am doing something wrong here.

Url: http://162.197.101.100:8080/api/schemas/?isPublic=false

Body:

{
  "$schema": "http://162.197.101.100:8080/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#",
  "description": "Schema for a screen view event",
  "self": {
    "vendor": "com.cloudoribit.op",
    "name": "desk_screen",
    "format": "jsonschema",
    "version": "1-0-0"
  },
  "type": "object",
  "properties": {
    "name": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "country": {
      "type": "string"
    }
  },
  "minProperties": 1,
  "additionalProperties": false
}

It works, when I replace custom $schema with this “http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#”,`

Does it has some meanings attached? Is it possible to change it for local registry?

Yes - this is the metaschema for Snowplow that allows for the definition of the self object. You shouldn’t really need to change this at all as it’ll likely cause problems otherwise.

1 Like

Thank you @mike Makes sense.

What would be the schema passed to the tracker in that case?

I am using self-describing schema which goes to the enrich bad topic.

String eventUri = "iglu:com.cloudorbit.op/desk_view/jsonschema/1-0-1";

ErrorMessage:
"error": { "error": "ResolutionError", "lookupHistory": [ { "repository": "Iglu Central", "errors": [ { "error": "NotFound" } ], "attempts": 2, "lastAttempt": "2023-10-30T05:42:31.273Z" },

I was using a wrong version 1-0-1, setting it to the right one 1-0-0 worked.

@Jayant_Kumar , in case it matters to you, I noticed that in the first JSON schema the vendor is spelt differently, com.cloudoribit.op, unlike last mentioning of another event but presumably the same vendor was meant, com.cloudorbit.op.

Hi @ihor Thank you for pointing. It was a typo while writing this message.