Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No doc generated if documentRoot is abstract #554

Open
kinow opened this issue Jun 23, 2022 · 0 comments
Open

No doc generated if documentRoot is abstract #554

kinow opened this issue Jun 23, 2022 · 0 comments

Comments

@kinow
Copy link
Member

kinow commented Jun 23, 2022

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 

image

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant