AbsaOSS / AbsaOSS/enceladus

Import Avro schema from subject definitions

Open
#1,403 0 comments 0 reactions 0 assignees View on GitHub
feature Menas priority: medium request
Dominant language
Scala
Stars
33
Forks
16
PR merge metrics
No merged PRs in 30d

Description

## Background
Currently, if the Confluent control panel can show an Avro schema for a topic. But when you click "Download" it downloads a subject definition containing key and value schemas as JSON fields.

## Feature
Add ability for the Avro schema uploader to recognize that the JSON is a full subject definition. If that is the case:
- Extract key and value schemas (or only one of them if only one of them is present)
- Combine the key schema with the value schema by appending value schema after the key schema.
- Import such a combined schema to Menas.

## Additional context
We support:
```json
{
"type": "record",
"name": "test",
"namespace": "some.name.space",
"fields": [
{
"name": "id",
"type": [
"null",
"int"
]
}
]
}
```

but we also need to support
```json
{
"subject": "some.subject.topic-value",
"version": 1,
"id": 2,
"schema": "{\"type\":\"record\",\"name\":\"test\",\"namespace\":\"some.name.space\",\"fields\":[{\"name\":\"id\",\"type\":[\"null\",\"int\"]}]}"
}
```
*Note. Both JSONs specify the same schema.*

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.