diff --git a/backend/internal/license/license_detector.go b/backend/internal/license/license_detector.go index de9117c7..431adbd6 100644 --- a/backend/internal/license/license_detector.go +++ b/backend/internal/license/license_detector.go @@ -96,14 +96,19 @@ func (l List) String() string { // swagger:model License type License struct { // SPDX is the SPDX identifier for the license. + // required: true SPDX string `json:"spdx"` // Confidence indicates how accurate the license detection is. + // required: true Confidence float32 `json:"confidence"` // IsCompatible signals if the license is compatible with the OpenTofu project. + // required: true IsCompatible bool `json:"is_compatible"` // File holds the file in the repository where the license was detected. + // required: true File string `json:"file"` // Link may contain a link to the license file for humans to view. This may be empty. + // required: false Link string `json:"link,omitempty"` } diff --git a/backend/internal/server/openapi.yml b/backend/internal/server/openapi.yml index e616c371..15acd536 100644 --- a/backend/internal/server/openapi.yml +++ b/backend/internal/server/openapi.yml @@ -1,8 +1,8 @@ definitions: Addr: description: |- - Addr describes a module address combination of NAMESPACE-NAME-TARGETSYSTEM. This will translate to - github.com/NAMESPACE/terraform-TARGETSYSTEM-NAME for now. + Addr represents a full provider address (NAMESPACE/NAME). It currently translates to + github.com/NAMESPACE/terraform-provider-NAME . type: object BaseDetails: properties: @@ -112,6 +112,11 @@ definitions: spdx: description: SPDX is the SPDX identifier for the license. type: string + required: + - spdx + - confidence + - is_compatible + - file title: License describes a license found in a repository. type: object LicenseList: