mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 17:37:00 +00:00
Merge pull request #2110 from hongwei1/develop
feature/added the new version CNBV9
This commit is contained in:
commit
800bdb589c
@ -168,7 +168,7 @@ object APIMethods_AtmsApi extends RestHelper {
|
||||
s"""${mockedDataText(false)}
|
||||
Gets a list of all ATM objects.
|
||||
""",
|
||||
emptyObjectJson,
|
||||
EmptyBody,
|
||||
getMxAtmsResponseJson,
|
||||
List(UserNotLoggedIn, UnknownError),
|
||||
ApiTag("ATM") :: apiTagMXOpenFinance :: Nil
|
||||
@ -197,8 +197,8 @@ object APIMethods_AtmsApi extends RestHelper {
|
||||
s"""${mockedDataText(false)}
|
||||
Gets header information on the current set of ATM data
|
||||
""",
|
||||
emptyObjectJson,
|
||||
emptyObjectJson,
|
||||
EmptyBody,
|
||||
EmptyBody,
|
||||
List(
|
||||
UserNotLoggedIn,
|
||||
ConsentNotFound,
|
||||
|
||||
66
obp-api/src/main/scala/code/api/MxOF/CNBV9/CNBV9_1_0_0.scala
Normal file
66
obp-api/src/main/scala/code/api/MxOF/CNBV9/CNBV9_1_0_0.scala
Normal file
@ -0,0 +1,66 @@
|
||||
/**
|
||||
* Open Bank Project - API
|
||||
* Copyright (C) 2011-2022, TESOBE GmbH
|
||||
**
|
||||
*This program is free software: you can redistribute it and/or modify
|
||||
*it under the terms of the GNU Affero General Public License as published by
|
||||
*the Free Software Foundation, either version 3 of the License, or
|
||||
*(at your option) any later version.
|
||||
**
|
||||
*This program is distributed in the hope that it will be useful,
|
||||
*but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
*GNU Affero General Public License for more details.
|
||||
**
|
||||
*You should have received a copy of the GNU Affero General Public License
|
||||
*along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
**
|
||||
*Email: contact@tesobe.com
|
||||
*TESOBE Ltd
|
||||
*Osloerstrasse 16/17
|
||||
*Berlin 13359, Germany
|
||||
**
|
||||
*This product includes software developed at
|
||||
*TESOBE (http://www.tesobe.com/)
|
||||
* by
|
||||
*Simon Redfern : simon AT tesobe DOT com
|
||||
*Stefan Bethge : stefan AT tesobe DOT com
|
||||
*Everett Sochowski : everett AT tesobe DOT com
|
||||
*Ayoub Benali: ayoub AT tesobe DOT com
|
||||
*
|
||||
*/
|
||||
package code.api.MxOF.CNBV9
|
||||
|
||||
import code.api.MxOF.APIMethods_AtmsApi
|
||||
import code.api.OBPRestHelper
|
||||
import code.api.util.APIUtil.{OBPEndpoint, ResourceDoc, getAllowedEndpoints}
|
||||
import code.api.util.ScannedApis
|
||||
import code.util.Helper.MdcLoggable
|
||||
import com.openbankproject.commons.util.ScannedApiVersion
|
||||
|
||||
import scala.collection.mutable.ArrayBuffer
|
||||
|
||||
|
||||
/*
|
||||
This file defines which endpoints from all the versions are available in v1
|
||||
*/
|
||||
object CNBV9_1_0_0 extends OBPRestHelper with MdcLoggable with ScannedApis {
|
||||
// CNBV9
|
||||
override val apiVersion = ScannedApiVersion("CNBV9", "CNBV9", "v1.0.0")
|
||||
val versionStatus = "DRAFT"
|
||||
|
||||
private[this] val endpoints = APIMethods_AtmsApi.endpoints
|
||||
override val allResourceDocs: ArrayBuffer[ResourceDoc] = APIMethods_AtmsApi.resourceDocs.map(
|
||||
resourceDoc => resourceDoc.copy(implementedInApiVersion = apiVersion)
|
||||
)
|
||||
|
||||
// Filter the possible endpoints by the disabled / enabled Props settings and add them together
|
||||
override val routes : List[OBPEndpoint] = getAllowedEndpoints(endpoints, allResourceDocs)
|
||||
|
||||
// Make them available for use!
|
||||
routes.foreach(route => {
|
||||
registerRoutes(routes, allResourceDocs, apiPrefix)
|
||||
})
|
||||
|
||||
logger.info(s"version $version has been run! There are ${routes.length} routes.")
|
||||
}
|
||||
@ -20,6 +20,6 @@ class ApiVersionUtilsTest extends V400ServerSetup {
|
||||
versions.map(version => ApiVersionUtils.valueOf(version.fullyQualifiedVersion))
|
||||
|
||||
//NOTE, when we added the new version, better fix this number manually. and also check the versions
|
||||
versions.length shouldBe(23)
|
||||
versions.length shouldBe(24)
|
||||
}}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user