JSON Schema DRAFT_V4 validation failure

book

Article ID: 241346

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

JSON Schema validation assertion fails with an error :

"Unable to save: JSON Schema DRAFT_V4 chosen, but it does not agree with the specified '$schema' property. Please fix the uri for '$schema' to be the same version as DRAFT_V4 or remove the '$schema' property."

Environment

Release : 10.0

Component : JSON Schema Validation

Resolution

Please put your schema below as input and choose V4 version

https://www.jsonschemavalidator.net/

Use the resulting schema and compare if it changed things. In the JSON documentation, below:

https://json-schema.org/understanding-json-schema/structuring.html#id

It says "In Draft 4, $id is just id (without the dollar sign)." And You can set the base URI by using the $id keyword at the root of the schema. The value of $id is a URI-reference without a fragment that resolves against the Retrieval URI.

So replace "id" with "$id" in your schema document, add # at the end of the URI like below and it should work:

https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=urWg1pKHZNtSnguB+LoZAw==

Attachments