mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 16:56:56 +00:00
refactor/Update dynamic URL generation for resource documentation to differentiate between dynamic entity and endpoint
This commit is contained in:
parent
7f9c1e94c6
commit
dc385fa3e0
@ -246,11 +246,10 @@ trait ResourceDocsAPIMethods extends MdcLoggable with APIMethods220 with APIMeth
|
||||
val requestedApiVersion = ApiVersionUtils.valueOf(requestedApiVersionString)
|
||||
|
||||
val dynamicDocs = allDynamicResourceDocs
|
||||
.filter(rd => rd.implementedInApiVersion == requestedApiVersion)
|
||||
.map(it => it.specifiedUrl match {
|
||||
case Some(_) => it
|
||||
case _ =>
|
||||
it.specifiedUrl = Some(s"/${it.implementedInApiVersion.urlPrefix}/${requestedApiVersion.vDottedApiVersion}${it.requestUrl}")
|
||||
it.specifiedUrl = if (it.partialFunctionName.startsWith("dynamicEntity")) Some(s"/${it.implementedInApiVersion.urlPrefix}/${ApiVersion.`dynamic-entity`}${it.requestUrl}") else Some(s"/${it.implementedInApiVersion.urlPrefix}/${ApiVersion.`dynamic-endpoint`}${it.requestUrl}")
|
||||
it
|
||||
})
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user