mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-04 16:20:06 -04:00
New table to store the inbound api information for a service. The table is versioned.
There is a new endpoint to create the inbound api and one to update it.
This commit is contained in:
@@ -53,12 +53,20 @@ def build_error_message(errors):
|
||||
fields.append({"error": "ValidationError", "message": field})
|
||||
message = {
|
||||
"status_code": 400,
|
||||
"errors": fields
|
||||
"errors": unique_errors(fields)
|
||||
}
|
||||
|
||||
return json.dumps(message)
|
||||
|
||||
|
||||
def unique_errors(dups):
|
||||
unique = []
|
||||
for x in dups:
|
||||
if x not in unique:
|
||||
unique.append(x)
|
||||
return unique
|
||||
|
||||
|
||||
def __format_message(e):
|
||||
def get_path(e):
|
||||
error_path = None
|
||||
|
||||
@@ -18,3 +18,13 @@ personalisation = {
|
||||
"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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user