use super::OutputFieldDoc;
pub(super) const TOP_LEVEL_LICENSE_DETECTION_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "identifier",
rust_field: "identifier",
value_shape: "string",
presence: "Always emitted.",
meaning: "Stable grouped-detection identifier for this top-level license detection block.",
},
OutputFieldDoc {
json_name: "license_expression",
rust_field: "license_expression",
value_shape: "string",
presence: "Always emitted.",
meaning: "Grouped license expression for the top-level detection block.",
},
OutputFieldDoc {
json_name: "license_expression_spdx",
rust_field: "license_expression_spdx",
value_shape: "string",
presence: "Always emitted.",
meaning: "SPDX-form grouped license expression for the top-level detection block.",
},
OutputFieldDoc {
json_name: "detection_count",
rust_field: "detection_count",
value_shape: "integer",
presence: "Always emitted.",
meaning: "Number of file-level detections that contributed to this grouped top-level block.",
},
OutputFieldDoc {
json_name: "detection_log",
rust_field: "detection_log",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Grouping-time notes that explain why this top-level detection looks the way it does.",
},
OutputFieldDoc {
json_name: "reference_matches",
rust_field: "reference_matches",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Representative match/reference records retained on the top-level grouped detection block.",
},
];
pub(super) const LICENSE_DETECTION_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "license_expression",
rust_field: "license_expression",
value_shape: "string",
presence: "Always emitted.",
meaning: "Grouped license expression for the detection block.",
},
OutputFieldDoc {
json_name: "license_expression_spdx",
rust_field: "license_expression_spdx",
value_shape: "string",
presence: "Always emitted.",
meaning: "SPDX-form expression for the detection block.",
},
OutputFieldDoc {
json_name: "matches",
rust_field: "matches",
value_shape: "array<object>",
presence: "Always emitted.",
meaning: "Match records that contributed to this grouped file- or package-level detection.",
},
OutputFieldDoc {
json_name: "detection_log",
rust_field: "detection_log",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Notes explaining post-processing or grouping decisions for this detection.",
},
OutputFieldDoc {
json_name: "identifier",
rust_field: "identifier",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Stable detection identifier when available.",
},
];
pub(super) const MATCH_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "license_expression",
rust_field: "license_expression",
value_shape: "string",
presence: "Always emitted.",
meaning: "License expression assigned to this individual match.",
},
OutputFieldDoc {
json_name: "license_expression_spdx",
rust_field: "license_expression_spdx",
value_shape: "string",
presence: "Always emitted.",
meaning: "SPDX-form expression assigned to this individual match.",
},
OutputFieldDoc {
json_name: "from_file",
rust_field: "from_file",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Repo-relative path of the file the match came from (same value as the resource `path`).",
},
OutputFieldDoc {
json_name: "start_line",
rust_field: "start_line",
value_shape: "integer",
presence: "Always emitted.",
meaning: "First line covered by the match.",
},
OutputFieldDoc {
json_name: "end_line",
rust_field: "end_line",
value_shape: "integer",
presence: "Always emitted.",
meaning: "Last line covered by the match.",
},
OutputFieldDoc {
json_name: "matcher",
rust_field: "matcher",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Matcher kind that produced the match.",
},
OutputFieldDoc {
json_name: "score",
rust_field: "score",
value_shape: "number",
presence: "Always emitted.",
meaning: "Match score on the public output scale.",
},
OutputFieldDoc {
json_name: "matched_length",
rust_field: "matched_length",
value_shape: "integer | null",
presence: "Emitted only when available.",
meaning: "Matched token/text length when tracked.",
},
OutputFieldDoc {
json_name: "match_coverage",
rust_field: "match_coverage",
value_shape: "number | null",
presence: "Emitted only when available.",
meaning: "Coverage ratio for the match when tracked.",
},
OutputFieldDoc {
json_name: "rule_relevance",
rust_field: "rule_relevance",
value_shape: "integer | null",
presence: "Emitted only when available.",
meaning: "Rule relevance score when tracked.",
},
OutputFieldDoc {
json_name: "rule_identifier",
rust_field: "rule_identifier",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Identifier of the matched rule when available.",
},
OutputFieldDoc {
json_name: "rule_url",
rust_field: "rule_url",
value_shape: "string | null",
presence: "Always emitted.",
meaning: "Rule URL when available.",
},
OutputFieldDoc {
json_name: "matched_text",
rust_field: "matched_text",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Matched text payload when text output is enabled.",
},
OutputFieldDoc {
json_name: "matched_text_diagnostics",
rust_field: "matched_text_diagnostics",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Diagnostic rendering of the matched text when enabled.",
},
OutputFieldDoc {
json_name: "referenced_filenames",
rust_field: "referenced_filenames",
value_shape: "array<string> | null",
presence: "Emitted only when available.",
meaning: "Referenced filenames captured on the matched rule when applicable.",
},
];
pub(super) const LICENSE_REFERENCE_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "key",
rust_field: "key",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Primary ScanCode-style license key when one is available for the reference block.",
},
OutputFieldDoc {
json_name: "language",
rust_field: "language",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Language tag for the referenced license text when the license reference is language-specific.",
},
OutputFieldDoc {
json_name: "name",
rust_field: "name",
value_shape: "string",
presence: "Always emitted.",
meaning: "Canonical human-facing name of the referenced license.",
},
OutputFieldDoc {
json_name: "short_name",
rust_field: "short_name",
value_shape: "string",
presence: "Always emitted.",
meaning: "Short display name of the referenced license.",
},
OutputFieldDoc {
json_name: "owner",
rust_field: "owner",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Owning organization or steward of the referenced license, when captured.",
},
OutputFieldDoc {
json_name: "homepage_url",
rust_field: "homepage_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Homepage URL for the referenced license.",
},
OutputFieldDoc {
json_name: "spdx_license_key",
rust_field: "spdx_license_key",
value_shape: "string",
presence: "Always emitted.",
meaning: "Primary SPDX license key associated with the referenced license.",
},
OutputFieldDoc {
json_name: "other_spdx_license_keys",
rust_field: "other_spdx_license_keys",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Additional SPDX license keys associated with the same referenced license.",
},
OutputFieldDoc {
json_name: "osi_license_key",
rust_field: "osi_license_key",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "OSI license key when the referenced license is recognized by OSI.",
},
OutputFieldDoc {
json_name: "text_urls",
rust_field: "text_urls",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "URLs to known license text sources for this referenced license.",
},
OutputFieldDoc {
json_name: "osi_url",
rust_field: "osi_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "OSI detail page URL for the referenced license.",
},
OutputFieldDoc {
json_name: "faq_url",
rust_field: "faq_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "FAQ URL for the referenced license.",
},
OutputFieldDoc {
json_name: "other_urls",
rust_field: "other_urls",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Additional URLs associated with the referenced license.",
},
OutputFieldDoc {
json_name: "category",
rust_field: "category",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "License category label, when the license data classifies it.",
},
OutputFieldDoc {
json_name: "is_exception",
rust_field: "is_exception",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the referenced license is an exception rather than a standalone license.",
},
OutputFieldDoc {
json_name: "is_unknown",
rust_field: "is_unknown",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the referenced license is treated as an unknown or placeholder license.",
},
OutputFieldDoc {
json_name: "is_generic",
rust_field: "is_generic",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the referenced license is generic rather than a specific named license.",
},
OutputFieldDoc {
json_name: "notes",
rust_field: "notes",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Additional notes carried by the referenced license record.",
},
OutputFieldDoc {
json_name: "minimum_coverage",
rust_field: "minimum_coverage",
value_shape: "integer | null",
presence: "Emitted only when available.",
meaning: "Minimum coverage threshold associated with the referenced license, when specified.",
},
OutputFieldDoc {
json_name: "standard_notice",
rust_field: "standard_notice",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Standard notice text associated with the referenced license.",
},
OutputFieldDoc {
json_name: "ignorable_copyrights",
rust_field: "ignorable_copyrights",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Copyright strings considered ignorable for this referenced license.",
},
OutputFieldDoc {
json_name: "ignorable_holders",
rust_field: "ignorable_holders",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Holder strings considered ignorable for this referenced license.",
},
OutputFieldDoc {
json_name: "ignorable_authors",
rust_field: "ignorable_authors",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Author strings considered ignorable for this referenced license.",
},
OutputFieldDoc {
json_name: "ignorable_urls",
rust_field: "ignorable_urls",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "URL strings considered ignorable for this referenced license.",
},
OutputFieldDoc {
json_name: "ignorable_emails",
rust_field: "ignorable_emails",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Email strings considered ignorable for this referenced license.",
},
OutputFieldDoc {
json_name: "scancode_url",
rust_field: "scancode_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "ScanCode reference URL for this license, when available.",
},
OutputFieldDoc {
json_name: "licensedb_url",
rust_field: "licensedb_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "LicenseDB URL for this license, when available.",
},
OutputFieldDoc {
json_name: "spdx_url",
rust_field: "spdx_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "SPDX reference URL for this license, when available.",
},
OutputFieldDoc {
json_name: "text",
rust_field: "text",
value_shape: "string",
presence: "Always emitted.",
meaning: "Canonical license text payload preserved on the reference block.",
},
];
pub(super) const LICENSE_RULE_REFERENCE_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "identifier",
rust_field: "identifier",
value_shape: "string",
presence: "Always emitted.",
meaning: "Stable identifier of the referenced license rule.",
},
OutputFieldDoc {
json_name: "license_expression",
rust_field: "license_expression",
value_shape: "string",
presence: "Always emitted.",
meaning: "License expression associated with the referenced rule.",
},
OutputFieldDoc {
json_name: "is_license_text",
rust_field: "is_license_text",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule is classified as license-text evidence.",
},
OutputFieldDoc {
json_name: "is_license_notice",
rust_field: "is_license_notice",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule is classified as license-notice evidence.",
},
OutputFieldDoc {
json_name: "is_license_reference",
rust_field: "is_license_reference",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule is classified as license-reference evidence.",
},
OutputFieldDoc {
json_name: "is_license_tag",
rust_field: "is_license_tag",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule is classified as license-tag evidence.",
},
OutputFieldDoc {
json_name: "is_license_clue",
rust_field: "is_license_clue",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule is classified as clue-only evidence.",
},
OutputFieldDoc {
json_name: "is_license_intro",
rust_field: "is_license_intro",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule is classified as introductory license wording.",
},
OutputFieldDoc {
json_name: "language",
rust_field: "language",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Language tag for the referenced rule when the rule is language-specific.",
},
OutputFieldDoc {
json_name: "rule_url",
rust_field: "rule_url",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Reference URL for the rule, when available.",
},
OutputFieldDoc {
json_name: "is_required_phrase",
rust_field: "is_required_phrase",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule is a required-phrase rule.",
},
OutputFieldDoc {
json_name: "skip_for_required_phrase_generation",
rust_field: "skip_for_required_phrase_generation",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether this rule should be excluded when deriving required-phrase rules automatically.",
},
OutputFieldDoc {
json_name: "replaced_by",
rust_field: "replaced_by",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Rule identifiers that supersede this rule.",
},
OutputFieldDoc {
json_name: "is_continuous",
rust_field: "is_continuous",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule expects continuous text rather than discontinuous matches.",
},
OutputFieldDoc {
json_name: "is_synthetic",
rust_field: "is_synthetic",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule was synthesized rather than sourced directly from curated reference text.",
},
OutputFieldDoc {
json_name: "is_from_license",
rust_field: "is_from_license",
value_shape: "boolean",
presence: "Always emitted.",
meaning: "Whether the rule was derived directly from a license text record.",
},
OutputFieldDoc {
json_name: "length",
rust_field: "length",
value_shape: "integer",
presence: "Always emitted.",
meaning: "Rule length on the public rule-reference surface.",
},
OutputFieldDoc {
json_name: "relevance",
rust_field: "relevance",
value_shape: "integer | null",
presence: "Emitted only when available.",
meaning: "Rule relevance score, when present.",
},
OutputFieldDoc {
json_name: "minimum_coverage",
rust_field: "minimum_coverage",
value_shape: "integer | null",
presence: "Emitted only when available.",
meaning: "Minimum coverage threshold associated with the rule, when specified.",
},
OutputFieldDoc {
json_name: "referenced_filenames",
rust_field: "referenced_filenames",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Referenced filenames attached to the rule metadata.",
},
OutputFieldDoc {
json_name: "notes",
rust_field: "notes",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Additional notes carried by the rule reference.",
},
OutputFieldDoc {
json_name: "ignorable_copyrights",
rust_field: "ignorable_copyrights",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Copyright strings considered ignorable for this rule.",
},
OutputFieldDoc {
json_name: "ignorable_holders",
rust_field: "ignorable_holders",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Holder strings considered ignorable for this rule.",
},
OutputFieldDoc {
json_name: "ignorable_authors",
rust_field: "ignorable_authors",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Author strings considered ignorable for this rule.",
},
OutputFieldDoc {
json_name: "ignorable_urls",
rust_field: "ignorable_urls",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "URL strings considered ignorable for this rule.",
},
OutputFieldDoc {
json_name: "ignorable_emails",
rust_field: "ignorable_emails",
value_shape: "array<string>",
presence: "Emitted only when non-empty.",
meaning: "Email strings considered ignorable for this rule.",
},
OutputFieldDoc {
json_name: "text",
rust_field: "text",
value_shape: "string | null",
presence: "Emitted only when available.",
meaning: "Canonical rule text payload when the reference includes it.",
},
];
pub(super) const LICENSE_POLICY_ENTRY_FIELDS: &[OutputFieldDoc] = &[
OutputFieldDoc {
json_name: "license_key",
rust_field: "license_key",
value_shape: "string",
presence: "Always emitted.",
meaning: "License key this policy entry applies to.",
},
OutputFieldDoc {
json_name: "label",
rust_field: "label",
value_shape: "string",
presence: "Always emitted.",
meaning: "Human-facing policy label for the license.",
},
OutputFieldDoc {
json_name: "color_code",
rust_field: "color_code",
value_shape: "string",
presence: "Always emitted.",
meaning: "Color code used by policy-aware outputs or UIs.",
},
OutputFieldDoc {
json_name: "icon",
rust_field: "icon",
value_shape: "string",
presence: "Always emitted.",
meaning: "Icon identifier used by policy-aware outputs or UIs.",
},
OutputFieldDoc {
json_name: "compliance_alert",
rust_field: "compliance_alert",
value_shape: "string (\"error\" | \"warning\")",
presence: "Emitted only when the policy entry sets a compliance severity.",
meaning: "Provenant compliance severity driving the --fail-on gate and SARIF output.",
},
];