Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Open
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
193 changes: 193 additions & 0 deletions client-api-and-mock-server/core-bank-api-clients/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@

# Generate clients
/generated-clients

### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### JEnv template
# JEnv local Java version configuration file
.java-version

# Used by previous versions of JEnv
.jenv-version

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Eclipse template
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# CDT- autotools
.autotools

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Annotation Processing
.apt_generated/
.apt_generated_test/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project

### Example user template template
### Example user template

# IntelliJ project files
.idea
*.iml
out
gen
### JDeveloper template
# default application storage directory used by the IDE Performance Cache feature
.data/

# used for ADF styles caching
temp/

# default output directories
classes/
deploy/
javadoc/

# lock file, a part of Oracle Credential Store Framework
cwallet.sso.lck
22 changes: 22 additions & 0 deletions client-api-and-mock-server/core-bank-api-clients/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Open Banking Clients
Open Banking API Documentation: https://openbankinguk.github.io/read-write-api-site3/v3.1.10/profiles/account-and-transaction-api-profile.html

## Overview
This project is used to generate the Open Banking Client Libraries used by the DBS integration services.

### How to generate the clients
If you have updated an existing specification or added a new, run the following command to generate the new client(s):

`mvn clean install -Pgenerate-clients`

Note: As the generated clients are stored in Git you are not required to run this command if you've made no changes.

### How to install the clients
To install the generated clients into you local Maven repository run:

`mvn clean install -Pinclude-clients`

> If you're facing error to generate java doc use this argument to skip api doc generation while installing artifacts `-Dmaven.javadoc.skip=true`

### Exercise
Generate the Payment Initiation API client from Open Banking API Spec [Open Banking API](https://github.com/OpenBankingUK/read-write-api-specs).
119 changes: 119 additions & 0 deletions client-api-and-mock-server/core-bank-api-clients/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.openbanking.api</groupId>
<artifactId>core-bank-api-clients</artifactId>
<version>1.0-SNAPSHOT</version>

<packaging>pom</packaging>

<name>Core Bank API :: Clients</name>
<description>Core Bank API Backend Java Client</description>

<properties>
<openapi-generator-maven-plugin.outputBaseDir>${project.basedir}/generated-clients
</openapi-generator-maven-plugin.outputBaseDir>
<openapi-generator-maven-plugin.library>resttemplate</openapi-generator-maven-plugin.library>
<openapi-generator-maven-plugin.java8>false</openapi-generator-maven-plugin.java8>
<openapi-generator-maven-plugin.dateLibrary>java8</openapi-generator-maven-plugin.dateLibrary>
<openapi-generator-maven-plugin.hideGenerationTimestamp>true
</openapi-generator-maven-plugin.hideGenerationTimestamp>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.openbanking.api.account</groupId>
<artifactId>account-info-openapi-client</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<profiles>
<profile>
<id>generate-clients</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filesets>
<fileset>
<directory>${openapi-generator-maven-plugin.outputBaseDir}</directory>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>5.2.1</version>
<executions>
<execution>
<id>generate-account-info-openapi-client</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<output>
${openapi-generator-maven-plugin.outputBaseDir}/account-info-openapi-client
</output>
<inputSpec>${project.basedir}/specs/account-info-openapi.yml</inputSpec>
<groupId>com.openbanking.api.account</groupId>
<artifactId>account-info-openapi-client</artifactId>
<artifactVersion>${project.version}</artifactVersion>
<generatorName>java</generatorName>
<skipValidateSpec>true</skipValidateSpec>
<generateApis>true</generateApis>
<generateApiTests>false</generateApiTests>
<generateModelTests>false</generateModelTests>
<configOptions>
<library>${openapi-generator-maven-plugin.library}</library>
<java8>${openapi-generator-maven-plugin.java8}</java8>
<dateLibrary>${openapi-generator-maven-plugin.dateLibrary}</dateLibrary>
<apiPackage>com.openbanking.api.clients.api</apiPackage>
<modelPackage>com.openbanking.api.clients.model</modelPackage>
<hideGenerationTimestamp>true</hideGenerationTimestamp>
<skipOverwrite>false</skipOverwrite>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>include-clients</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<inherited>false</inherited>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
<modules>
<module>generated-clients/account-info-openapi-client</module>
</modules>
</profile>
</profiles>

</project>
Loading