diff --git a/schema/chapter.json b/schema/chapter.json index 7413ac581..7553843ed 100644 --- a/schema/chapter.json +++ b/schema/chapter.json @@ -57,6 +57,11 @@ "minLength": 1, "type": "string" }, + "mailing_list": { + "description": "The optional mailing list associated with the chapter.", + "format": "uri", + "type": "string" + }, "name": { "description": "The unique name of the chapter.", "minLength": 10, diff --git a/schema/tests/chapter_test.py b/schema/tests/chapter_test.py index e2d0faf56..d23e40146 100644 --- a/schema/tests/chapter_test.py +++ b/schema/tests/chapter_test.py @@ -52,6 +52,9 @@ ("logo-null.yaml", "None is not of type 'array'"), ("meetup_group-empty.yaml", "'' should be non-empty"), ("meetup_group-null.yaml", "None is not of type 'string'"), + ("mailing-list-empty.yaml", "'' is not a 'uri'"), + ("mailing-list-invalid.yaml", "'https://xyz' is not a 'uri'"), + ("mailing-list-null.yaml", "None is not a 'uri'"), ("name-empty.yaml", "'' is too short"), ("name-null.yaml", "None is not of type 'string'"), ("name-undefined.yaml", "'name' is a required property"), diff --git a/schema/tests/data/chapter/negative/mailing-list-empty.yaml b/schema/tests/data/chapter/negative/mailing-list-empty.yaml new file mode 100644 index 000000000..778dd5138 --- /dev/null +++ b/schema/tests/data/chapter/negative/mailing-list-empty.yaml @@ -0,0 +1,12 @@ +leaders: + - github: leader-name-1 + name: Leader Name 1 + - github: leader-name-2 + name: Leader Name 2 +mailing_list: '' +name: Valid Chapter Name +tags: + - example-tag-1 + - example-tag-2 + - example-tag-3 +type: code diff --git a/schema/tests/data/chapter/negative/mailing-list-invalid.yaml b/schema/tests/data/chapter/negative/mailing-list-invalid.yaml new file mode 100644 index 000000000..7c7490061 --- /dev/null +++ b/schema/tests/data/chapter/negative/mailing-list-invalid.yaml @@ -0,0 +1,12 @@ +leaders: + - github: leader-name-1 + name: Leader Name 1 + - github: leader-name-2 + name: Leader Name 2 +mailing_list: https://xyz +name: Valid Chapter Name +tags: + - example-tag-1 + - example-tag-2 + - example-tag-3 +type: code diff --git a/schema/tests/data/chapter/negative/mailing-list-null.yaml b/schema/tests/data/chapter/negative/mailing-list-null.yaml new file mode 100644 index 000000000..fb07b6dc1 --- /dev/null +++ b/schema/tests/data/chapter/negative/mailing-list-null.yaml @@ -0,0 +1,12 @@ +leaders: + - github: leader-name-1 + name: Leader Name 1 + - github: leader-name-2 + name: Leader Name 2 +mailing_list: +name: Valid Chapter Name +tags: + - example-tag-1 + - example-tag-2 + - example-tag-3 +type: code