com.kestreldigital.json-schema-simplifier.json-schema-simplifier-maven-plugin

A simple tool to simplify JSON Schema files (Maven plugin).

License

License

Categories

Categories

Maven Build Tools JSON Data
GroupId

GroupId

com.kestreldigital.json-schema-simplifier
ArtifactId

ArtifactId

json-schema-simplifier-maven-plugin
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

com.kestreldigital.json-schema-simplifier.json-schema-simplifier-maven-plugin
A simple tool to simplify JSON Schema files (Maven plugin).
Project URL

Project URL

https://github.com/kestreldigital/json-schema-simplifier
Source Code Management

Source Code Management

http://github.com/kestreldigital/json-schema-simplifier/tree/master

Download json-schema-simplifier-maven-plugin

How to add to project

<plugin>
    <groupId>com.kestreldigital.json-schema-simplifier</groupId>
    <artifactId>json-schema-simplifier-maven-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
com.kestreldigital.json-schema-simplifier » json-schema-simplifier-model jar 1.0.0
org.apache.maven : maven-plugin-api jar 3.6.1
commons-io : commons-io jar 2.6

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0

Project Modules

There are no modules declared in this project.

JSON schema simplifier Maven plugin

A simple Maven plugin to generate simplified JSON schema from any standard JSON schema (tested up to draft 7).

The simplification process:

  • Removes non-standard properties (e.g. javaType);
  • Resolves references to other files/definitions, so that each output JSON schema file is standalone.

This is useful where you need to reuse your JSON schemae in applications which require simpler implementations, e.g. configuring models in AWS API Gateway or referencing from n OpenAPI3 interface specification.

Usage:

Currently, this tool is only set up to be used as a Maven plugin. Add this to the build/plugins section of your pom file:

<plugin>
    <groupId>com.kestreldigital</groupId>
    <artifactId>json-schema-simplifier-maven-plugin</artifactId>
    <version>0.0.1</version>
    <configuration>
        <sourceDirectory>${basedir}/json-schema</sourceDirectory>
    </configuration>
    <executions>
        <execution>
            <phase>compile</phase>
            <goals>
                <goal>simplify</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Configuration:

  • sourceDirectory: Path of the folder containing your JSON schema files (required).
com.kestreldigital.json-schema-simplifier

Kestrel Digital Limited

Versions

Version
1.0.0