Jsonschema Generator

Java JSON Schema Generator – creating JSON Schema (Draft 6, Draft 7, Draft 2019-09, or Draft 2020-12) from Java classes
Alternatives To Jsonschema Generator
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
React Jsonschema Form13,031566299a day ago103December 16, 2019268apache-2.0TypeScript
A React component for building Web forms from JSON Schema.
Ajv12,800801,60611,1866 days ago352January 03, 2023289mitTypeScript
The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
Jsonschema2pojo6,041115467 days ago55February 18, 2023189apache-2.0Java
Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
Json Editor5,376141365 years ago19August 07, 2016461mitJavaScript
JSON Schema Based Editor
Resume Cli4,29393596 months ago107October 23, 202298mitJavaScript
CLI tool to easily setup a new resume 📑
Jsonschema4,24215,5303,1415 days ago97August 07, 202332mitPython
An implementation of the JSON Schema specification for Python
Mimesis4,04842274 days ago47August 06, 20237mitPython
Mimesis is a powerful Python library that empowers developers to generate massive amounts of synthetic data efficiently.
Json Schema3,4458,50148819 days ago46April 13, 202293mitPHP
PHP implementation of JSON schema. Fork of the http://jsonschemaphpv.sourceforge.net/ project
Typia3,397689 hours ago195August 14, 202324mitTypeScript
Super-fast/easy runtime validations and serializations through transformation
Typebox3,3521446 days ago119September 28, 20221otherTypeScript
Json Schema Type Builder with Static Type Resolution for TypeScript
Alternatives To Jsonschema Generator
Select To Compare


Alternative Project Comparisons
Readme

Java JSON Schema Generator

Build Status Maven Central

Creating JSON Schema (Draft 6, Draft 7, Draft 2019-09 or Draft 2020-12) from your Java classes utilising Jackson.


This project consists of:

Another example for such a module is:


Documentation

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


Usage

Dependency (Maven)

<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.

Code

Complete/Minimal Example

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.

Popular Schema Projects
Popular Json Projects
Popular Data Formats Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Json
Schema
Json Schema
Jackson