Skip to content

Commit

Permalink
Merge pull request #167 from opentofu/license-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Yantrio authored Sep 4, 2024
2 parents 23a6f3c + 9294052 commit 8d4beb7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions backend/internal/license/license_detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down
9 changes: 7 additions & 2 deletions backend/internal/server/openapi.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 8d4beb7

Please sign in to comment.