From c47308019d6627daadb55e581bbce4c3de4aeff7 Mon Sep 17 00:00:00 2001 From: SolarFactories Date: Sun, 10 May 2026 14:03:02 +0100 Subject: [PATCH 1/2] Fix license struct json tags to refer to json attribute names, rather than API's Java Class field names. Signed-off-by: SolarFactories --- license.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/license.go b/license.go index 9309dca..231ef94 100644 --- a/license.go +++ b/license.go @@ -10,15 +10,16 @@ import ( type License struct { UUID uuid.UUID `json:"uuid"` Name string `json:"name"` - Text string `json:"text"` - Template string `json:"template"` - Header string `json:"header"` - Comment string `json:"comment"` + Text string `json:"licenseText,omitempty"` + Template string `json:"standardLicenseTemplate,omitempty"` + Header string `json:"standardLicenseHeader,omitempty"` + Comment string `json:"licenseComments,omitempty"` LicenseID string `json:"licenseId"` OSIApproved bool `json:"isOsiApproved"` FSFLibre bool `json:"isFsfLibre"` DeprecatedLicenseID bool `json:"isDeprecatedLicenseId"` - SeeAlso []string `json:"seeAlso"` + IsCustomLicense bool `json:"isCustomLicense"` + SeeAlso []string `json:"seeAlso,omitempty"` } type LicenseService struct { From d84648fe0c9a2cca0d9376b2332297039d74eab7 Mon Sep 17 00:00:00 2001 From: SolarFactories Date: Sun, 10 May 2026 14:19:55 +0100 Subject: [PATCH 2/2] Remove addition of License.IsCustomLicense, since was added in 4.7.0. Signed-off-by: SolarFactories --- license.go | 1 - 1 file changed, 1 deletion(-) diff --git a/license.go b/license.go index 231ef94..4d3a9e3 100644 --- a/license.go +++ b/license.go @@ -18,7 +18,6 @@ type License struct { OSIApproved bool `json:"isOsiApproved"` FSFLibre bool `json:"isFsfLibre"` DeprecatedLicenseID bool `json:"isDeprecatedLicenseId"` - IsCustomLicense bool `json:"isCustomLicense"` SeeAlso []string `json:"seeAlso,omitempty"` }