refactor/tweaked the resourceDocs

This commit is contained in:
hongwei 2023-04-04 15:08:52 +02:00
parent 66fe397b58
commit 9933ebdae3
4 changed files with 16 additions and 9 deletions

View File

@ -4018,13 +4018,16 @@ object SwaggerDefinitionsJSON {
val atmAttributeResponseJsonV510 = AtmAttributeResponseJsonV510(
bank_id = bankIdExample.value,
atm_id = atmIdExample.value,
atm_attribute_id = "613c83ea-80f9-4560-8404-b9cd4ec42a7f",
name = "OVERDRAFT_START_DATE",
`type` = "DATE_WITH_DAY",
value = "2012-04-23",
is_active = Some(true)
atm_attribute_id = atmAttributeIdExample.value,
name = nameExample.value,
`type` = typeExample.value,
value = valueExample.value,
is_active = Some(activeExample.value.toBoolean)
)
val atmAttributesResponseJsonV510 = AtmAttributesResponseJsonV510(
List(atmAttributeResponseJsonV510)
)
val accountAttributeJson = AccountAttributeJson(
name = "OVERDRAFT_START_DATE",

View File

@ -858,6 +858,9 @@ object ExampleValue {
lazy val atmIdExample = ConnectorField("atme0352a-9a0f-4bfa-b30b-9003aa467f51","A string that MUST uniquely identify the ATM on this OBP instance.")
glossaryItems += makeGlossaryItem("atm_id", atmIdExample)
lazy val atmAttributeIdExample = ConnectorField("xxaf2a-9a0f-4bfa-b30b-9003aa467f51","A string that MUST uniquely identify the ATM Attribute on this OBP instance.")
glossaryItems += makeGlossaryItem("ATM.attribute_id", atmIdExample)
lazy val atmNameExample = ConnectorField("Atm by the Lake","The name of the ATM")
glossaryItems += makeGlossaryItem("ATM.name", atmNameExample)

View File

@ -9,6 +9,7 @@ import code.api.util.ApiTag._
import code.api.util.ErrorMessages.{$UserNotLoggedIn, BankNotFound, ConsentNotFound, InvalidJsonFormat, UnknownError, UserNotFoundByUserId, UserNotLoggedIn, _}
import code.api.util.{APIUtil, ApiRole, CallContext, CurrencyUtil, NewStyle, X509}
import code.api.util.NewStyle.HttpCode
import code.api.v3_0_0.JSONFactory300
import code.api.v3_0_0.JSONFactory300.createAggregateMetricJson
import code.api.v3_1_0.ConsentJsonV310
import code.api.v3_1_0.JSONFactory310.createBadLoginStatusJson
@ -374,7 +375,7 @@ trait APIMethods510 {
|
|""",
EmptyBody,
transactionAttributesResponseJson,
atmAttributesResponseJsonV510,
List(
$UserNotLoggedIn,
$BankNotFound,

View File

@ -360,8 +360,8 @@ object JSONFactory510 {
is_active = atmAttribute.isActive
)
def createAtmAttributesJson(bankAttributes: List[AtmAttribute]): AtmAttributesResponseJsonV510 =
AtmAttributesResponseJsonV510(bankAttributes.map(createAtmAttributeJson))
def createAtmAttributesJson(atmAttributes: List[AtmAttribute]): AtmAttributesResponseJsonV510 =
AtmAttributesResponseJsonV510(atmAttributes.map(createAtmAttributeJson))
}