CWE::MappingNotes
Inherits JSON::Serializable < Struct < Value < Object
MappingNotes serializes its usage enum as the human-readable label
rather than the underscored Crystal name.
Constructors
new(pull : JSON::PullParser)
Sourcenew(usage : CWE::MappingUsage = MappingUsage::Other, raw_usage : Nil | String = nil, rationale : Nil | String = nil, comments : Nil | String = nil, reasons : Array(String) = [] of String, suggestions : Array(CWE::MappingSuggestion) = [] of MappingSuggestion)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
comments
Sourcerationale
Sourceraw_usage
Sourcereasons
Mapping_Notes/Reasons/Reason/@Type values such as "Frequent-Misuse",
"Acceptable-Use", "Prohibited", "Abstraction", etc.
suggestions
Mapping_Notes/Suggestions/Suggestion — a list of related CWEs that
MITRE recommends as alternative mapping targets.
usage
Every field carries a default so that the omit-when-empty shape written
by MappingNotes#to_json can be read back by MappingNotes.from_json.
Without them the round-trip failed with "Missing JSON attribute" for any
entry that had no reasons or suggestions.