3,562 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
0
answers
150
views
Using JsonSchema.Net to validate JSON when the JSON schema references other schemas
I'm trying to use the JsonSchema.Net library to validate JSON objects.
For example, I have these schemas: the main schema AddressChangedEvent.schema.json that references both EventHeader.schema.json ...
Best practices
1
vote
3
replies
229
views
Best Practice: use of allOf in OpenAPI specification
I'm currently in a Project designing/extending an API for a customer. At some points, the existing Definiton uses the allOf Keyword in the schemas to combine different Subschemas, e.g.:
"Foo"...
1
vote
1
answer
76
views
Python jsonschema validation always succeeds
I am trying to migrate an application away from jsonschema.RefResolver, due to these deprecation messages when testing:
jsonschema.RefResolver is deprecated
as of v4.18.0, in favor of the https://...
0
votes
1
answer
60
views
how to verify Confluent Kafka JsonSchema Serialized message?
I’m trying to verify whether messages produced using Confluent’s KafkaJsonSchemaSerializer are correctly serialized in the expected Confluent wire format (i.e. a "magic byte" followed by a 4-byte ...
1
vote
1
answer
56
views
JSON Schema - Have string value supplied to one property be a required property itself
I am creating a JSON schema that validates the "code" a user writes for the Turing Machine Simulator I am building. The "code" object looks like this:
{
"InitialState": ...
-1
votes
1
answer
81
views
JSON Schema, how do I reference different objects in an array?
I have the following objects:
Obj1, Obj2, Obj3 defined in a $defs-Section.
How can I 'say' in JSON Schema that an array consists of those objects as references. I surely cant have the same $ref-key ...
1
vote
1
answer
90
views
Python package upgrade with uv behaves as in old version
for an old project I have upgraded jsonschema. For a prototype project I have added jsonschema to check the new functionality with jsonschema Draft7Validators.
uv pip show jsonschema
shows in both ...
3
votes
0
answers
103
views
JSchemaValidatingReader - OOM when handling large tokens
We have encountered some memory issues when validating JSON.
We are using:
Newtensoft.Json v 13.0.3
Newtonsoft.Json.Schema 4.0.1
.NET 9.0.304
For validation we have this code:
var validationResult = ...
0
votes
2
answers
38
views
JSON Schema if, then conditional statement clarification
my schema rules:
Checking html select value make the AJV consider the select field required even I did not set it to be required
I need to check the select value without make it required.
export const ...
0
votes
0
answers
64
views
fastify ajv validation throw error on anyOf
I have a simple schema for data validation like below, when sending an array for packages with length 1 it throw an error for anyOf, and for more than one. it's ok and work currectly.
I've try to ...
1
vote
1
answer
79
views
JsonSchema.net doesnt contain errors when evaluating an invalid document against CycloneDX schema
I'm using nuget package JsonSchema.Net 7.3.4 in a .Net 8 application to validate a json document against the official CycloneDX 1.6 Json schema (https://cyclonedx.org/schema/bom-1.6.schema.json).
The ...
1
vote
1
answer
52
views
Optional properties unless an object includes them
I am trying to validate the following (I use YAML for my schema before converting to JSON) using jsonschema - I have an object vlans and it has two required properties: id and subnet, but I have an ...
-1
votes
1
answer
69
views
How can I exclude certain properties and keys from a self referential JSON Schema?
I have a schema like:
{
"$id": "http://example.com/names.json",
"type": "object",
"required": ["id", "name"],
"...
0
votes
1
answer
33
views
jsonschema if else statement
I want to validate the 'ValDefault' according to 'DataType' and write like below, but it does not work properly, please help me how to.
{
"DataType": {
"type": "...
0
votes
0
answers
81
views
Spring AI support of enumNames
Apparently Spring AI or rather schema generator itself does not support enumNames as part of enum schema. Please guide me if anyone was able to get it done.
Example of generated schema:
"...