mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-09-08 17:51:20 +02:00
swagger subprojects
This commit is contained in:
parent
bbf5d5f6d4
commit
fc4694b538
2
.github/workflows/swagger.yml
vendored
2
.github/workflows/swagger.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
- uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
- uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
|
||||||
|
|
||||||
- name: Generate Swagger documentation
|
- name: Generate Swagger documentation
|
||||||
run: ./gradlew generateOpenApiDocs
|
run: ./gradlew :stirling-pdf:generateOpenApiDocs
|
||||||
|
|
||||||
- name: Upload Swagger Documentation to SwaggerHub
|
- name: Upload Swagger Documentation to SwaggerHub
|
||||||
run: ./gradlew swaggerhubUpload
|
run: ./gradlew swaggerhubUpload
|
||||||
|
48
build.gradle
48
build.gradle
@ -161,6 +161,44 @@ subprojects {
|
|||||||
tasks.named("processResources") {
|
tasks.named("processResources") {
|
||||||
dependsOn(rootProject.tasks.writeVersion)
|
dependsOn(rootProject.tasks.writeVersion)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (name == 'stirling-pdf') {
|
||||||
|
apply plugin: 'org.springdoc.openapi-gradle-plugin'
|
||||||
|
|
||||||
|
openApi {
|
||||||
|
apiDocsUrl = "http://localhost:8080/v1/api-docs"
|
||||||
|
outputDir = file("$projectDir")
|
||||||
|
outputFileName = "SwaggerDoc.json"
|
||||||
|
waitTimeInSeconds = 60 // Increase the wait time to 60 seconds
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("forkedSpringBootRun") {
|
||||||
|
dependsOn(":common:jar")
|
||||||
|
dependsOn(":proprietary:jar")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("copySwaggerDoc", Copy) {
|
||||||
|
doNotTrackState("Writes SwaggerDoc.json to project root")
|
||||||
|
from(layout.projectDirectory.file("SwaggerDoc.json"))
|
||||||
|
into(rootProject.projectDir)
|
||||||
|
dependsOn("generateOpenApiDocs")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.register("cleanSwaggerInBuild", Delete) {
|
||||||
|
doNotTrackState("Cleans up SwaggerDoc.json in build directory")
|
||||||
|
delete(layout.projectDirectory.file("SwaggerDoc.json"))
|
||||||
|
dependsOn("copySwaggerDoc")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("copySwaggerDoc") {
|
||||||
|
finalizedBy("cleanSwaggerInBuild")
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("generateOpenApiDocs") {
|
||||||
|
finalizedBy("copySwaggerDoc")
|
||||||
|
doNotTrackState("OpenAPI plugin writes outside build directory")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile).configureEach {
|
tasks.withType(JavaCompile).configureEach {
|
||||||
@ -204,13 +242,6 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
openApi {
|
|
||||||
apiDocsUrl = "http://localhost:8080/v1/api-docs"
|
|
||||||
outputDir = file("$projectDir")
|
|
||||||
outputFileName = "SwaggerDoc.json"
|
|
||||||
waitTimeInSeconds = 60 // Increase the wait time to 60 seconds
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configure the forked spring boot run task to properly delegate to the stirling-pdf module
|
// Configure the forked spring boot run task to properly delegate to the stirling-pdf module
|
||||||
tasks.named('forkedSpringBootRun') {
|
tasks.named('forkedSpringBootRun') {
|
||||||
dependsOn ':stirling-pdf:bootRun'
|
dependsOn ':stirling-pdf:bootRun'
|
||||||
@ -565,9 +596,6 @@ tasks.register('printMacVersion') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named('generateOpenApiDocs') {
|
|
||||||
doNotTrackState("Tracking state is not supported for this task")
|
|
||||||
}
|
|
||||||
tasks.named('bootRun') {
|
tasks.named('bootRun') {
|
||||||
group = 'application'
|
group = 'application'
|
||||||
description = 'Delegates to :stirling-pdf:bootRun'
|
description = 'Delegates to :stirling-pdf:bootRun'
|
||||||
|
5297
stirling-pdf/SwaggerDocstirling-pdf.json
Normal file
5297
stirling-pdf/SwaggerDocstirling-pdf.json
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user