metadata.json
This file is used by Obsrv while registering and running your connector. Here are the details of the file
| Name | Description |
|---|---|
type | Type: |
metadata | Type: |
id | Type: |
name | Type: |
version | Type: |
tenant | Type: |
type | Type: |
category | Type: |
description | Type: |
technology | Type: |
runtime | Type: |
licence | Type: |
owner | Type: |
main_class | Type: |
main_program | Type: |
icon | Type: |
connectors | Type: |
Here is a sample metadata.json file for your reference
{ "type": "connector", "metadata": { "id": "example-connector", "name": "Example Connector", "description": "Pull data from a Source", "type": "source", "tenant": "single", "version": "1.0.0", "category": "stream", "technology": "scala", "runtime": "flink", "licence": "MIT", "owner": "Sunbird", "main_class": "org.sunbird.obsrv.connector.ExampleConnector", "main_program": "example-connector-1.0.0.jar", "icon": "icon.svg" }}Here is the JSON Schema to validate your metadata.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "type": { "type": "string", "enum": ["connector"] }, "metadata": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "version": { "type": "string" }, "tenant": { "type": "string", "enum": ["single", "multiple"] }, "type": { "type": "string", "enum": ["source"] }, "category": { "type": "string", "enum": ["batch", "stream"] }, "description": { "type": "string" }, "technology": { "type": "string", "enum": ["java", "scala", "python"] }, "runtime": { "type": "string", "enum": ["spark", "flink"] }, "licence": { "type": "string" }, "owner": { "type": "string" }, "main_class": { "type": "string" }, "main_program": { "type": "string" } }, "required": [ "id", "version", "tenant", "type", "category", "technology", "runtime", "licence", "owner", "main_program" ] }, "connectors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string" }, "icon": { "type": ["null", "string"] } }, "required": [ "id", "name", "description", "icon" ] } } }, "required": [ "type", "metadata" ], "dependentSchemas": { "metadata": { "allOf": [ { "anyOf": [ { "properties": { "metadata": { "properties": { "tenant": { "enum": ["single"] } }, "required": [ "id", "description", "version", "tenant", "type", "category", "technology", "runtime", "licence", "owner", "icon", "main_program" ] } }, "not": { "required": ["connectors"] } }, { "properties": { "metadata": { "properties": { "tenant": { "enum": ["multiple"] } }, "required": [ "id", "name", "version", "tenant", "type", "category", "technology", "runtime", "licence", "owner", "main_program" ], "not": { "required": ["description"] } }, "connectors": { "type": "array" } }, "required": ["connectors"] } ] }, { "anyOf": [ { "properties": { "metadata": { "properties": { "technology": { "enum": ["python"] } }, "not": { "required": ["main_class"] } } } }, { "properties": { "metadata": { "properties": { "technology": { "enum": ["java", "scala"] } }, "required": ["main_class"] } } } ] }, { "oneOf": [ { "properties": { "metadata": { "properties": { "runtime": { "enum": ["flink"] }, "technology": { "not": { "enum": ["python"] } } } } } }, { "properties": { "metadata": { "properties": { "runtime": { "enum": ["spark"] }, "technology": { "enum": ["python", "java", "scala"] } } } } } ] } ] } }}