A SchemaException gets thrown saying the version could not be determined as the title says. The schema version is clearly in the schema. This is all before data validation. Any ideas why this error gets thrown? My schema is as follows: Answer The library doesn’t support draft 2020-12 and 2019-09. You will have to use draft 7 for now (or
Tag: jsonschema
Plugin jsonschema2pojo: Properties are shown as required but they should be optional
i have a personschema which has e.g. those two fields: Then I have another schema which extends the person schema. In this schema, I want those two properties (birthCountry and birthday) to be optional and only the name to be mandatory. I’ve tried it like that: But unfortunately, in the API-Docs they are still remarked as mandatory. Answer The issue
Java multi-schema generator using annotations
I have a series of inter-related Java classes which form a super-set of possible schema. I’m looking for some way to annotate/tag individual fields such that I can create separate JSON schema for each ‘namespace’. A simple example: Output would have separate Alice and Bob schema, where Alice has a and b, and Bob has b and c. My current
jsonschema and date type
I’m just getting started with jsonschema and an example under “Using jsonschema2pojo within your Java project (embedded)” in https://github.com/joelittlejohn/jsonschema2pojo/wiki/Getting-Started having in mind data types of jsonschema listed here https://developers.google.com/discovery/v1/type-format?hl=en my schema object can be described as unfortunately a generated Pojo object will be has a member “displayDate” of a type Object instead of expected Date. Why? Answer date is not
How to load JSON Schema file from java
My Project is a maven project and inside resources folder – src/main/resources folder I have a json schema file – “jsonschema.json ” package : src/main/resources file : jsonschema.json Now i want to validate my jsonobject with json schema How to load the schema.json file in to the code : Is the below line correct? Answer This may help you Place