Avro to markdown is a very simple project that generates readable markdown from an avro schema. This is useful to be able to generate readable, always up-to-date documentation on the schemas you use to exchange messages within your organization.
To get a local copy up and running follow these simple steps.
pip install avro-to-markdown
With avro_schema.avsc:
{
"type": "record",
"name": "User",
"namespace": "example.avro",
"fields": [
{"name": "favorite_number", "type": "int", "doc": "Favorite number"}
]
}
>>> from pathlib import Path
>>> from avro_to_markdown import schema_to_markdown
>>> schema = json.loads(Path("avro_schema.avsc").read_text())
>>> print(schema_to_markdown("# My schema\n\nThis message has my favorite number.\n", schema))
# My schema
This message has my favorite number.
* favorite_number - Favorite number (number)
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. For detailed contributing guidelines, please see CONTRIBUTING.md
Distributed under the MIT
License. See LICENSE
for more information.
Project Link: https://github.com/wayfair-incubator/avro-to-markdown/