java-to-zod:generate
Full name:
sh.ivan:java-to-zod-maven-plugin:0.6.2:generate
Description:
Generates Zod schemas from specified java classes.
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
compile. - The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase:
process-classes.
Required Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<jsonLibrary> |
JsonLibrary |
- |
Library used in JSON classes. Supported values are:
jackson2. |
<outputFile> |
File |
- |
Path and name of generated file. Default value is: ${project.build.directory}/java-to-zod/${project.artifactId}-schemas.js. |
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<classes> |
List<String> |
- |
Classes to process. |
<classesExtendingClasses> |
List<String> |
- |
Classes to process specified by extended superclasses. |
<classesFromAutomaticJaxrsApplication> |
boolean |
- |
Scans JAX-RS resources for JSON classes to process. It is possible to exclude particular REST resource classes using excludeClasses parameter. |
<classesFromJaxrsApplication> |
String |
- |
Scans specified JAX-RS javax.ws.rs.core.Application for classes to process. Parameter contains fully-qualified class name. It is possible to exclude particular REST resource classes using excludeClasses parameter. |
<classesImplementingInterfaces> |
List<String> |
- |
Classes to process specified by implemented interface. |
<classesWithAnnotations> |
List<String> |
- |
Classes to process specified by annotations. |
<classPatterns> |
List<String> |
- |
Classes to process specified using glob patterns so it is possible to specify package or class name suffix. Glob patterns support two wildcards:
|
<excludeClasses> |
List<String> |
- |
List of classes excluded from processing. |
<excludeClassPatterns> |
List<String> |
- |
Excluded classes specified using glob patterns. For more information and examples see Class Names Glob Patterns Wiki page. |
<excludePropertyAnnotations> |
List<String> |
- |
Properties with any of these annotations will be excluded. |
<gsonConfiguration> |
GsonConfiguration |
- |
Specifies Gson global configuration. Description of individual parameters is in GsonConfiguration class on GitHub (latest version). |
<includePropertyAnnotations> |
List<String> |
- |
If this list is not empty then only properties with any of these annotations will be included. |
<jackson2Configuration> |
Jackson2Configuration |
- |
Specifies Jackson 2 global configuration. Description of individual parameters is in Jackson2Configuration class on GitHub (latest version). |
<jsonbConfiguration> |
JsonbConfiguration |
- |
Specifies JSON-B global configuration. Description of individual parameters is in Jackson2Configuration class on GitHub (latest version). |
<loggingLevel> |
Logger$Level |
- |
Specifies level of logging output. Supported values are:
Verbose. |
<scanningAcceptedPackages> |
List<String> |
- |
Allows to speed up classpath scanning by limiting scanning to specified packages. This optimization applies to following parameters:
|
<scanSpringApplication> |
boolean |
- |
If true Spring REST application will be loaded and scanned for classes to process. It is needed to specify application class using another parameter (for example classes). |
<schemaNamePrefix> |
String |
- |
Prefix added to generated schema names. |
<schemaNameSuffix> |
String |
- |
Suffix added to generated schema names. Default value is: Schema. |
<skip> |
boolean |
- |
(no description) User property is: java.to.zod.skip. |
Parameter Details
<classes>
Classes to process.
- Type:
java.util.List<java.lang.String> - Required:
No
<classesExtendingClasses>
Classes to process specified by extended superclasses.
- Type:
java.util.List<java.lang.String> - Required:
No
<classesFromAutomaticJaxrsApplication>
Scans JAX-RS resources for JSON classes to process. It is possible to exclude particular REST resource classes using
excludeClasses parameter.- Type:
boolean - Required:
No
<classesFromJaxrsApplication>
Scans specified JAX-RS
javax.ws.rs.core.Application for classes to process. Parameter contains fully-qualified class name. It is possible to exclude particular REST resource classes using excludeClasses parameter.- Type:
java.lang.String - Required:
No
<classesImplementingInterfaces>
Classes to process specified by implemented interface.
- Type:
java.util.List<java.lang.String> - Required:
No
<classesWithAnnotations>
Classes to process specified by annotations.
- Type:
java.util.List<java.lang.String> - Required:
No
<classPatterns>
Classes to process specified using glob patterns so it is possible to specify package or class name suffix. Glob patterns support two wildcards:
- Single
*wildcard matches any character except for.and$. - Double
**wildcard matches any character.
- Type:
java.util.List<java.lang.String> - Required:
No
<excludeClasses>
List of classes excluded from processing.
- Type:
java.util.List<java.lang.String> - Required:
No
<excludeClassPatterns>
Excluded classes specified using glob patterns. For more information and examples see Class Names Glob Patterns Wiki page.
- Type:
java.util.List<java.lang.String> - Required:
No
<excludePropertyAnnotations>
Properties with any of these annotations will be excluded.
- Type:
java.util.List<java.lang.String> - Required:
No
<gsonConfiguration>
Specifies Gson global configuration. Description of individual parameters is in GsonConfiguration class on GitHub (latest version).
- Type:
cz.habarta.typescript.generator.GsonConfiguration - Required:
No
<includePropertyAnnotations>
If this list is not empty then only properties with any of these annotations will be included.
- Type:
java.util.List<java.lang.String> - Required:
No
<jackson2Configuration>
Specifies Jackson 2 global configuration. Description of individual parameters is in Jackson2Configuration class on GitHub (latest version).
- Type:
cz.habarta.typescript.generator.Jackson2Configuration - Required:
No
<jsonbConfiguration>
Specifies JSON-B global configuration. Description of individual parameters is in Jackson2Configuration class on GitHub (latest version).
- Type:
cz.habarta.typescript.generator.JsonbConfiguration - Required:
No
<jsonLibrary>
Library used in JSON classes. Supported values are:
jackson2- annotations from `com.fasterxml.jackson.annotation` packagejaxb- annotations from `javax.xml.bind.annotation` packagegson- annotations from `com.google.gson.annotations` packagejsonb- annotations from `javax.json.bind.annotation` package
jackson2.- Type:
cz.habarta.typescript.generator.JsonLibrary - Required:
Yes
<loggingLevel>
Specifies level of logging output. Supported values are:
DebugVerboseInfoWarningError
Verbose.- Type:
cz.habarta.typescript.generator.Logger$Level - Required:
No
<outputFile>
Path and name of generated file.
- Type:
java.io.File - Required:
Yes - Default:
${project.build.directory}/java-to-zod/${project.artifactId}-schemas.js
<scanningAcceptedPackages>
Allows to speed up classpath scanning by limiting scanning to specified packages. This optimization applies to following parameters:
classPatternsclassesImplementingInterfacesclassesExtendingClassesclassesWithAnnotationsclassesFromAutomaticJaxrsApplication
- Type:
java.util.List<java.lang.String> - Required:
No
<scanSpringApplication>
If
true Spring REST application will be loaded and scanned for classes to process. It is needed to specify application class using another parameter (for example classes).- Type:
boolean - Required:
No
<schemaNamePrefix>
Prefix added to generated schema names.
- Type:
java.lang.String - Required:
No
<schemaNameSuffix>
Suffix added to generated schema names.
- Type:
java.lang.String - Required:
No - Default:
Schema
<skip>
(no description)
- Type:
boolean - Required:
No - User Property:
java.to.zod.skip
