Skip to content

Commit

Permalink
refactor: kubernetes-model-autoscaling 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 Jul 25, 2024
1 parent c405eb8 commit b270347
Show file tree
Hide file tree
Showing 25 changed files with 95 additions and 969 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ generate-openapi-classes:
cd kubernetes-model-generator/kubernetes-model-admissionregistration && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-apiextensions && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-apps && mvn -Pgenerate clean install
cd kubernetes-model-generator/kubernetes-model-autoscaling && 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-autoscaling"
"kubernetes-model-batch"
"kubernetes-model-certificates"
"kubernetes-model-coordination"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
<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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
<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>
Expand Down
4 changes: 0 additions & 4 deletions kubernetes-model-generator/kubernetes-model-apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-common</artifactId>
</dependency>
</dependencies>

<profiles>
Expand Down
27 changes: 0 additions & 27 deletions kubernetes-model-generator/kubernetes-model-autoscaling/Makefile

This file was deleted.

This file was deleted.

39 changes: 16 additions & 23 deletions kubernetes-model-generator/kubernetes-model-autoscaling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,30 @@
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-core</artifactId>
</dependency>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-model-common</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>${project.basedir}/../openapi/schemas/kubernetes-1.21.14.json</schema>
<schema>${openapi.schema.kubernetes-latest}</schema>
</schemas>
<packageMappings combine.self="append">
<io.k8s.api.autoscaling>io.fabric8.kubernetes.api.model.autoscaling</io.k8s.api.autoscaling>
</packageMappings>
<includeGenerationRegexes>
<includeGenerationRegex>^io\.k8s\.api\.autoscaling\..*$</includeGenerationRegex>
</includeGenerationRegexes>
</settings>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
Loading

0 comments on commit b270347

Please sign in to comment.