Skip to content

Commit

Permalink
refactor: openshift-model-console generated from OpenAPI schemas
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <[email protected]>
  • Loading branch information
manusa committed Sep 20, 2024
1 parent b5c9a5c commit baafd80
Show file tree
Hide file tree
Showing 51 changed files with 3,067 additions and 991 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ generate-openapi-classes:
cd kubernetes-model-generator/openshift-model-operator && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-miscellaneous && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-operatorhub && mvn -Pgenerate clean install
cd kubernetes-model-generator/openshift-model-console && mvn -Pgenerate clean install

# Legacy generation of the model: TODO: remove
.PHONY: generate-model-legacy
Expand Down
1 change: 0 additions & 1 deletion kubernetes-model-generator/generateModel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ ABSOLUTE_BASEDIR=$(realpath "$BASEDIR")

# Array for all existing modules
declare -a modules=(
"openshift-model-console"
"openshift-model-clusterautoscaling"
"openshift-model-hive"
"openshift-model-machine"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ public class SchemaUtils {
}

private static final Set<String> PROTECTED_WORDS = new HashSet<>(Arrays.asList(
"abstract",
"continue",
"default",
"enum",
Expand Down
27 changes: 0 additions & 27 deletions kubernetes-model-generator/openshift-model-console/Makefile

This file was deleted.

This file was deleted.

39 changes: 16 additions & 23 deletions kubernetes-model-generator/openshift-model-console/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,41 +43,34 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-common</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-admissionregistration</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<configuration>
<skipAttach>false</skipAttach>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>generate</id>
<build>
<plugins>
<plugin>
<groupId>org.jsonschema2pojo</groupId>
<artifactId>jsonschema2pojo-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>openapi-model-generator-maven-plugin</artifactId>
<configuration >
<settings combine.self="append">
<schemas>
<schema>${openapi.schema.openshift-latest}</schema>
</schemas>
<packageMappings combine.self="append">
<io.k8s.api>io.fabric8.kubernetes.api.model</io.k8s.api>
<io.openshift.console>io.fabric8.openshift.api.model.console</io.openshift.console>
</packageMappings>
<includeGenerationRegexes>
<includeGenerationRegex>^io\.openshift\.console\..*$</includeGenerationRegex>
</includeGenerationRegexes>
</settings>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Loading

0 comments on commit baafd80

Please sign in to comment.