Skip to content

php-kafka/avsc-json-converter

Repository files navigation

Avsc Json Schema converter

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