update how to validate URLs + don't accept non-HTTPS ones

This commit is contained in:
Frédéric Harper
2024-05-01 14:03:00 -04:00
parent 6bc105b90e
commit 14536f8aa8

View File

@@ -48,23 +48,28 @@
},
"website": {
"description": "Website URL",
"$ref": "#/definitions/validURL"
"type": "string",
"pattern": "(^https://)|(^$)"
},
"linkedin": {
"description": "LinkedIn profile URL",
"$ref": "#/definitions/validURL"
"type": "string",
"pattern": "(^https://)|(^$)"
},
"twitter": {
"description": "Twitter account URL",
"$ref": "#/definitions/validURL"
"type": "string",
"pattern": "(^https://)|(^$)"
},
"mastodon": {
"description": "Mastodon account URL",
"$ref": "#/definitions/validURL"
"type": "string",
"pattern": "(^https://)|(^$)"
},
"scheduling": {
"description": "Scheduling platform URL or mailto link",
"$ref": "#/definitions/validScheduling"
"type": "string",
"pattern": "(^https://)|(^mailto:)"
},
"online-only": {
"description": "Whether you are open to in-person Coffee Chat (default: false)",
@@ -92,15 +97,5 @@
],
"additionalProperties": false
}
},
"definitions": {
"validURL": {
"type": "string",
"pattern": "(^https?://)|(^$)"
},
"validScheduling": {
"type": "string",
"pattern": "(^https?://)|(^mailto:)"
}
}
}