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 wi…
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 ar…
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…
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/ty…
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…