{"record":{"id":"8d98a9f2c53af345","repo":"quarkusio/quarkus","slug":"quarkus-swagger-ui-path-was-set-to-this-is-no","errorCode":null,"errorMessage":"quarkus.swagger-ui.path was set to \"/\", this is not allowed as it blocks the application from serving anything else.","messagePattern":"quarkus\\.swagger-ui\\.path was set to \"/\", this is not allowed as it blocks the application from serving anything else\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"extensions/swagger-ui/deployment/src/main/java/io/quarkus/swaggerui/deployment/SwaggerUiProcessor.java","lineNumber":99,"sourceCode":"                BRANDING_STYLE_MODULE,\n                BRANDING_FAVICON_MODULE).map(HotDeploymentWatchedFileBuildItem::new)\n                .collect(Collectors.toList());\n    }\n\n    @BuildStep\n    public void getSwaggerUiFinalDestination(\n            NonApplicationRootPathBuildItem nonApplicationRootPathBuildItem,\n            Optional<DevContextBuildItem> devContextBuildItem,\n            List<SwaggerUiUrlBuildItem> swaggerUiUrls,\n            LaunchModeBuildItem launchMode,\n            SwaggerUiConfig swaggerUiConfig,\n            SmallRyeOpenApiConfig openapi,\n            Optional<DevServicesLauncherConfigResultBuildItem> devServicesLauncherConfig,\n            BuildProducer<WebJarBuildItem> webJarBuildProducer) throws Exception {\n\n        if (shouldInclude(launchMode, swaggerUiConfig)) {\n            if (\"/\".equals(swaggerUiConfig.path())) {\n                throw new ConfigurationException(\n                        \"quarkus.swagger-ui.path was set to \\\"/\\\", this is not allowed as it blocks the application from serving anything else.\",\n                        Set.of(\"quarkus.swagger-ui.path\"));\n            }\n\n            String devUIContextRoot;\n            if (devContextBuildItem.isPresent()) {\n                devUIContextRoot = devContextBuildItem.get().getDevUIContextRoot();\n            } else {\n                devUIContextRoot = \"\";\n            }\n\n            Map<String, String> urls = new HashMap<>();\n            openapi.documents().forEach((documentName, documentConfig) -> {\n                String documentPath = documentConfig.path();\n\n                if (documentPath.equalsIgnoreCase(swaggerUiConfig.path())) {\n                    throw new ConfigurationException(\n                            \"quarkus.smallrye-openapi.path and quarkus.swagger-ui.path was set to the same value, this is not allowed as the paths needs to be unique [\"","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/swagger-ui/deployment/src/main/java/io/quarkus/swaggerui/deployment/SwaggerUiProcessor.java#L81-L117","documentation":"The Swagger UI extension serves its web jar under quarkus.swagger-ui.path. Setting that path to \"/\" would make the UI intercept every request, shadowing all application endpoints, so the build fails with a ConfigurationException listing the offending property.","triggerScenarios":"application.properties/yml containing quarkus.swagger-ui.path=/ (or equivalent), in a launch mode where the UI is included (shouldInclude).","commonSituations":"Trying to make the docs page the landing page; copy-pasting a config snippet without adjusting the path.","solutions":["Set quarkus.swagger-ui.path to a non-root path such as /swagger-ui or /api-docs-ui.","Serve Swagger UI at a distinct path and add a redirect route from / to it in your app if a root entry point is desired.","Disable the UI in production with quarkus.swagger-ui.include=true scoped to dev/test if unwanted."],"exampleFix":"// before (application.properties)\nquarkus.swagger-ui.path=/\n\n// after\nquarkus.swagger-ui.path=/swagger-ui","handlingStrategy":"validation","validationCode":"// application.properties sanity check\nif (props.getProperty(\"quarkus.swagger-ui.path\", \"\").equals(\"/\")) {\n  throw new IllegalArgumentException(\"quarkus.swagger-ui.path must not be '/'\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never configure extension serving paths at \"/\"; reserve root for the app itself.","Use a redirect route in your own code if you want / to lead to the UI."],"tags":["quarkus","swagger-ui","configuration","path-conflict"],"backgroundTag":"invalid-config-value","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}