Skip to content

Commit

Permalink
#1693 Swagger API: dev-profile: full v2+v3 API, non-dev: full v3 API
Browse files Browse the repository at this point in the history
  • Loading branch information
dk1844 committed May 9, 2022
1 parent a80d9ac commit 562da60
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,23 @@ class SpringFoxConfig extends ProjectMetadata {
}

private def filteredPaths(isDev: Boolean): Predicate[String] = {
val v2devPaths = Seq(
val v2Paths = Seq(
regex("/api/dataset.*"), regex("/api/schema.*"),
regex("/api/mappingTable.*"), regex("/api/properties.*"),
regex("/api/monitoring.*"), regex("/api/runs.*"),
regex("/api/user.*"), regex("/api/spark.*"),
regex("/api/configuration.*")
)
val v2prodPaths = Seq(
regex("/api/.*/importItem"),
regex("/api/.*/exportItem/.*")
)

val v3paths = Seq(
regex("/api-v3/datasets.*"), regex("/api-v3/schemas.*"),
regex("/api-v3/mapping-tables.*"), regex("/api-v3/property-definitions.*")
)

val paths: Seq[Predicate[String]] = if (isDev) {
v2devPaths ++ v3paths
v2Paths ++ v3paths
} else {
v2prodPaths ++ v3paths
v3paths
}

or[String](
Expand Down

0 comments on commit 562da60

Please sign in to comment.