diff --git a/buf/registry/module/v1/commit.proto b/buf/registry/module/v1/commit.proto index d298a36..646c68f 100644 --- a/buf/registry/module/v1/commit.proto +++ b/buf/registry/module/v1/commit.proto @@ -75,4 +75,14 @@ message Commit { (buf.validate.field).string.max_len = 255, (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED ]; + // The SPDX License Identifier of the Commit. + // + // May be empty if the SPDX License Identifier was not explicitly set during upload, if the + // license file was not present, or if it was not possible to detect the SPDX License Identifier + // from the license file. + string spdx_license_id = 8 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$", + (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + ]; } diff --git a/buf/registry/module/v1/upload_service.proto b/buf/registry/module/v1/upload_service.proto index 13ac585..e21f567 100644 --- a/buf/registry/module/v1/upload_service.proto +++ b/buf/registry/module/v1/upload_service.proto @@ -61,6 +61,13 @@ message UploadRequest { (buf.validate.field).string.max_len = 255, (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED ]; + // The SPDX License Identifier. If this field is not set, the SPDX License Identifier will be + // detected from the license file, if present. + string spdx_license_id = 5 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$", + (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + ]; } // The Contents of all references. repeated Content contents = 1 [(buf.validate.field).repeated.min_items = 1]; diff --git a/buf/registry/module/v1beta1/commit.proto b/buf/registry/module/v1beta1/commit.proto index 5a8e6d2..2a2d627 100644 --- a/buf/registry/module/v1beta1/commit.proto +++ b/buf/registry/module/v1beta1/commit.proto @@ -75,4 +75,14 @@ message Commit { (buf.validate.field).string.max_len = 255, (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED ]; + // The SPDX License Identifier of the Commit. + // + // May be empty if the SPDX License Identifier was not explicitly set during upload, if the + // license file was not present, or if it was not possible to detect the SPDX License Identifier + // from the license file. + string spdx_license_id = 8 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$", + (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + ]; } diff --git a/buf/registry/module/v1beta1/upload_service.proto b/buf/registry/module/v1beta1/upload_service.proto index 2333365..b2f5549 100644 --- a/buf/registry/module/v1beta1/upload_service.proto +++ b/buf/registry/module/v1beta1/upload_service.proto @@ -74,6 +74,13 @@ message UploadRequest { (buf.validate.field).string.max_len = 255, (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED ]; + // The SPDX License Identifier. If this field is not set, the SPDX License Identifier will be + // detected from the license file, if present. + string spdx_license_id = 5 [ + (buf.validate.field).string.min_len = 1, + (buf.validate.field).string.pattern = "^[a-zA-Z0-9-.+]+$", + (buf.validate.field).ignore = IGNORE_IF_UNPOPULATED + ]; } // The Contents of all references. repeated Content contents = 1 [(buf.validate.field).repeated.min_items = 1];