Skip to content

Commit 0ae70e4

Browse files
bkimminicharkid15r
andauthored
Extend license, community, and social_media enums (#599)
* Extend license, community, and social_media enums (to accomodate needs of OWASP Juice Shop; see OWASP/www-project-juice-shop#16 (comment)) * Make new enum entries known in test cases * Honor line length restrictions * Cut lines more strictly * Apply missing enum changes * Remove trailing comma * Update code --------- Co-authored-by: Arkadii Yakovets <[email protected]> Co-authored-by: Arkadii Yakovets <[email protected]>
1 parent 4628abf commit 0ae70e4

File tree

5 files changed

+18
-9
lines changed

5 files changed

+18
-9
lines changed

common.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
"enum": [
2222
"discord",
2323
"github-discussions",
24+
"matrix",
25+
"reddit",
2426
"slack"
2527
],
2628
"type": "string"
@@ -274,6 +276,7 @@
274276
"description": "The type of social media platform.",
275277
"enum": [
276278
"bluesky",
279+
"facebook",
277280
"linkedin",
278281
"mastodon",
279282
"x",

project.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"BSD-2-Clause",
119119
"BSD-3-Clause",
120120
"CC-BY-4.0",
121+
"CC-BY-NC-ND-4.0",
121122
"CC-BY-SA-4.0",
122123
"CC0-1.0",
123124
"EUPL-1.2",

tests/schema/common/community_test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@
1717
("name_undefined.yaml", "$: 'name' is a required property"),
1818
(
1919
"platform_empty.yaml",
20-
"$.platform: '' is not one of ['discord', 'github-discussions', 'slack']",
20+
"$.platform: '' is not one of ['discord', 'github-discussions', 'matrix', "
21+
"'reddit', 'slack']",
2122
),
2223
(
2324
"platform_invalid.yaml",
24-
"$.platform: 'telegram' is not one of ['discord', 'github-discussions', 'slack']",
25+
"$.platform: 'telegram' is not one of ['discord', 'github-discussions', 'matrix', "
26+
"'reddit', 'slack']",
2527
),
2628
(
2729
"platform_null.yaml",
28-
"$.platform: None is not one of ['discord', 'github-discussions', 'slack']",
30+
"$.platform: None is not one of ['discord', 'github-discussions', 'matrix', "
31+
"'reddit', 'slack']",
2932
),
3033
("platform_undefined.yaml", "$: 'platform' is a required property"),
3134
("url_empty.yaml", "$.url: '' is not a 'uri'"),

tests/schema/common/social_media_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@
1414
("description_null.yaml", "$.description: None is not of type 'string'"),
1515
(
1616
"platform_empty.yaml",
17-
"$.platform: '' is not one of ['bluesky', 'linkedin', 'mastodon', 'x', 'youtube']",
17+
"$.platform: '' is not one of ['bluesky', 'facebook', 'linkedin', 'mastodon', 'x', "
18+
"'youtube']",
1819
),
1920
(
2021
"platform_invalid.yaml",
21-
"$.platform: 'bitcoin' is not one of ['bluesky', 'linkedin', 'mastodon', 'x', "
22-
"'youtube']",
22+
"$.platform: 'bitcoin' is not one of ['bluesky', 'facebook', 'linkedin', 'mastodon', "
23+
"'x', 'youtube']",
2324
),
2425
(
2526
"platform_null.yaml",
26-
"$.platform: None is not one of ['bluesky', 'linkedin', 'mastodon', 'x', 'youtube']",
27+
"$.platform: None is not one of ['bluesky', 'facebook', 'linkedin', 'mastodon', "
28+
"'x', 'youtube']",
2729
),
2830
("platform_undefined.yaml", "$: 'platform' is a required property"),
2931
("url_empty.yaml", "$.url: '' is not a 'uri'"),

tests/schema/project_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
"license_invalid.yaml",
8686
"$.license[0]: 'INVALID-LICENSE-VALUE' is not one of ['AGPL-3.0', "
8787
"'Apache License 2.0', 'Apache-2.0', 'BSD-2-Clause', 'BSD-3-Clause', "
88-
"'CC-BY-4.0', 'CC-BY-SA-4.0', 'CC0-1.0', 'EUPL-1.2', 'GPL-2.0', 'GPL-3.0', "
89-
"'LGPL-2.1', 'LGPL-3.0', 'MIT', 'MPL-2.0', 'OTHER']",
88+
"'CC-BY-4.0', 'CC-BY-NC-ND-4.0', 'CC-BY-SA-4.0', 'CC0-1.0', 'EUPL-1.2', "
89+
"'GPL-2.0', 'GPL-3.0', 'LGPL-2.1', 'LGPL-3.0', 'MIT', 'MPL-2.0', 'OTHER']",
9090
),
9191
("logo_empty.yaml", "$.logo: [] should be non-empty"),
9292
("logo_null.yaml", "$.logo: None is not of type 'array'"),

0 commit comments

Comments
 (0)