Skip to content

Some openApi plugin settings are ignored since 1.7.0 #117

Closed
@nbam-e

Description

@nbam-e

Version Information:

  • Springdoc-openapi-gradle-plugin: 1.7.0
  • springdoc: 1.7.0
  • spring-boot: 2.7.14
  • Gradle: 8.2.1 (using groovy)
  • OS: linux

Certain properties (e.g. apiDocsUrl, outputDir, outputFileName) within the openApi {} block in the gradle file appear to have no effect since upgrading to 1.7.0 (with 1.6.0 everything works normally).

I noticed it because generateOpenApiDocs always tried to retrieve the openapi file from ' http://localhost:8080/v3/api-docs', regardless of the apiDocsUrl (which fails in our case).

e.g. using the example config from the readme, the generateOpenApiDocs task still tries do download the openapi spec from http://localhost:8080/v3/api-docs instead of https://localhost:9000/api/docs:

plugins {
	id 'java'
	id 'org.springframework.boot' version '2.7.14'
	id 'org.springdoc.openapi-gradle-plugin' version '1.7.0'
}
...
openApi {
	apiDocsUrl.set("https://localhost:9000/api/docs")
	outputDir.set(file("$buildDir/docs"))
	outputFileName.set("swagger.json")
	waitTimeInSeconds.set(10)
	groupedApiMappings.set(["https://localhost:8080/v3/api-docs/groupA": "swagger-groupA.json",
		"https://localhost:8080/v3/api-docs/groupB": "swagger-groupB.json"])
	customBootRun {
		args.set([
			"--spring.profiles.active=special"
		])
	}
}

Interestingly, the property customBootRun still works, so this only seems to affect certain settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions