mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 05:10:16 +03:00
Let the OS pick the OpenAPI generation port
This commit is contained in:
+2
-3
@@ -452,9 +452,8 @@ subprojects {
|
||||
if (name == 'stirling-pdf') {
|
||||
apply plugin: 'org.springdoc.openapi-gradle-plugin'
|
||||
|
||||
// Port 8080 is the app's own port, so a Stirling instance already running there answers
|
||||
// this URL before the forked one does and the spec is generated from THAT build's code.
|
||||
def openApiPort = (rootProject.findProperty('openApiPort') ?: '8390').toString()
|
||||
def openApiPort = rootProject.findProperty('openApiPort')?.toString()
|
||||
?: new ServerSocket(0).withCloseable { it.localPort }.toString()
|
||||
|
||||
openApi {
|
||||
apiDocsUrl = "http://localhost:${openApiPort}/v1/api-docs"
|
||||
|
||||
Reference in New Issue
Block a user