Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
ce42300
dev-generate-java-client-action: Renamed Swagger file for consistency.
gpeb2 May 20, 2025
9d1247c
dev-generate-java-client-action: Extracted the relevant parts of the …
gpeb2 May 20, 2025
9e4e95b
dev-generate-java-client-action: Added .gitignore file and VSCode set…
gpeb2 May 20, 2025
481d23f
dev-generate-java-client-action: Updated the GitHub workflow to use M…
gpeb2 May 20, 2025
8fd57d6
Merge branch 'main' into dev-generate-java-client-action
gpeb2 May 20, 2025
bd19011
dev-generate-java-client-action: Updated the workflow so that it will…
gpeb2 May 20, 2025
4caf46f
dev-generate-java-client-action: Readded the `TheWorldAvatar` organis…
gpeb2 May 20, 2025
e62c96f
dev-generate-java-client-action: Tried to fix issue with the GitHub a…
gpeb2 May 20, 2025
7d108c3
dev-generate-java-client-action: Corrected variable references in the…
gpeb2 May 20, 2025
5456a9f
dev-generate-java-client-action: Hopefully made the required changes …
gpeb2 May 20, 2025
3d807a1
Update gen-client.yaml
gpeb2 May 20, 2025
775a2f0
Update gen-client.yaml
gpeb2 May 20, 2025
72cea20
Update gen-client.yaml
gpeb2 May 20, 2025
6cfc08f
Update gen-client.yaml
gpeb2 May 20, 2025
3cd3a70
Debugging
gpeb2 May 20, 2025
759f3e6
Update gen-client.yaml
gpeb2 May 20, 2025
5ca1981
Update gen-client.yaml
gpeb2 May 20, 2025
0ad1efe
dev-generate-java-client-action: Separated the two tokens.
gpeb2 May 20, 2025
91a6a64
dev-generate-java-client-action: Explicitly specified the Maven setti…
gpeb2 May 20, 2025
affbc70
dev-generate-java-client-action: Check that we can't use the `GITHUB_…
gpeb2 May 20, 2025
98658c3
dev-generate-java-client-action: Check that we can't use the default …
gpeb2 May 20, 2025
885e8c0
dev-generate-java-client-action: Try using default Maven settings dir…
gpeb2 May 20, 2025
34d84d1
dev-generate-java-client-action: Removed the custom Maven settings file.
gpeb2 May 20, 2025
9fe111a
dev-generate-java-client-action: Added package write permission for t…
gpeb2 May 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/gen-client.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
name: Generate Java API Client

permissions:
packages: write
on:
push:
branches:
- main
workflow_dispatch:
jobs:
generate-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Swagger Codegen
uses: bjerkio/swagger-codegen-action@v1
- name: Setup Java JDK
uses: actions/setup-java@v4.7.1
with:
args: generate -l java -c openapi-java-client.yaml -i swagger-v4.4.yaml
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- run: 'mvn package'
env:
GITHUB_ACTOR: "token"
GITHUB_TOKEN: ${{ github.token }}
- run: 'mvn deploy:deploy'
if: github.ref_name == 'main'
env:
GITHUB_ACTOR: "token"
GITHUB_TOKEN: ${{ github.token }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "automatic"
}
15 changes: 0 additions & 15 deletions openapi-java-client.yaml

This file was deleted.

143 changes: 143 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>io.theworldavatar</groupId>
<artifactId>podman-java-client</artifactId>
<version>${revision}-SNAPSHOT</version>

<name>Podman Java Client</name>
<url>https://theworldavatar.io</url>

<parent>
<groupId>uk.ac.cam.cares.jps</groupId>
<artifactId>jps-parent-pom</artifactId>
<version>2.3.2</version>
</parent>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.release>11</maven.compiler.release>
<revision>4.4.0</revision>
<!--podman.file>https://storage.googleapis.com/libpod-master-releases/swagger-v4.4.yaml</podman.file-->
<podman.file>${project.basedir}/swagger-v${revision}.yaml</podman.file>

</properties>

<!-- Repository locations to fetch from -->
<repositories>
<repository>
<id>github</id>
<name>The World Avatar Maven Repository</name>
<url>https://maven.pkg.github.com/TheWorldAvatar/*</url>
</repository>
</repositories>

<!-- Repository locations to deploy to -->
<distributionManagement>
<repository>
<id>github</id>
<name>The World Avatar stack Maven Repository</name>
<url>https://maven.pkg.github.com/TheWorldAvatar/podman-java-client/</url>
</repository>
<snapshotRepository>
<id>github</id>
<name>The World Avatar stack Maven Repository</name>
<url>https://maven.pkg.github.com/TheWorldAvatar/podman-java-client/</url>
</snapshotRepository>
</distributionManagement>

<dependencies>

<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>${jackson.version}</version>
</dependency>

<!--
https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jsr310 -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.core/jersey-client -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-json-jackson -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-multipart -->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/com.brsanthu/migbase64 -->
<dependency>
<groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId>
</dependency>

<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</dependency>

</dependencies>

<build>

<plugins>

<plugin>
<groupId>io.swagger</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<executions>
<execution>
<?m2e execute onConfiguration?>
<id>generate-swagger-client</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${podman.file}</inputSpec>
<language>java</language>
<modelPackage>${project.groupId}.swagger.podman.model</modelPackage>
<apiPackage>${project.groupId}.swagger.podman.api</apiPackage>
<configOptions>
<dateLibrary>legacy</dateLibrary>
<library>jersey2</library>
</configOptions>
<addCompileSourceRoot>true</addCompileSourceRoot>
<generateApis>true</generateApis>
<generateApiTests>false</generateApiTests>
<generateApiDocumentation>false</generateApiDocumentation>
<generateModels>true</generateModels>
<modelsToGenerate></modelsToGenerate>
<generateModelTests>false</generateModelTests>
<generateModelDocumentation>false</generateModelDocumentation>
<generateSupportingFiles>true</generateSupportingFiles>
<supportingFilesToGenerate></supportingFilesToGenerate>
</configuration>
</execution>
</executions>
</plugin>

</plugins>

</build>

</project>
File renamed without changes.