Skip to content

schema-salad-doc produces duplicated attribute entry when inheriting from parent #555

@kinow

Description

@kinow

Ref: common-workflow-language/cwl-v1.2#166 (comment)

The latest release of schema-salad allows for overriding the documentation of a parent type in a child type. i.e.

- name: Parent
  doc: |
    Parent record
  documentRoot: 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

Note the id field has a different doc value in the child type. However, running this schema through schema-salad, it prints the id field twice in the child.

(venv) kinow@ranma:~/Development/python/workspace/schema_salad$ schema-salad-tool --print-doc schema_salad/tests/inherited-attributes.yml > /tmp/test.html 
/home/kinow/Development/python/workspace/schema_salad/venv/bin/schema-salad-tool Current version: 8.3.20220622140130

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions