diff options
author | Keith Zantow <kzantow@gmail.com> | 2022-10-06 19:34:21 -0400 |
---|---|---|
committer | Keith Zantow <kzantow@gmail.com> | 2022-10-06 19:34:21 -0400 |
commit | 993e4915516e773859e9947e9fe815f08a25ed5a (patch) | |
tree | 8c24f733569e68ef1941f78d47933f4372eb1e7a /spdx/v2_2 | |
parent | fb7fe8874d01f3c9e2d7f450cf1407e7513b02ee (diff) | |
download | spdx-tools-993e4915516e773859e9947e9fe815f08a25ed5a.tar.gz |
chore: Fix section numbers in 2.2 data model
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Diffstat (limited to 'spdx/v2_2')
-rw-r--r-- | spdx/v2_2/annotation.go | 10 | ||||
-rw-r--r-- | spdx/v2_2/creation_info.go | 8 | ||||
-rw-r--r-- | spdx/v2_2/document.go | 16 | ||||
-rw-r--r-- | spdx/v2_2/file.go | 36 | ||||
-rw-r--r-- | spdx/v2_2/other_license.go | 10 | ||||
-rw-r--r-- | spdx/v2_2/package.go | 50 | ||||
-rw-r--r-- | spdx/v2_2/relationship.go | 6 | ||||
-rw-r--r-- | spdx/v2_2/review.go | 6 | ||||
-rw-r--r-- | spdx/v2_2/snippet.go | 18 |
9 files changed, 80 insertions, 80 deletions
diff --git a/spdx/v2_2/annotation.go b/spdx/v2_2/annotation.go index f2d5bc8..35eddc6 100644 --- a/spdx/v2_2/annotation.go +++ b/spdx/v2_2/annotation.go @@ -6,24 +6,24 @@ import "github.com/spdx/tools-golang/spdx/common" // Annotation is an Annotation section of an SPDX Document for version 2.2 of the spec. type Annotation struct { - // 8.1: Annotator + // 12.1: Annotator // Cardinality: conditional (mandatory, one) if there is an Annotation Annotator common.Annotator `json:"annotator"` - // 8.2: Annotation Date: YYYY-MM-DDThh:mm:ssZ + // 12.2: Annotation Date: YYYY-MM-DDThh:mm:ssZ // Cardinality: conditional (mandatory, one) if there is an Annotation AnnotationDate string `json:"annotationDate"` - // 8.3: Annotation Type: "REVIEW" or "OTHER" + // 12.3: Annotation Type: "REVIEW" or "OTHER" // Cardinality: conditional (mandatory, one) if there is an Annotation AnnotationType string `json:"annotationType"` - // 8.4: SPDX Identifier Reference + // 12.4: SPDX Identifier Reference // Cardinality: conditional (mandatory, one) if there is an Annotation // This field is not used in hierarchical data formats where the referenced element is clear, such as JSON or YAML. AnnotationSPDXIdentifier common.DocElementID `json:"-"` - // 8.5: Annotation Comment + // 12.5: Annotation Comment // Cardinality: conditional (mandatory, one) if there is an Annotation AnnotationComment string `json:"comment"` } diff --git a/spdx/v2_2/creation_info.go b/spdx/v2_2/creation_info.go index b68dade..d56d9a5 100644 --- a/spdx/v2_2/creation_info.go +++ b/spdx/v2_2/creation_info.go @@ -7,20 +7,20 @@ import "github.com/spdx/tools-golang/spdx/common" // CreationInfo is a Document Creation Information section of an // SPDX Document for version 2.2 of the spec. type CreationInfo struct { - // 2.7: License List Version + // 6.7: License List Version // Cardinality: optional, one LicenseListVersion string `json:"licenseListVersion"` - // 2.8: Creators: may have multiple keys for Person, Organization + // 6.8: Creators: may have multiple keys for Person, Organization // and/or Tool // Cardinality: mandatory, one or many Creators []common.Creator `json:"creators"` - // 2.9: Created: data format YYYY-MM-DDThh:mm:ssZ + // 6.9: Created: data format YYYY-MM-DDThh:mm:ssZ // Cardinality: mandatory, one Created string `json:"created"` - // 2.10: Creator Comment + // 6.10: Creator Comment // Cardinality: optional, one CreatorComment string `json:"comment"` } diff --git a/spdx/v2_2/document.go b/spdx/v2_2/document.go index d239194..d4d4e50 100644 --- a/spdx/v2_2/document.go +++ b/spdx/v2_2/document.go @@ -6,7 +6,7 @@ package v2_2 import "github.com/spdx/tools-golang/spdx/common" // ExternalDocumentRef is a reference to an external SPDX document -// as defined in section 2.6 for version 2.2 of the spec. +// as defined in section 6.6 for version 2.2 of the spec. type ExternalDocumentRef struct { // DocumentRefID is the ID string defined in the start of the // reference. It should _not_ contain the "DocumentRef-" part @@ -23,32 +23,32 @@ type ExternalDocumentRef struct { // Document is an SPDX Document for version 2.2 of the spec. // See https://spdx.github.io/spdx-spec/v2-draft/ (DRAFT) type Document struct { - // 2.1: SPDX Version; should be in the format "SPDX-2.2" + // 6.1: SPDX Version; should be in the format "SPDX-2.2" // Cardinality: mandatory, one SPDXVersion string `json:"spdxVersion"` - // 2.2: Data License; should be "CC0-1.0" + // 6.2: Data License; should be "CC0-1.0" // Cardinality: mandatory, one DataLicense string `json:"dataLicense"` - // 2.3: SPDX Identifier; should be "DOCUMENT" to represent + // 6.3: SPDX Identifier; should be "DOCUMENT" to represent // mandatory identifier of SPDXRef-DOCUMENT // Cardinality: mandatory, one SPDXIdentifier common.ElementID `json:"SPDXID"` - // 2.4: Document Name + // 6.4: Document Name // Cardinality: mandatory, one DocumentName string `json:"name"` - // 2.5: Document Namespace + // 6.5: Document Namespace // Cardinality: mandatory, one DocumentNamespace string `json:"documentNamespace"` - // 2.6: External Document References + // 6.6: External Document References // Cardinality: optional, one or many ExternalDocumentReferences []ExternalDocumentRef `json:"externalDocumentRefs,omitempty"` - // 2.11: Document Comment + // 6.11: Document Comment // Cardinality: optional, one DocumentComment string `json:"comment,omitempty"` diff --git a/spdx/v2_2/file.go b/spdx/v2_2/file.go index 43c2608..150e79f 100644 --- a/spdx/v2_2/file.go +++ b/spdx/v2_2/file.go @@ -6,61 +6,61 @@ import "github.com/spdx/tools-golang/spdx/common" // File is a File section of an SPDX Document for version 2.2 of the spec. type File struct { - // 4.1: File Name + // 8.1: File Name // Cardinality: mandatory, one FileName string `json:"fileName"` - // 4.2: File SPDX Identifier: "SPDXRef-[idstring]" + // 8.2: File SPDX Identifier: "SPDXRef-[idstring]" // Cardinality: mandatory, one FileSPDXIdentifier common.ElementID `json:"SPDXID"` - // 4.3: File Types + // 8.3: File Types // Cardinality: optional, multiple FileTypes []string `json:"fileTypes,omitempty"` - // 4.4: File Checksum: may have keys for SHA1, SHA256 and/or MD5 + // 8.4: File Checksum: may have keys for SHA1, SHA256 and/or MD5 // Cardinality: mandatory, one SHA1, others may be optionally provided Checksums []common.Checksum `json:"checksums"` - // 4.5: Concluded License: SPDX License Expression, "NONE" or "NOASSERTION" + // 8.5: Concluded License: SPDX License Expression, "NONE" or "NOASSERTION" // Cardinality: mandatory, one LicenseConcluded string `json:"licenseConcluded"` - // 4.6: License Information in File: SPDX License Expression, "NONE" or "NOASSERTION" + // 8.6: License Information in File: SPDX License Expression, "NONE" or "NOASSERTION" // Cardinality: mandatory, one or many LicenseInfoInFiles []string `json:"licenseInfoInFiles"` - // 4.7: Comments on License + // 8.7: Comments on License // Cardinality: optional, one LicenseComments string `json:"licenseComments,omitempty"` - // 4.8: Copyright Text: copyright notice(s) text, "NONE" or "NOASSERTION" + // 8.8: Copyright Text: copyright notice(s) text, "NONE" or "NOASSERTION" // Cardinality: mandatory, one FileCopyrightText string `json:"copyrightText"` // DEPRECATED in version 2.1 of spec - // 4.9-4.11: Artifact of Project variables (defined below) + // 8.9-8.11: Artifact of Project variables (defined below) // Cardinality: optional, one or many ArtifactOfProjects []*ArtifactOfProject `json:"-"` - // 4.12: File Comment + // 8.12: File Comment // Cardinality: optional, one FileComment string `json:"comment,omitempty"` - // 4.13: File Notice + // 8.13: File Notice // Cardinality: optional, one FileNotice string `json:"noticeText,omitempty"` - // 4.14: File Contributor + // 8.14: File Contributor // Cardinality: optional, one or many FileContributors []string `json:"fileContributors,omitempty"` - // 4.15: File Attribution Text + // 8.15: File Attribution Text // Cardinality: optional, one or many FileAttributionTexts []string `json:"attributionTexts,omitempty"` // DEPRECATED in version 2.0 of spec - // 4.16: File Dependencies + // 8.16: File Dependencies // Cardinality: optional, one or many FileDependencies []string `json:"-"` @@ -74,21 +74,21 @@ type File struct { } // ArtifactOfProject is a DEPRECATED collection of data regarding -// a Package, as defined in sections 4.9-4.11 in version 2.2 of the spec. +// a Package, as defined in sections 8.9-8.11 in version 2.2 of the spec. type ArtifactOfProject struct { // DEPRECATED in version 2.1 of spec - // 4.9: Artifact of Project Name + // 8.9: Artifact of Project Name // Cardinality: conditional, required if present, one per AOP Name string // DEPRECATED in version 2.1 of spec - // 4.10: Artifact of Project Homepage: URL or "UNKNOWN" + // 8.10: Artifact of Project Homepage: URL or "UNKNOWN" // Cardinality: optional, one per AOP HomePage string // DEPRECATED in version 2.1 of spec - // 4.11: Artifact of Project Uniform Resource Identifier + // 8.11: Artifact of Project Uniform Resource Identifier // Cardinality: optional, one per AOP URI string } diff --git a/spdx/v2_2/other_license.go b/spdx/v2_2/other_license.go index 1580169..1eaf048 100644 --- a/spdx/v2_2/other_license.go +++ b/spdx/v2_2/other_license.go @@ -5,27 +5,27 @@ package v2_2 // OtherLicense is an Other License Information section of an // SPDX Document for version 2.2 of the spec. type OtherLicense struct { - // 6.1: License Identifier: "LicenseRef-[idstring]" + // 10.1: License Identifier: "LicenseRef-[idstring]" // Cardinality: conditional (mandatory, one) if license is not // on SPDX License List LicenseIdentifier string `json:"licenseId"` - // 6.2: Extracted Text + // 10.2: Extracted Text // Cardinality: conditional (mandatory, one) if there is a // License Identifier assigned ExtractedText string `json:"extractedText"` - // 6.3: License Name: single line of text or "NOASSERTION" + // 10.3: License Name: single line of text or "NOASSERTION" // Cardinality: conditional (mandatory, one) if license is not // on SPDX License List LicenseName string `json:"name,omitempty"` - // 6.4: License Cross Reference + // 10.4: License Cross Reference // Cardinality: conditional (optional, one or many) if license // is not on SPDX License List LicenseCrossReferences []string `json:"seeAlsos,omitempty"` - // 6.5: License Comment + // 10.5: License Comment // Cardinality: optional, one LicenseComment string `json:"comment,omitempty"` } diff --git a/spdx/v2_2/package.go b/spdx/v2_2/package.go index f8eff78..2ca4cb1 100644 --- a/spdx/v2_2/package.go +++ b/spdx/v2_2/package.go @@ -11,99 +11,99 @@ type Package struct { // e.g. included directly in the Document without being in a Package? IsUnpackaged bool - // 3.1: Package Name + // 7.1: Package Name // Cardinality: mandatory, one PackageName string `json:"name"` - // 3.2: Package SPDX Identifier: "SPDXRef-[idstring]" + // 7.2: Package SPDX Identifier: "SPDXRef-[idstring]" // Cardinality: mandatory, one PackageSPDXIdentifier common.ElementID `json:"SPDXID"` - // 3.3: Package Version + // 7.3: Package Version // Cardinality: optional, one PackageVersion string `json:"versionInfo,omitempty"` - // 3.4: Package File Name + // 7.4: Package File Name // Cardinality: optional, one PackageFileName string `json:"packageFileName,omitempty"` - // 3.5: Package Supplier: may have single result for either Person or Organization, + // 7.5: Package Supplier: may have single result for either Person or Organization, // or NOASSERTION // Cardinality: optional, one PackageSupplier *common.Supplier `json:"supplier,omitempty"` - // 3.6: Package Originator: may have single result for either Person or Organization, + // 7.6: Package Originator: may have single result for either Person or Organization, // or NOASSERTION // Cardinality: optional, one PackageOriginator *common.Originator `json:"originator,omitempty"` - // 3.7: Package Download Location + // 7.7: Package Download Location // Cardinality: mandatory, one PackageDownloadLocation string `json:"downloadLocation"` - // 3.8: FilesAnalyzed + // 7.8: FilesAnalyzed // Cardinality: optional, one; default value is "true" if omitted FilesAnalyzed bool `json:"filesAnalyzed,omitempty"` // NOT PART OF SPEC: did FilesAnalyzed tag appear? IsFilesAnalyzedTagPresent bool - // 3.9: Package Verification Code + // 7.9: Package Verification Code PackageVerificationCode common.PackageVerificationCode `json:"packageVerificationCode"` - // 3.10: Package Checksum: may have keys for SHA1, SHA256 and/or MD5 + // 7.10: Package Checksum: may have keys for SHA1, SHA256 and/or MD5 // Cardinality: optional, one or many PackageChecksums []common.Checksum `json:"checksums"` - // 3.11: Package Home Page + // 7.11: Package Home Page // Cardinality: optional, one PackageHomePage string `json:"homepage,omitempty"` - // 3.12: Source Information + // 7.12: Source Information // Cardinality: optional, one PackageSourceInfo string `json:"sourceInfo,omitempty"` - // 3.13: Concluded License: SPDX License Expression, "NONE" or "NOASSERTION" + // 7.13: Concluded License: SPDX License Expression, "NONE" or "NOASSERTION" // Cardinality: mandatory, one PackageLicenseConcluded string `json:"licenseConcluded"` - // 3.14: All Licenses Info from Files: SPDX License Expression, "NONE" or "NOASSERTION" + // 7.14: All Licenses Info from Files: SPDX License Expression, "NONE" or "NOASSERTION" // Cardinality: mandatory, one or many if filesAnalyzed is true / omitted; // zero (must be omitted) if filesAnalyzed is false PackageLicenseInfoFromFiles []string `json:"licenseInfoFromFiles"` - // 3.15: Declared License: SPDX License Expression, "NONE" or "NOASSERTION" + // 7.15: Declared License: SPDX License Expression, "NONE" or "NOASSERTION" // Cardinality: mandatory, one PackageLicenseDeclared string `json:"licenseDeclared"` - // 3.16: Comments on License + // 7.16: Comments on License // Cardinality: optional, one PackageLicenseComments string `json:"licenseComments,omitempty"` - // 3.17: Copyright Text: copyright notice(s) text, "NONE" or "NOASSERTION" + // 7.17: Copyright Text: copyright notice(s) text, "NONE" or "NOASSERTION" // Cardinality: mandatory, one PackageCopyrightText string `json:"copyrightText"` - // 3.18: Package Summary Description + // 7.18: Package Summary Description // Cardinality: optional, one PackageSummary string `json:"summary,omitempty"` - // 3.19: Package Detailed Description + // 7.19: Package Detailed Description // Cardinality: optional, one PackageDescription string `json:"description,omitempty"` - // 3.20: Package Comment + // 7.20: Package Comment // Cardinality: optional, one PackageComment string `json:"comment,omitempty"` - // 3.21: Package External Reference + // 7.21: Package External Reference // Cardinality: optional, one or many PackageExternalReferences []*PackageExternalReference `json:"externalRefs,omitempty"` - // 3.22: Package External Reference Comment + // 7.22: Package External Reference Comment // Cardinality: conditional (optional, one) for each External Reference // contained within PackageExternalReference2_1 struct, if present - // 3.23: Package Attribution Text + // 7.23: Package Attribution Text // Cardinality: optional, one or many PackageAttributionTexts []string `json:"attributionTexts,omitempty"` @@ -114,7 +114,7 @@ type Package struct { } // PackageExternalReference is an External Reference to additional info -// about a Package, as defined in section 3.21 in version 2.2 of the spec. +// about a Package, as defined in section 7.21 in version 2.2 of the spec. type PackageExternalReference struct { // category is "SECURITY", "PACKAGE-MANAGER" or "OTHER" Category string `json:"referenceCategory"` @@ -127,7 +127,7 @@ type PackageExternalReference struct { // info, metadata or content within the target location Locator string `json:"referenceLocator"` - // 3.22: Package External Reference Comment + // 7.22: Package External Reference Comment // Cardinality: conditional (optional, one) for each External Reference ExternalRefComment string `json:"comment"` } diff --git a/spdx/v2_2/relationship.go b/spdx/v2_2/relationship.go index 6b44898..a93baa7 100644 --- a/spdx/v2_2/relationship.go +++ b/spdx/v2_2/relationship.go @@ -8,16 +8,16 @@ import "github.com/spdx/tools-golang/spdx/common" // version 2.2 of the spec. type Relationship struct { - // 7.1: Relationship + // 11.1: Relationship // Cardinality: optional, one or more; one per Relationship // one mandatory for SPDX Document with multiple packages // RefA and RefB are first and second item - // Relationship is type from 7.1.1 + // Relationship is type from 11.1.1 RefA common.DocElementID `json:"spdxElementId"` RefB common.DocElementID `json:"relatedSpdxElement"` Relationship string `json:"relationshipType"` - // 7.2: Relationship Comment + // 11.2: Relationship Comment // Cardinality: optional, one RelationshipComment string `json:"comment,omitempty"` } diff --git a/spdx/v2_2/review.go b/spdx/v2_2/review.go index 4cc7c42..22b3b8a 100644 --- a/spdx/v2_2/review.go +++ b/spdx/v2_2/review.go @@ -7,19 +7,19 @@ package v2_2 type Review struct { // DEPRECATED in version 2.0 of spec - // 9.1: Reviewer + // 13.1: Reviewer // Cardinality: optional, one Reviewer string // including AnnotatorType: one of "Person", "Organization" or "Tool" ReviewerType string // DEPRECATED in version 2.0 of spec - // 9.2: Review Date: YYYY-MM-DDThh:mm:ssZ + // 13.2: Review Date: YYYY-MM-DDThh:mm:ssZ // Cardinality: conditional (mandatory, one) if there is a Reviewer ReviewDate string // DEPRECATED in version 2.0 of spec - // 9.3: Review Comment + // 13.3: Review Comment // Cardinality: optional, one ReviewComment string } diff --git a/spdx/v2_2/snippet.go b/spdx/v2_2/snippet.go index 913007a..61045f1 100644 --- a/spdx/v2_2/snippet.go +++ b/spdx/v2_2/snippet.go @@ -7,42 +7,42 @@ import "github.com/spdx/tools-golang/spdx/common" // Snippet is a Snippet section of an SPDX Document for version 2.2 of the spec. type Snippet struct { - // 5.1: Snippet SPDX Identifier: "SPDXRef-[idstring]" + // 9.1: Snippet SPDX Identifier: "SPDXRef-[idstring]" // Cardinality: mandatory, one SnippetSPDXIdentifier common.ElementID `json:"SPDXID"` - // 5.2: Snippet from File SPDX Identifier + // 9.2: Snippet from File SPDX Identifier // Cardinality: mandatory, one SnippetFromFileSPDXIdentifier common.ElementID `json:"snippetFromFile"` // Ranges denotes the start/end byte offsets or line numbers that the snippet is relevant to Ranges []common.SnippetRange `json:"ranges"` - // 5.5: Snippet Concluded License: SPDX License Expression, "NONE" or "NOASSERTION" + // 9.5: Snippet Concluded License: SPDX License Expression, "NONE" or "NOASSERTION" // Cardinality: mandatory, one SnippetLicenseConcluded string `json:"licenseConcluded"` - // 5.6: License Information in Snippet: SPDX License Expression, "NONE" or "NOASSERTION" + // 9.6: License Information in Snippet: SPDX License Expression, "NONE" or "NOASSERTION" // Cardinality: optional, one or many LicenseInfoInSnippet []string `json:"licenseInfoInSnippets,omitempty"` - // 5.7: Snippet Comments on License + // 9.7: Snippet Comments on License // Cardinality: optional, one SnippetLicenseComments string `json:"licenseComments,omitempty"` - // 5.8: Snippet Copyright Text: copyright notice(s) text, "NONE" or "NOASSERTION" + // 9.8: Snippet Copyright Text: copyright notice(s) text, "NONE" or "NOASSERTION" // Cardinality: mandatory, one SnippetCopyrightText string `json:"copyrightText"` - // 5.9: Snippet Comment + // 9.9: Snippet Comment // Cardinality: optional, one SnippetComment string `json:"comment,omitempty"` - // 5.10: Snippet Name + // 9.10: Snippet Name // Cardinality: optional, one SnippetName string `json:"name,omitempty"` - // 5.11: Snippet Attribution Text + // 9.11: Snippet Attribution Text // Cardinality: optional, one or many SnippetAttributionTexts []string `json:"-"` } |