Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,10 @@ basyx.backend=InMemory
#basyx.feature.authorization.type = rbac
#basyx.feature.authorization.jwtBearerTokenProvider = keycloak
#basyx.feature.authorization.rbac.file = classpath:rbac_rules.json
#spring.security.oauth2.resourceserver.jwt.issuer-uri= http://localhost:9096/realms/BaSyx
#spring.security.oauth2.resourceserver.jwt.issuer-uri= http://localhost:9096/realms/BaSyx

####################################################################################
# Disable the Swagger UI
####################################################################################
#springdoc.swagger-ui.enabled=false
#springdoc.api-docs.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,10 @@ basyx.backend = InMemory
#basyx.aasrepository.feature.discoveryintegration.authorization.token-endpoint=http://localhost/realms/BaSyx/protocol/openid-connect/token
#basyx.aasrepository.feature.discoveryintegration.authorization.grant-type = CLIENT_CREDENTIALS
#basyx.aasrepository.feature.discoveryintegration.authorization.client-id=workstation-1
#basyx.aasrepository.feature.discoveryintegration.authorization.client-secret=nY0mjyECF60DGzNmQUjL81XurSl8etom
#basyx.aasrepository.feature.discoveryintegration.authorization.client-secret=nY0mjyECF60DGzNmQUjL81XurSl8etom

####################################################################################
# Disable the Swagger UI
####################################################################################
#springdoc.swagger-ui.enabled=false
#springdoc.api-docs.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ basyx.backend = InMemory
#basyx.aasrepository.feature.discoveryintegration.authorization.token-endpoint=http://localhost/realms/BaSyx/protocol/openid-connect/token
#basyx.aasrepository.feature.discoveryintegration.authorization.grant-type = CLIENT_CREDENTIALS
#basyx.aasrepository.feature.discoveryintegration.authorization.client-id=workstation-1
#basyx.aasrepository.feature.discoveryintegration.authorization.client-secret=nY0mjyECF60DGzNmQUjL81XurSl8etom
#basyx.aasrepository.feature.discoveryintegration.authorization.client-secret=nY0mjyECF60DGzNmQUjL81XurSl8etom

####################################################################################
# Disable the Swagger UI
####################################################################################
#springdoc.swagger-ui.enabled=false
#springdoc.api-docs.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ basyx.aasxfileserver.name = aasx-fileserver

#spring.servlet.multipart.max-file-size=200MB
#spring.servlet.multipart.max-request-size=215MB

####################################################################################
# Disable the Swagger UI
####################################################################################
#springdoc.swagger-ui.enabled=false
#springdoc.api-docs.enabled=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*******************************************************************************
* Copyright (C) 2025 the Eclipse BaSyx Authors
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* SPDX-License-Identifier: MIT
******************************************************************************/

package org.eclipse.digitaltwin.basyx.http;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
* Redirects the root URL to the Swagger UI page if Swagger UI is enabled.
* @author fried
*/
@Controller
@RequestMapping("/")
@ConditionalOnProperty(
name = "springdoc.swagger-ui.enabled",
havingValue = "true",
matchIfMissing = true
)
public class HomeRedirectController {

@GetMapping({"", "/"})
public String redirectToSwaggerUi() {
return "redirect:/swagger-ui/index.html";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ basyx.externalurl=http://localhost:8081
#basyx.feature.authorization.jwtBearerTokenProvider = keycloak
#basyx.feature.authorization.rbac.file = classpath:rbac_rules.json
#spring.security.oauth2.resourceserver.jwt.issuer-uri= http://localhost:9096/realms/BaSyx

####################################################################################
# Disable the Swagger UI
####################################################################################
#springdoc.swagger-ui.enabled=false
#springdoc.api-docs.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ basyx.backend = InMemory
####################################################################################
# This feature is enabled by default

#basyx.submodelrepository.feature.operation.delegation.enabled = false
#basyx.submodelrepository.feature.operation.delegation.enabled = false

####################################################################################
# Disable the Swagger UI
####################################################################################
#springdoc.swagger-ui.enabled=false
#springdoc.api-docs.enabled=false
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ basyx:
java:
sources:
classes: classes
additionalClasspath: []
additionalClasspath: []

# Disable the Swagger UI - enabled by default
#springdoc:
# swagger-ui:
# enabled: false
# api-docs:
# enabled: false