From 0e0e6e670ddef06a318f69fb816ec37ad86a17f7 Mon Sep 17 00:00:00 2001 From: Frank Kilcommins Date: Tue, 24 Oct 2023 10:35:51 +0100 Subject: [PATCH] Add validation-error type --- src/pages/index.astro | 7 ++++++- src/pages/validation-error.md | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/pages/validation-error.md diff --git a/src/pages/index.astro b/src/pages/index.astro index e85a4fc..5fff2a3 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -58,7 +58,12 @@ import Card from '../components/Card.astro'; href="./invalid-request-parameter-value" title="Invalid Request Parameter Value" body="One or more of the query or path parameter values are invalid ⚠️" - /> + /> + **Note** A problem is generally **not** meant to be used for end-user input validation, but for client developer convenience. + +**Example of an `validation-error` problem details:** + +```json +{ + "type": "https://problems-registry.smartbear.com/validation-error", + "title": "Validation Error", + "detail": "The request is not valid.", + "status": 422, + "code": "422-02", + "errors": [ + { + "detail": "Your request does not contain the required property {name}", + "pointer": "#/name" + }, + { + "detail": "the path parameter does not conform to the expect format", + "parameter": "petId" + } + ] +} +```