-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add deprecations for component.author and metadata.manufacture #343
Conversation
Signed-off-by: andreas hilti <69210561+andreas-hilti@users.noreply.github.com>
The Obsolete attribute causes the xml serialization to ignore the corresponding element; I don't see a neat workaround. |
The usual fix to make another property for the xml serialization which is not browsable should still work, shouldn't it? |
Signed-off-by: andreas hilti <69210561+andreas-hilti@users.noreply.github.com>
Yes, it would (I guess acceptable, but not super neat). |
@@ -108,10 +108,20 @@ public enum ComponentScope | |||
public List<OrganizationalContact> Authors { get; set; } | |||
public bool ShouldSerializeAuthors() { return Authors?.Count > 0; } | |||
|
|||
[XmlElement("author")] | |||
[Obsolete("This will be removed in a future version. Use @.authors or @.manufacturer instead.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Should be manufacture like property name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thompson-tomo Sorry, I don't understand your comment. The obsolete comment is a one-to-one copy from the specification:
https://cyclonedx.org/docs/1.6/json/#components_items_author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting that the obsoletion text it has the property "manufacturer" however when u look at the class it is actually "manufacture"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the metadata, there is both "manfacture" (deprecated) and "manufacturer".
In component, you only have "manufacturer".
Is there still something to do here? The pr is still marked as draft. |
From my point of view, no. However, this depends also on the comment above. |
No description provided.