Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
React Jsonschema Form | 13,031 | 566 | 299 | a day ago | 103 | December 16, 2019 | 268 | apache-2.0 | TypeScript | |
A React component for building Web forms from JSON Schema. | ||||||||||
Ajv | 12,800 | 801,606 | 11,186 | 6 days ago | 352 | January 03, 2023 | 289 | mit | TypeScript | |
The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927) | ||||||||||
Jsonschema2pojo | 6,041 | 115 | 46 | 7 days ago | 55 | February 18, 2023 | 189 | apache-2.0 | Java | |
Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc | ||||||||||
Json Editor | 5,376 | 141 | 36 | 5 years ago | 19 | August 07, 2016 | 461 | mit | JavaScript | |
JSON Schema Based Editor | ||||||||||
Resume Cli | 4,293 | 93 | 59 | 6 months ago | 107 | October 23, 2022 | 98 | mit | JavaScript | |
CLI tool to easily setup a new resume 📑 | ||||||||||
Jsonschema | 4,242 | 15,530 | 3,141 | 5 days ago | 97 | August 07, 2023 | 32 | mit | Python | |
An implementation of the JSON Schema specification for Python | ||||||||||
Mimesis | 4,048 | 42 | 27 | 4 days ago | 47 | August 06, 2023 | 7 | mit | Python | |
Mimesis is a powerful Python library that empowers developers to generate massive amounts of synthetic data efficiently. | ||||||||||
Json Schema | 3,445 | 8,501 | 488 | 19 days ago | 46 | April 13, 2022 | 93 | mit | PHP | |
PHP implementation of JSON schema. Fork of the http://jsonschemaphpv.sourceforge.net/ project | ||||||||||
Typia | 3,397 | 68 | 9 hours ago | 195 | August 14, 2023 | 24 | mit | TypeScript | ||
Super-fast/easy runtime validations and serializations through transformation | ||||||||||
Typebox | 3,352 | 144 | 6 days ago | 119 | September 28, 2022 | 1 | other | TypeScript | ||
Json Schema Type Builder with Static Type Resolution for TypeScript |
Creating JSON Schema (Draft 6, Draft 7, Draft 2019-09 or Draft 2020-12) from your Java classes utilising Jackson.
This project consists of:
jackson
annotations (e.g. "description", property name overrides, what properties to ignore) as well as looking up appropriate (annotated) subtypesjakarta.validation.constraints
annotations (e.g. which properties are nullable or not, their "minimum"/"maximum", "minItems"/"maxItems", "minLength"/"maxLength")javax.validation
annotations (e.g. which properties are nullable or not, their "minimum"/"maximum", "minItems"/"maxItems", "minLength"/"maxLength")swagger
(1.5.x) annotations (e.g. "description", property name overrides, what properties to ignore, their "minimum"/"maximum", "const"/"enum")swagger
(2.x) @Schema
annotationsAnother example for such a module is:
JavaDoc is being used throughout the codebase, offering contextual information in your respective IDE or being available online through services like javadoc.io.
Additional documentation and configuration examples can be found here: https://victools.github.io/jsonschema-generator
<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-generator</artifactId>
<version>4.31.1</version>
</dependency>
Since version 4.7
, the release versions of the main generator library and the (standard) victools
modules listed above are aligned.
It is recommended to use identical versions for all of them to ensure compatibility.
It is discouraged to use an older/lower jsonschema-generator
version than any of your jsonschema-module-*
dependencies. If the module uses any feature only added to the jsonschema-generator
in the newer version, runtime errors are to be expected.
import com.fasterxml.jackson.databind.JsonNode;
import com.github.victools.jsonschema.generator.OptionPreset;
import com.github.victools.jsonschema.generator.SchemaGenerator;
import com.github.victools.jsonschema.generator.SchemaGeneratorConfig;
import com.github.victools.jsonschema.generator.SchemaGeneratorConfigBuilder;
import com.github.victools.jsonschema.generator.SchemaVersion;
SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, OptionPreset.PLAIN_JSON);
SchemaGeneratorConfig config = configBuilder.build();
SchemaGenerator generator = new SchemaGenerator(config);
JsonNode jsonSchema = generator.generateSchema(YourClass.class);
System.out.println(jsonSchema.toPrettyString());
Additional examples can be found in the jsonschema-examples folder or throughout the various tests classes.