diff --git a/.github/workflows/gen-client.yaml b/.github/workflows/gen-client.yaml index 1bb95d9..7848109 100644 --- a/.github/workflows/gen-client.yaml +++ b/.github/workflows/gen-client.yaml @@ -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 }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f97022 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/ \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e0f15db --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "automatic" +} \ No newline at end of file diff --git a/openapi-java-client.yaml b/openapi-java-client.yaml deleted file mode 100644 index 5b3d0c1..0000000 --- a/openapi-java-client.yaml +++ /dev/null @@ -1,15 +0,0 @@ -additionalProperties: - groupId: io.theworldavatar - artifactId: swagger-java-client - artifactVersion: 4.4.0 - modelPackage: io.theworldavatar.swagger.podman.model - apiPackage: io.theworldavatar.swagger.podman.api - dateLibrary: legacy - library: jersey2 - apis: - apiTests: false - apiDocs: false - models: - modelTests: false - modelDocs: false - supportingFiles: diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..d4daaf4 --- /dev/null +++ b/pom.xml @@ -0,0 +1,143 @@ + + + + 4.0.0 + + io.theworldavatar + podman-java-client + ${revision}-SNAPSHOT + + Podman Java Client + https://theworldavatar.io + + + uk.ac.cam.cares.jps + jps-parent-pom + 2.3.2 + + + + 11 + 11 + 11 + 4.4.0 + + ${project.basedir}/swagger-v${revision}.yaml + + + + + + + github + The World Avatar Maven Repository + https://maven.pkg.github.com/TheWorldAvatar/* + + + + + + + github + The World Avatar stack Maven Repository + https://maven.pkg.github.com/TheWorldAvatar/podman-java-client/ + + + github + The World Avatar stack Maven Repository + https://maven.pkg.github.com/TheWorldAvatar/podman-java-client/ + + + + + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + ${jackson.version} + + + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + + + org.glassfish.jersey.core + jersey-client + + + + + org.glassfish.jersey.media + jersey-media-json-jackson + + + + + org.glassfish.jersey.media + jersey-media-multipart + + + + + com.brsanthu + migbase64 + + + + io.swagger + swagger-annotations + + + + + + + + + + io.swagger + swagger-codegen-maven-plugin + + + + generate-swagger-client + generate-sources + + generate + + + ${podman.file} + java + ${project.groupId}.swagger.podman.model + ${project.groupId}.swagger.podman.api + + legacy + jersey2 + + true + true + false + false + true + + false + false + true + + + + + + + + + + + \ No newline at end of file diff --git a/swagger-v4.4.yaml b/swagger-v4.4.0.yaml similarity index 100% rename from swagger-v4.4.yaml rename to swagger-v4.4.0.yaml