Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,445 changes: 760 additions & 685 deletions obp-api/src/main/scala/code/api/ResourceDocs1_4_0/SwaggerDefinitionsJSON.scala

Large diffs are not rendered by default.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import com.openbankproject.commons.model.ListResult
import code.util.Helper.MdcLoggable
import net.liftweb.common.Box.tryo
import net.liftweb.common.{EmptyBox, Full}
import net.liftweb.http.provider.HTTPParam
import net.liftweb.json

import scala.collection.GenTraversableLike
Expand Down Expand Up @@ -867,7 +868,7 @@ object SwaggerJSONFactory extends MdcLoggable {
case Some(v) => getNestedRefEntities(v, excludeTypes)
case Full(v) => getNestedRefEntities(v, excludeTypes)
case coll: Coll[_] => coll.toList.flatMap(getNestedRefEntities(_, excludeTypes))
case v if(! ReflectUtils.isObpObject(v)) => Nil
case v if(! ReflectUtils.isObpObject(v) && !obj.isInstanceOf[HTTPParam]) => Nil
case _ => {
val entityType = ReflectUtils.getType(obj)
val constructorParamList = ReflectUtils.getPrimaryConstructor(entityType).paramLists.headOption.getOrElse(Nil)
Expand Down
14 changes: 10 additions & 4 deletions obp-api/src/main/scala/code/api/util/ExampleValue.scala
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ object ExampleValue {
lazy val issExample = ConnectorField("String","The Issuer Identifier for the Issuer of the response.")
lazy val audExample = ConnectorField("String","Identifies the audience that this ID token is intended for. It must be one of the OBP-API client IDs of your application.")
lazy val jtiExample = ConnectorField("String","(JWT ID) claim provides a unique identifier for the JWT.")
lazy val iatExample = ConnectorField("String","The iat (issued at) claim identifies the time at which the JWT was issued. Represented in Unix time (integer seconds).")
lazy val nbfExample = ConnectorField("String","The nbf (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing. Represented in Unix time (integer seconds).")
lazy val expExample = ConnectorField("String","The exp (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. Represented in Unix time (integer seconds).")
lazy val iatExample = ConnectorField("60","The iat (issued at) claim identifies the time at which the JWT was issued. Represented in Unix time (integer seconds).")
lazy val nbfExample = ConnectorField("60","The nbf (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing. Represented in Unix time (integer seconds).")
lazy val expExample = ConnectorField("60","The exp (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. Represented in Unix time (integer seconds).")
lazy val emailVerifiedExample = ConnectorField("String","If the email is verified or not.")

lazy val emailExample = ConnectorField(s"${userNameExample.value}@example.com", "An email address.")
Expand Down Expand Up @@ -1010,7 +1010,13 @@ object ExampleValue {
lazy val toTransferToAtmExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
glossaryItems += makeGlossaryItem("to_transfer_to_atm", toTransferToAtmExample)

lazy val jwtExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
lazy val jwtExample = ConnectorField("eyJhbGciOiJIUzI1NiJ9.eyJlbnRpdGxlbWVudHMiOltdLCJjcmVhdGVkQnlVc2VySWQiOiJhYjY1Mz" +
"lhOS1iMTA1LTQ0ODktYTg4My0wYWQ4ZDZjNjE2NTciLCJzdWIiOiIyMWUxYzhjYy1mOTE4LTRlYWMtYjhlMy01ZTVlZWM2YjNiNGIiLCJhdWQiOiJ" +
"lanpuazUwNWQxMzJyeW9tbmhieDFxbXRvaHVyYnNiYjBraWphanNrIiwibmJmIjoxNTUzNTU0ODk5LCJpc3MiOiJodHRwczpcL1wvd3d3Lm9wZW5i" +
"YW5rcHJvamVjdC5jb20iLCJleHAiOjE1NTM1NTg0OTksImlhdCI6MTU1MzU1NDg5OSwianRpIjoiMDlmODhkNWYtZWNlNi00Mzk4LThlOTktNjYxMW" +
"ZhMWNkYmQ1Iiwidmlld3MiOlt7ImFjY291bnRfaWQiOiJtYXJrb19wcml2aXRlXzAxIiwiYmFua19pZCI6ImdoLjI5LnVrLngiLCJ2aWV3X2lkIjoi" +
"b3duZXIifSx7ImFjY291bnRfaWQiOiJtYXJrb19wcml2aXRlXzAyIiwiYmFua19pZCI6ImdoLjI5LnVrLngiLCJ2aWV3X2lkIjoib3duZXIifV19." +
"8cc7cBEf2NyQvJoukBCmDLT7LXYcuzTcSYLqSpbxLp4","JSON Web Token")
glossaryItems += makeGlossaryItem("jwt", jwtExample)

lazy val requestedCurrentValidEndDateExample = ConnectorField(NoExampleProvided,NoDescriptionProvided)
Expand Down
4 changes: 2 additions & 2 deletions obp-api/src/main/scala/code/api/v5_1_0/APIMethods510.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ trait APIMethods510 {
|
""".stripMargin,
EmptyBody,
consentsJsonV400,
consentsInfoJsonV510,
List(
$UserNotLoggedIn,
$BankNotFound,
Expand Down Expand Up @@ -1571,7 +1571,7 @@ trait APIMethods510 {
|
""".stripMargin,
EmptyBody,
consentsJsonV400,
consentsInfoJsonV510,
List(
$UserNotLoggedIn,
$BankNotFound,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ object JSONFactory510 extends CustomJsonFormats {
def createConsentsJsonV510(consents: List[MappedConsent]): ConsentsJsonV510 = {
ConsentsJsonV510(
consents.map { c =>
val jwtPayload: Box[ConsentJWT] = JwtUtil.getSignedPayloadAsJson(c.jsonWebToken).map(parse(_).extract[ConsentJWT])
val jwtPayload = JwtUtil.getSignedPayloadAsJson(c.jsonWebToken).map(parse(_).extract[ConsentJWT]).toOption
AllConsentJsonV510(
consent_reference_id = c.consentReferenceId,
consumer_id = c.consumerId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2349,7 +2349,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -2514,7 +2514,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -2865,7 +2865,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -2971,7 +2971,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -3143,7 +3143,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -3228,7 +3228,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -3899,7 +3899,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -4171,7 +4171,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down Expand Up @@ -4272,7 +4272,7 @@ trait RabbitMQConnector_vOct2024 extends Connector with MdcLoggable {
amount=amountExample.value),
creditorAccount=PaymentAccount("string"),
creditorName="string")),
to_agent=Some( transactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
to_agent=Some( TransactionRequestAgentCashWithdrawal(bank_id=bank_idExample.value,
agent_number="string")),
value= AmountOfMoney(currency=currencyExample.value,
amount=amountExample.value),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ class MappedTransactionRequest extends LongKeyedMapper[MappedTransactionRequest]
agentNumber
val agentNumberValue = if (agentNumberList.isEmpty) "" else agentNumberList.head
val bankIdValue = if (bankIdList.isEmpty) "" else bankIdList.head
Some(transactionRequestAgentCashWithdrawal(
Some(TransactionRequestAgentCashWithdrawal(
bank_id = bankIdValue,
agent_number = agentNumberValue
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ object RegulatedEntityTraitCommons extends Converter[RegulatedEntityTrait, Regul
case class TransactionRequestCounterpartyId (counterparty_id : String)

//For AGENT_CASH_WITHDRAWAL, it needs the agent_number to find the toAgent--> toBankAccount
case class transactionRequestAgentCashWithdrawal (bank_id: String , agent_number : String)
case class TransactionRequestAgentCashWithdrawal (bank_id: String , agent_number : String)

case class TransactionRequestSimple (
otherBankRoutingScheme: String,
Expand Down Expand Up @@ -1026,7 +1026,7 @@ case class TransactionRequestBodyAllTypes (
@optional
to_sepa_credit_transfers: Option[SepaCreditTransfers]= None,//TODO not stable, from berlin Group
@optional
to_agent: Option[transactionRequestAgentCashWithdrawal]= None,
to_agent: Option[TransactionRequestAgentCashWithdrawal]= None,

value: AmountOfMoney,
description: String
Expand Down
Loading