ept / avrodoc

Documentation tool for Avro schemas
Apache License 2.0
148 stars 82 forks source link

Decomposed schemas are not supported? #19

Open quux00 opened 9 years ago

quux00 commented 9 years ago

Are decomposed Avro schemas are supported?

I have a large number of objects in a deeply nested object hierarchy and we've separated each object into its own avsc schema file. Leaf "objects" only have primitive types and non-leaf objects reference other objects rather than define them inline, like so:

{
  "namespace": "my.namespace",
  "type": "record",
  "name": "TopRecord",
  "fields": [
    {"name": "Field1", "type": ["null", "string"], "default": null},
    {"name": "Field2", "type": ["null", "string"], "default": null},
    {"name": "Field3", "type": ["null", "string"], "default": null, "aliases": ["UpdateDtm"]},
    {"name": "Field4", "type": ["null", {"type": "array", "items": "string"}], "default": null},
    {"name": "Field5", "type": ["null", "SubRecord1"], "default": null},
    {"name": "Field6", "type": ["null", {"type": "array", "items": "SubRecord2"}], "default": null}
  ]
}

where SubRecord1 and 2 are defined in their own schema files (and may reference other subrecords, etc.)

Is this model supported in AvroDoc? When I run:

avrodoc src/main/resources/avro/import/*.avsc > foo.html

It runs without error but when I load foo.html into a browser it just displays "Loading" in both Chrome and Firefox.