Skip to content

Commit

Permalink
refactor: kubernetes-model-storageclass 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 authored Aug 9, 2024
1 parent 81b4fd9 commit 2089b60
Show file tree
Hide file tree
Showing 35 changed files with 2,858 additions and 1,283 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ generate-openapi-classes:
cd kubernetes-model-generator/kubernetes-model-node && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-policy && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-scheduling && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-storageclass && 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=(
"kubernetes-model-storageclass"
"kubernetes-model-resource"
"kubernetes-model-kustomize"
"openshift-model-config"
Expand Down
27 changes: 0 additions & 27 deletions kubernetes-model-generator/kubernetes-model-storageclass/Makefile

This file was deleted.

This file was deleted.

42 changes: 19 additions & 23 deletions kubernetes-model-generator/kubernetes-model-storageclass/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,42 +43,38 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-common</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</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>${project.basedir}/../openapi/schemas/kubernetes-1.21.14.json</schema>
<schema>${openapi.schema.kubernetes-latest}</schema>
</schemas>
<packageMappings combine.self="append">
<io.k8s.api.storage>io.fabric8.kubernetes.api.model.storage</io.k8s.api.storage>
<io.k8s.api.storage.v1>io.fabric8.kubernetes.api.model.storage</io.k8s.api.storage.v1>
<io.k8s.api.storagemigration>io.fabric8.kubernetes.api.model.storagemigration</io.k8s.api.storagemigration>
</packageMappings>
<includeGenerationRegexes>
<includeGenerationRegex>^io\.k8s\.api\.storage\..*$</includeGenerationRegex>
<includeGenerationRegex>^io\.k8s\.api\.storagemigration\..*$</includeGenerationRegex>
</includeGenerationRegexes>
</settings>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Loading

0 comments on commit 2089b60

Please sign in to comment.