Skip to content

Commit

Permalink
Merge pull request #11684 from qmonmert/fix/11681
Browse files Browse the repository at this point in the history
Fix: update springdoc-openapi.version to v2.8.0
  • Loading branch information
murdos authored Jan 10, 2025
2 parents 08d856a + 6b59919 commit d3d55d2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<jacoco.version>0.8.12</jacoco.version>
<jgit.version>7.1.0.202411261347-r</jgit.version>
<archunit-junit5.version>1.3.0</archunit-junit5.version>
<springdoc-openapi.version>2.7.0</springdoc-openapi.version>
<springdoc-openapi.version>2.8.0</springdoc-openapi.version>
<properties-maven-plugin.version>1.2.1</properties-maven-plugin.version>
<sonar-maven-plugin.version>5.0.0.4389</sonar-maven-plugin.version>
<apache-commons-io.version>2.18.0</apache-commons-io.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class OpenApiModulesConfiguration {

private static final String STRING_TYPE = "string";
private static final String OBJECT_TYPE = "object";
private static final String DESCRIPTION = "Definitions for properties in this module";
private static final String MODULE_PROPERTY_DEFINITION_SCHEMA_NAME = "JHipsterModulePropertiesDefinition";
private static final String MODULE_PROPERTIES_DEFINITION_SCHEMA_NAME = "JHipsterModulePropertyDefinition";

Expand All @@ -61,11 +62,8 @@ OpenApiCustomizer openApiModules(JHipsterModulesResources modules) {
@SuppressWarnings("unchecked")
private Schema<?> propertiesDefinitionSchema() {
return new Schema<>()
.addProperty(
"definitions",
new Schema<>().type("array").description("Definitions for properties in this module").items(MODULE_PROPERTIES_DEFINITION_SCHEMA)
)
.description("Definitions for properties in this module")
.addProperty("definitions", new Schema<>().type("array").description(DESCRIPTION).items(MODULE_PROPERTIES_DEFINITION_SCHEMA))
.description(DESCRIPTION)
.type(OBJECT_TYPE);
}

Expand Down Expand Up @@ -97,6 +95,7 @@ private Function<JHipsterModuleResource, Schema<?>> toModuleApplicationSchema()
Schema<?> schema = new Schema<>()
.name(schemaName(module.slug()))
.type(OBJECT_TYPE)
.description(DESCRIPTION)
.addProperty("projectFolder", new Schema<>().type(STRING_TYPE).description("Path to the project"))
.addProperty(
"commit",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/generator/dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<spring-boot.version>3.4.1</spring-boot.version>
<spring-cloud.version>2024.0.0</spring-cloud.version>
<spring-cloud-netflix-eureka-client.version>4.2.0</spring-cloud-netflix-eureka-client.version>
<springdoc-openapi.version>2.7.0</springdoc-openapi.version>
<springdoc-openapi.version>2.8.0</springdoc-openapi.version>
<kafka-clients.version>3.9.0</kafka-clients.version>
<mongock.version>5.5.0</mongock.version>
<neo4j-migrations.version>2.15.1</neo4j-migrations.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public void getApiDocumentation() {

@Then("I should have schema for {string}")
public void shouldHaveSchema(String schema) {
assertThatLastResponse().hasOkStatus().hasElement("$.components.schemas." + schema + ".type").withValue("object");
assertThatLastResponse()
.hasOkStatus()
.hasElement("$.components.schemas." + schema + ".description")
.withValue("Definitions for properties in this module");
}
}

0 comments on commit d3d55d2

Please sign in to comment.