From f55172bcb626cb9cfbdf78996b0db50c282484b5 Mon Sep 17 00:00:00 2001 From: Viacheslav Klimov Date: Tue, 21 Apr 2026 14:50:47 +0300 Subject: [PATCH] Add maven enforcer rule to check openapi spec was generated successfully --- application/pom.xml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/application/pom.xml b/application/pom.xml index 1a5665143c..4114f98759 100644 --- a/application/pom.xml +++ b/application/pom.xml @@ -572,6 +572,29 @@ ${project.build.directory} + + org.apache.maven.plugins + maven-enforcer-plugin + + + verify-openapi-spec-generated + verify + + enforce + + + + + + ${project.build.directory}/openapi.json + + OpenAPI spec was not generated — target/openapi.json is missing. The springdoc-openapi-maven-plugin logs HTTP failures but does not fail the build; scan the log above for "An error has occured" or a 5xx response from /v3/api-docs/thingsboard and fix the underlying issue (e.g. duplicate @Schema names rejected by SwaggerConfiguration). + + + + + + org.apache.maven.plugins maven-surefire-plugin