Files
notifications-api/app/schema_validation/definitions.py
Chris Hill-Scott 7032bac178 Start allowing any three lines in addresses
This is part of moving away from `postcode` and towards `address line 7`

We think it will be easier for people to map their existing data to our
API if we let them fill in any 3 lines, instead of requiring at least
1, 2, and postcode specifically.
2020-04-09 18:19:53 +01:00

38 lines
1.1 KiB
Python

"""
Definitions are intended for schema definitions that are not likely to change from version to version.
If the definition is specific to a version put it in a definition file in the version package
"""
uuid = {
"type": "string",
"format": "validate_uuid",
"validationMessage": "is not a valid UUID",
"code": "1001", # yet to be implemented
"link": "link to our error documentation not yet implemented"
}
nullable_uuid = {
"type": ["string", "null"],
"format": "validate_uuid",
"validationMessage": "is not a valid UUID",
"code": "1001", # yet to be implemented
"link": "link to our error documentation not yet implemented"
}
personalisation = {
"type": "object",
"code": "1001", # yet to be implemented
"link": "link to our error documentation not yet implemented"
}
https_url = {
"type": "string",
"format": "uri",
"pattern": "^https.*",
"validationMessage": "is not a valid https url",
"code": "1001", # yet to be implemented
"link": "link to our error documentation not yet implemented"
}