diff --git a/.github/workflows/swagger.yml b/.github/workflows/swagger.yml index 95e2529e..97ad11ef 100644 --- a/.github/workflows/swagger.yml +++ b/.github/workflows/swagger.yml @@ -35,6 +35,7 @@ jobs: run: ./gradlew swaggerhubUpload env: SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }} + SWAGGERHUB_USER: "Frooodle" - name: Get version number id: versionNumber @@ -42,6 +43,7 @@ jobs: - name: Set API version as published and default on SwaggerHub run: | - curl -X PUT -H "Authorization: ${SWAGGERHUB_API_KEY}" "https://api.swaggerhub.com/apis/Frooodle/Stirling-PDF/${{ steps.versionNumber.outputs.versionNumber }}/settings/lifecycle" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"published\":true,\"default\":true}" + curl -X PUT -H "Authorization: ${SWAGGERHUB_API_KEY}" "https://api.swaggerhub.com/apis/${SWAGGERHUB_USER}/Stirling-PDF/${{ steps.versionNumber.outputs.versionNumber }}/settings/lifecycle" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"published\":true,\"default\":true}" env: SWAGGERHUB_API_KEY: ${{ secrets.SWAGGERHUB_API_KEY }} + SWAGGERHUB_USER: "Frooodle" diff --git a/.gitignore b/.gitignore index e5d8ad20..90d48cce 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,8 @@ clientWebUI/ !cucumber/exampleFiles/example_html.zip exampleYmlFiles/stirling/ /testing/file_snapshots +SwaggerDoc.json + # Gradle .gradle .lock @@ -188,3 +190,7 @@ id_ed25519.pub .ipynb_checkpoints **/jcef-bundle/ + +# node_modules +node_modules/ +*.mjs diff --git a/build.gradle b/build.gradle index bbd66361..e225613d 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ plugins { id "java" id "org.springframework.boot" version "3.4.3" id "io.spring.dependency-management" version "1.1.7" - id "org.springdoc.openapi-gradle-plugin" version "1.8.0" + id "org.springdoc.openapi-gradle-plugin" version "1.9.0" id "io.swagger.swaggerhub" version "1.3.2" id "edu.sc.seis.launch4j" version "3.0.6" id "com.diffplug.spotless" version "7.0.2" @@ -98,6 +98,7 @@ openApi { apiDocsUrl = "http://localhost:8080/v1/api-docs" outputDir = file("$projectDir") outputFileName = "SwaggerDoc.json" + waitTimeInSeconds = 60 // Increase the wait time to 60 seconds } //0.11.5 to 2024.11.5 @@ -284,6 +285,7 @@ sonar { // } tasks.wrapper { gradleVersion = "8.12" + distributionType = Wrapper.DistributionType.ALL } //tasks.withType(JavaCompile) { // options.compilerArgs << "-Xlint:deprecation" @@ -384,19 +386,13 @@ dependencies { //general PDF // https://mvnrepository.com/artifact/com.opencsv/opencsv - implementation ("com.opencsv:opencsv:5.10") { - exclude group: "commons-logging", module: "commons-logging" - } + implementation ("com.opencsv:opencsv:5.10") - implementation ("org.apache.pdfbox:pdfbox:$pdfboxVersion") { - exclude group: "commons-logging", module: "commons-logging" - } + implementation ("org.apache.pdfbox:pdfbox:$pdfboxVersion") implementation "org.apache.pdfbox:preflight:$pdfboxVersion" - implementation ("org.apache.pdfbox:xmpbox:$pdfboxVersion") { - exclude group: "commons-logging", module: "commons-logging" - } + implementation ("org.apache.pdfbox:xmpbox:$pdfboxVersion") // https://mvnrepository.com/artifact/technology.tabula/tabula implementation ('technology.tabula:tabula:1.0.5') { @@ -446,9 +442,9 @@ task writeVersion { swaggerhubUpload { // dependsOn = generateOpenApiDocs // Depends on your task generating Swagger docs api = "Stirling-PDF" // The name of your API on SwaggerHub - owner = "Frooodle" // Your SwaggerHub username (or organization name) + owner = "${System.getenv().getOrDefault('SWAGGERHUB_USER', 'Frooodle')}" // Your SwaggerHub username (or organization name) version = project.version // The version of your API - inputFile = "./SwaggerDoc.json" // The path to your Swagger docs + inputFile = file("SwaggerDoc.json") // The path to your Swagger docs token = "${System.getenv("SWAGGERHUB_API_KEY")}" // Your SwaggerHub API key, passed as an environment variable oas = "3.0.0" // The version of the OpenAPI Specification you"re using } @@ -476,3 +472,7 @@ task printMacVersion { println getMacVersion(project.version.toString()) } } + +tasks.named('generateOpenApiDocs') { + doNotTrackState("Tracking state is not supported for this task") +}