schema_salad
schema_salad copied to clipboard
No doc generated if documentRoot is abstract
Hi,
Using the following schema:
- name: Parent
doc: |
Parent record
documentRoot: true
abstract: true
docChild:
- "#Child"
type: record
fields:
- name: id
jsonldPredicate:
_id: "#id"
type: int
doc: Parent ID
- name: Child
doc: |
Child record
type: record
extends: Parent
fields:
- name: id
jsonldPredicate:
_id: "#id"
type: int
doc: Child ID
it passes the validation with
(venv) kinow@ranma:~/Development/python/workspace/schema_salad$ schema-salad-tool schema_salad/tests/inherited-attributes.yml
/home/kinow/Development/python/workspace/schema_salad/venv/bin/schema-salad-tool Current version: 8.3.20220622140130
Schema `schema_salad/tests/inherited-attributes.yml` is valid
, however, because of abstract: true
the generated documentation is empty. Removing the abstract: true
, the documentation is generated successfully, as seen below.
(venv) kinow@ranma:~/Development/python/workspace/schema_salad$ schema-salad-tool --print-doc schema_salad/tests/inherited-attributes.yml > /tmp/test.html
Is that per design? Or would it be OK to print the docs if the document root is abstract (I think it sounds reasonable to allow that)?
-Bruno