You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be able to generate the Java types easily we need a way to invoke the generator project-wise (Maven).
The easiest approach is to create a Maven plugin that can be easily added to each model module and that will be triggered as part of the model build process.
Specifications
Implement a new Maven module packaged as openapi-model-generator-maven-plugin in kubernetes-model-generator/openapi/maven-plugin: io.fabric8:openapi-model-generator-maven-plugin
This is an internal module, so it shouldn't be published to Maven Central: <maven.deploy.skip>true</maven.deploy.skip>
The plugin should provide support to define the following settings:
Configuration
Description
schemas*
List of OpenAPI schema files (*.json) to process
outputDirectory*
Directory where generated Java classes should be persisted
packageName*
Name of the base package for the generated Java classes
builderPackage*
Target package for Sundrio-generated builder classes
addBuildableReferences
Whether to add buildable references to generated classes (should be true for non-core models)
packageMappings
Additional mappings to output classes to packages different than packageName
skipGenerationRegexes
List of definition regexes to skip in the generation
includeGenerationRegexes
List of definition regexes to include in the generation
generateJavadoc
Add Javadoc comments from OpenAPI descriptions
generatedSourcesDirectory
Optional, defaults to $outputDirectory/src/generated/java
overridesDirectory
Optional, defaults to $outputDirectory/src/main/java
Generator cleans output directory before processing the schema(s)
Generator allows for providing multiple schemas
Schemas are processed in order
The most recent processed schema overwrites any class that has been defined by a previous schema
The text was updated successfully, but these errors were encountered:
Description
Part of #6130
To be able to generate the Java types easily we need a way to invoke the generator project-wise (Maven).
The easiest approach is to create a Maven plugin that can be easily added to each model module and that will be triggered as part of the model build process.
Specifications
openapi-model-generator-maven-plugin
inkubernetes-model-generator/openapi/maven-plugin
:io.fabric8:openapi-model-generator-maven-plugin
<maven.deploy.skip>true</maven.deploy.skip>
schemas
**.json
) to processoutputDirectory
*packageName
*builderPackage
*addBuildableReferences
packageMappings
packageName
skipGenerationRegexes
includeGenerationRegexes
generateJavadoc
generatedSourcesDirectory
$outputDirectory/src/generated/java
overridesDirectory
$outputDirectory/src/main/java
The text was updated successfully, but these errors were encountered: