php-kafka / avsc-json-converter
Library that converts Avsc to JSON schema
Fund package maintenance!
nick-zh
v0.1.5
2022-05-08 20:18 UTC
Requires
- php: ^7.4|^8.0
- ext-json: *
- pimple/pimple: ^3.5
- symfony/console: ^5.3
Requires (Dev)
- infection/infection: ^0.25.3
- johnkary/phpunit-speedtrap: ^4.0
- phpstan/phpstan: ^1.2
- phpunit/phpunit: ^9.5
- rregeer/phpunit-coverage-check: ^0.3.1
- squizlabs/php_codesniffer: ^3.6
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 withvalue.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