mn:generate-jsonschema
Full name:
io.micronaut.maven:micronaut-maven-plugin:4.8.1-SNAPSHOT:generate-jsonschema
Description:
Json Schema generator mojo provides the parameters for all generators and the invoker logic.
Expects single or multiple schema files as input via a URL, file, or directory; and generates all required source code representing the validation form in the targeted language.
Attributes:
- Requires a Maven project to be executed.
- The goal is not marked as thread-safe and thus does not support parallel builds.
- Since version:
4.0.0
. - Binds by default to the lifecycle phase:
generate-sources
.
Optional Parameters
Name | Type | Since | Description |
---|---|---|---|
<acceptedUrlPatterns> |
List<String> |
- |
A list of accepted URL patterns. Used to filter or validate input resources based on their URL. URLs matching at least one pattern will be accepted. Default value is "^https://.* /.*.json". User Property: micronaut.jsonschema.generator.accepted-url-patterns |
<enabled> |
boolean |
- |
The property that defines if this mojo is used. Default: false User Property: micronaut.jsonschema.generator.enabled |
<inputDirectory> |
File |
- |
The directory containing multiple input files or schema files. The Mojo will process all schema files in this directory. User Property: micronaut.jsonschema.generator.input-directory |
<inputFile> |
File |
- |
The input file containing the schema. This file will be used as a source for generating or processing schemas. User Property: micronaut.jsonschema.generator.input-file |
<inputURL> |
String |
- |
The URL to an input resource, pointing to a JSON schema. User Property: micronaut.jsonschema.generator.input-url |
<language> |
String |
- |
The programming language to be used for schema generation. Default is "JAVA". Other values may be supported depending on the version of micronaut-sourcegen module. Default: JAVA User Property: micronaut.jsonschema.generator.language |
<outputDirectory> |
File |
- |
The output directory where generated sources or files will be placed. By default, this points to `${project.build.directory}/generated-sources/jsonschema`. Default: ${project.build.directory}/generated-sources/jsonschema |
<outputFileName> |
String |
- |
The name of the output file where the generated schema or data will be saved only if there is a single output source. User Property: micronaut.jsonschema.generator.output-file-name |
<outputPackageName> |
String |
- |
The package name for the generated classes or schemas. Default value is specified as "io.micronaut.jsonschema". Default: io.micronaut.jsonschema User Property: micronaut.jsonschema.generator.output-package-name |
Parameter Details
<acceptedUrlPatterns>
A list of accepted URL patterns. Used to filter or validate input resources based on their URL. URLs matching at least one pattern will be accepted. Default value is "^https://.* /.*.json".
- Type:
java.util.List<java.lang.String>
- Required:
No
- User Property:
micronaut.jsonschema.generator.accepted-url-patterns
<enabled>
The property that defines if this mojo is used.
- Type:
boolean
- Required:
No
- User Property:
micronaut.jsonschema.generator.enabled
- Default:
false
<inputDirectory>
The directory containing multiple input files or schema files. The Mojo will process all schema files in this directory.
- Type:
java.io.File
- Required:
No
- User Property:
micronaut.jsonschema.generator.input-directory
<inputFile>
The input file containing the schema. This file will be used as a source for generating or processing schemas.
- Type:
java.io.File
- Required:
No
- User Property:
micronaut.jsonschema.generator.input-file
<inputURL>
The URL to an input resource, pointing to a JSON schema.
- Type:
java.lang.String
- Required:
No
- User Property:
micronaut.jsonschema.generator.input-url
<language>
The programming language to be used for schema generation. Default is "JAVA". Other values may be supported depending on the version of micronaut-sourcegen module.
- Type:
java.lang.String
- Required:
No
- User Property:
micronaut.jsonschema.generator.language
- Default:
JAVA
<outputDirectory>
The output directory where generated sources or files will be placed. By default, this points to `${project.build.directory}/generated-sources/jsonschema`.
- Type:
java.io.File
- Required:
No
- Default:
${project.build.directory}/generated-sources/jsonschema
<outputFileName>
The name of the output file where the generated schema or data will be saved only if there is a single output source.
- Type:
java.lang.String
- Required:
No
- User Property:
micronaut.jsonschema.generator.output-file-name
<outputPackageName>
The package name for the generated classes or schemas. Default value is specified as "io.micronaut.jsonschema".
- Type:
java.lang.String
- Required:
No
- User Property:
micronaut.jsonschema.generator.output-package-name
- Default:
io.micronaut.jsonschema