You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently validating an xml file via /validate returns a 200 response whether the file is valid or not. However, upon changes done in #630, it was determined that reformatting the response according to JSON Problem specification (https://www.rfc-editor.org/rfc/rfc7807) when the file is in fact invalid. This will require changes in the front-end as well.
DoD (Definition of Done)
The response after an invalid file gets POSTed to the /validate endpoint should instead look e.g. something like this:
{
"type": "",
"title": "Bad Request",
"detail": "Faulty XML file provided."
"validation-failures": [ {
"reason": "Mismatched tag on line 1.",
"position": "/ELEMENT_SET"
},
{
"reason": "something else",
"position": "/"}
]
"status": 400,
"instance": "/validate"
}
Testing
Unit and integration
The text was updated successfully, but these errors were encountered:
csc-jm
changed the title
Reformat Validate endpoint response
Reformat /validate endpoint response
Nov 1, 2022
Description
Currently validating an xml file via
/validate
returns a200
response whether the file is valid or not. However, upon changes done in #630, it was determined that reformatting the response according to JSON Problem specification (https://www.rfc-editor.org/rfc/rfc7807) when the file is in fact invalid. This will require changes in the front-end as well.DoD (Definition of Done)
The response after an invalid file gets POSTed to the
/validate
endpoint should instead look e.g. something like this:Testing
Unit and integration
The text was updated successfully, but these errors were encountered: