Api Gateway validation response don't include field names

0

Hi, I'm using request validation feature on the Rest Api Gateway and I would like each validation message to contain the name of the field that did not meet the model definition. Is it possible to achieve this on gateway side? I've configured 'Bad Request Body' -> 'Response templates' with following value: {"message": "$context.error.message", "validationString": "$context.error.validationErrorString"} And some of $context.error.validationErrorString values don't include a field name. For example i got response: "validationString": "[instance type (null) does not match any allowed primitive type (allowed: ["string"])]" And it isn't clear which filed has improper format.

Damian
gefragt vor einem Jahr41 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen