common-workflow-language / common-workflow-language/schema_salad
No doc generated if documentRoot is abstract
- Dominant language
- Python
- Stars
- 86
- Forks
- 64
- Avg merge
- 19h 24m
- Merged PRs (30d)
- 19
Description
Hi,
Using the following schema:
```yaml
- 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.
```bash
(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
Contributor guide
Assessment
This issue has not been assessed yet.