Skip to content

Commit

Permalink
API-7065 - Using base url for docs fe when fetching oas file (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
peteslater-ee authored May 26, 2023
1 parent 43f8745 commit 0711062
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ trait ApplicationConfig {
def thirdPartyDeveloperUrl: String
def apiPlatformMicroserviceBaseUrl: String
def ramlPreviewMicroserviceBaseUrl: String
def apiDocumentationBaseUrl: String

def securedCookie: Boolean
def ramlPreviewEnabled: Boolean
Expand Down Expand Up @@ -79,6 +80,8 @@ class ApplicationConfigImpl @Inject() (config: Configuration)
lazy val apiPlatformMicroserviceBaseUrl = baseUrl("api-platform-microservice")
lazy val ramlPreviewMicroserviceBaseUrl = baseUrl("raml-preview-microservice")

lazy val apiDocumentationBaseUrl = getString("apidocumentation.base.url")

val securedCookie = getBoolean("cookie.secure")
val ramlPreviewEnabled = getBoolean("features.ramlPreview")
val openApiPreviewEnabled = getBoolean("features.openApiPreview")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class OpenApiDocumentationController @Inject() (

val emptyAuthList = java.util.Collections.emptyList[io.swagger.v3.parser.core.models.AuthorizationValue]()

val oasFileLocation = routes.OpenApiDocumentationController.fetchOas(service, version).absoluteURL()
val oasFileLocation = s"${appConfig.apiDocumentationBaseUrl}${routes.OpenApiDocumentationController.fetchOas(service, version).url}"

val futureParsing = Future {
blocking {
Expand Down

0 comments on commit 0711062

Please sign in to comment.