php-kafka/avsc-json-converter

Library that converts Avsc to JSON schema

v0.1.5 2022-05-08 20:18 UTC

This package is auto-updated.

Last update: 2024-12-09 01:40:22 UTC


README

Converts an Avsc schema into a JSON schema

Installation

composer require php-kafka/avsc-json-converter

Usage

Convert a folder with avsc files into json schema:

./bin/console convert:avsc-to-json avscFolder jsonOutputFolder

Convert a single avsc file to a json schema:

./bin/console convert:single-avsc-to-json avscFolder jsonOutputFolder

Options

  • --convertOnlyValueSchema only convert avsc files that end with value.avsc
  • --noDefaultAsRequired only mark fields with no defaults as required instead of all

Known issues

This library is very experimental and has the following open issues / tasks