Skip to content

Commit

Permalink
Fix swagger loading url
Browse files Browse the repository at this point in the history
  • Loading branch information
jakehschwartz committed Apr 30, 2024
1 parent ab66ec6 commit 81bfe81
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,17 @@ lazy val finatraSwagger = project
.settings(settings: _*)
.settings(Seq(
name := "finatra-swagger",
swaggerUIVersion := "4.18.2",
swaggerUIVersion := "5.17.2",
buildInfoPackage := "com.jakehschwartz.finatra.swagger",
buildInfoKeys := Seq[BuildInfoKey](name, version, swaggerUIVersion),
libraryDependencies ++= Seq(
"com.twitter" %% "finatra-http-server" % twitterReleaseVersion,
"io.swagger.core.v3" % "swagger-project" % "2.2.8",
"io.swagger.core.v3" % "swagger-project" % "2.2.21",
"com.github.swagger-akka-http" %% "swagger-scala-module" % "2.10.0",
"com.fasterxml.jackson.datatype" % "jackson-datatype-joda" % jacksonVersion,
"com.fasterxml.jackson.module" %% "jackson-module-scala" % jacksonVersion,
"org.webjars" % "swagger-ui" % swaggerUIVersion.value,
"net.bytebuddy" % "byte-buddy" % "1.12.13"
"net.bytebuddy" % "byte-buddy" % "1.14.14"
) ++ testLibs
))
.settings(settings: _*)
Expand Down Expand Up @@ -77,5 +77,5 @@ val testLibs = Seq(
)

val exampleLibs = Seq(
"com.jakehschwartz" %% "finatra-swagger" % twitterReleaseVersion,
"com.jakehschwartz" %% "finatra-swagger" % "23.11.1",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
window.onload = function() {
//<editor-fold desc="Changeable Configuration Block">

// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
url: "/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
queryConfigEnabled: true, // <-- I added this line
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout"
});

//</editor-fold>
};

0 comments on commit 81bfe81

Please sign in to comment.