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
Hi, I have a base json-schema file that I'm using to validate the response of a few APIs. The APIs all return the same format, but a few APIs return some extra fields that I would like to mark as "required" within the schema for validation. I don't want to duplicate the same json-schema twice just to mark a few fields as required for this small subset of APIs, so I would rather just load my base schema as-is, then add a line in my Java test code to add a few keys into the schema's required: field just for validating the small subset of APIs.
I know the JsonSchema object is thread-safe, so I assume it's been designed to be immutable. Is there an easy way to modify the required: field on a JsonSchema after it's been loaded? (Or otherwise create a clone within Java which would have a different required: list?)
The text was updated successfully, but these errors were encountered:
Hi, I have a base json-schema file that I'm using to validate the response of a few APIs. The APIs all return the same format, but a few APIs return some extra fields that I would like to mark as "required" within the schema for validation. I don't want to duplicate the same json-schema twice just to mark a few fields as required for this small subset of APIs, so I would rather just load my base schema as-is, then add a line in my Java test code to add a few keys into the schema's
required:
field just for validating the small subset of APIs.I know the JsonSchema object is thread-safe, so I assume it's been designed to be immutable. Is there an easy way to modify the
required:
field on a JsonSchema after it's been loaded? (Or otherwise create a clone within Java which would have a differentrequired:
list?)The text was updated successfully, but these errors were encountered: