Json Schema Validator Maven Plugin

Maven plugin to validate json files against a json schema

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка JSON Данные
Группа

Группа

com.groupon.maven.plugin.json
Идентификатор

Идентификатор

json-schema-validator
Последняя версия

Последняя версия

1.2.0
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

Json Schema Validator Maven Plugin
Maven plugin to validate json files against a json schema
Ссылка на сайт

Ссылка на сайт

https://github.com/groupon/json-schema-validator
Система контроля версий

Система контроля версий

https://github.com/groupon/json-schema-validator

Скачать json-schema-validator

Как подключить последнюю версию

<plugin>
    <groupId>com.groupon.maven.plugin.json</groupId>
    <artifactId>json-schema-validator</artifactId>
    <version>1.2.0</version>
</plugin>

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
com.github.fge : json-schema-validator jar 2.2.6
com.fasterxml.jackson.core : jackson-core jar 2.6.2
org.apache.maven.plugin-tools : maven-plugin-tools-api jar 3.2
org.codehaus.plexus : plexus-component-annotations jar 1.5.5
org.codehaus.plexus : plexus-resources jar 1.0-alpha-7
com.google.code.findbugs : annotations jar 3.0.0

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven.plugin-tools : maven-plugin-tools-annotations jar 3.2

test (3)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 1.2

Модули Проекта

Данный проект не имеет модулей.

json-schema-validator

License: Apache 2 Travis Build Maven Artifact

Maven plugin to validate json files against a json schema. Uses https://github.com/fge/json-schema-validator library under the covers.

Usage

Determine the latest version of the validator in Maven Central.

Add the plugin to your pom either in the plugins or pluginManagement block:

<plugin>
    <groupId>com.groupon.maven.plugin.json</groupId>
    <artifactId>json-schema-validator</artifactId>
    <version>VERSION</version>
</plugin>

Configure one or more validation blocks for the plugin in the plugins block:

<plugin>
    <artifactId>json-schema-validator</artifactId>
    <groupId>com.groupon.maven.plugin.json</groupId>
    <executions>
        <execution>
            <phase>verify</phase>
            <goals>
                <goal>validate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <validations>
            <validation>
                <directory>${basedir}/src/main/resources/data</directory>
                <jsonSchema>${basedir}/src/test/resources/data.schema</jsonSchema>
                <includes>
                    <include>**/*.json</include>
                </includes>
            </validation>
        </validations>
    </configuration>
</plugin>

Each validation block specifies the jsonSchema file to validate with as well as the json file(s) to validate from a root directory with standard includes and excludes to select specific file(s).

Building

Prerequisites:

Building:

json-schema-validator> mvn verify

To use the local version you must first install it locally:

json-schema-validator> mvn install

You can determine the version of the local build from the pom file. Using the local version is intended only for testing or development.

License

Published under Apache Software License 2.0, see LICENSE

© Groupon Inc., 2014

com.groupon.maven.plugin.json

Groupon

Версии библиотеки

Версия
1.2.0