-
Notifications
You must be signed in to change notification settings - Fork 48
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
Generated documentation for ExternalRef shows superclass of itself #960
Comments
In the Metadata section of the model Markdown file, it looks fine (SubclassOf: none): spdx-3-model/model/Core/Classes/ExternalRef.md Lines 14 to 18 in 01ca260
|
We may need to target this as 3.0.2 ? |
This probably more of a layout/formatting/choice of word issue. There are also other classes that have the same issue, like: https://spdx.github.io/spdx-spec/v3.0.1/model/Core/Classes/Hash/ Probably have to have some indication that, the class at the top is not the superclass but "this class". |
Relevant code block in spec-parser: ## Superclasses
{% set full_inheritance_stack = [fqname] + inheritance_stack %}
{% for super in full_inheritance_stack | reverse %}
{{ ' ' * ((loop.index-1) * 6) }}
{% if loop.last %}
{{type_link(super)}}
{% else %}
{{type_link(super)}}<br />
{% endif %}
{% endfor %} |
Right -- it's the chain of classes ending at the class in question (of that page). |
Is the solution to remove the |
spec-parser can generate what is needed. But what is the desired outcome? What should be generated in cases where:
? Right now, in all cases, what is being generated is the complete list of classes, ending with (and including) the class in question. |
Adding more context, the output has always been like this since we added this functionality 5 months ago. The way to think about what is presented is a "class hierarchy", if you will, showing "inheritance". But in our spec, we are defining RDF classes, and the words "inheritance" and "hierarchy" are not acceptable in that domain; RDF talks about "superclasses" only. |
@goneall any additional input on how you want to see this? I see you put the 3.1 milestone; are you OK leaving this as it currently is in the PDF to go to ISO? Or do you want to have it reworked / reworded? Would a section title like "List of classes" or something similar be better? |
My current opinion is just using something like "None" to indicate there is no superclass Alternatives I'm also OK with:
I would just have the superclasses - not the class itself (e.g. just Element for Artifact)
I would include all the hierarchy except the class itself |
I'm OK with fixing this later in 3.1 - I consider it mostly a documentation issue. If someone complains in the ISO review, we can fix it on an update.
Now that I think about it, we could just rename the title "Class Hierarchy", then having the class itself in the section would make sense (at least to me) since you can have the class in the hierarchy but it technically isn't a superclass of itself. If we rename it, I wouldn't change anything else. If we don't include the class itself in the section (as proposed above), the current title is fine. |
ExternalRef
should not have any superclass, bit it shows itself as a superclass in the generated documentation.I'm not sure if this is an issue with the model, SpecParser of MkDocs in the spec - so I thought I would post this here to start.
See https://spdx.github.io/spdx-spec/v3.0.1/model/Core/Classes/ExternalRef/
The text was updated successfully, but these errors were encountered: