OpenBankProject / OpenBankProject/OBP-API
getAdapter Resource Docs returns wrong example successful response
Open
@simonredfern is already working on this.
Since Nov 8, 2017.
- Dominant language
- Scala
- Stars
- 1.7k
- Forks
- 482
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 15
Description
The resource doc returns usersJSONV200 but should return an example of Adapter
here's the current code:
resourceDocs += ResourceDoc(
getAdapter,
implementedInApiVersion,
"getAdapter",
"GET",
"/banks/BANK_ID/adapter",
"Get Info Of Adapter",
"""Get a basic Adapter info
|
|Login is required.
|
""".stripMargin,
emptyObjectJson,
usersJSONV200,
List(UserNotLoggedIn, UnknownError),
Catalogs(Core, notPSD2, notOBWG),
List(apiTagApi))
lazy val getAdapter: PartialFunction[Req, Box[User] => Box[JsonResponse]] = {
case "banks" :: BankId(bankId) :: "adapter" :: Nil JsonGet _ => {
user =>
for {
_ <- Bank(bankId) ?~! BankNotFound
ai: InboundAdapterInfo <- Connector.connector.vend.getAdapterInfo() ?~ "Not implemented"
}
yield {
successJsonResponseFromCaseClass(ai)
}
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.