Skip to content

Commit

Permalink
Renamed "Finicity" into "Mastercard Open Banking"
Browse files Browse the repository at this point in the history
  • Loading branch information
jaaufauvre committed Sep 25, 2023
1 parent 5fd7f12 commit c34983b
Show file tree
Hide file tree
Showing 42 changed files with 279 additions and 274 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/openapi-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: openapi-generators/[email protected]
with:
generator: java
openapi-file: finicity.yaml
openapi-file: openbanking-us.yaml
generator-tag: latest-release
- name: Create artifact
uses: actions/upload-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
uses: actions/checkout@v3
- name: Check YAML Prettified
run: |
npx prettier --check --single-quote --prose-wrap always finicity.yaml
npx prettier --check --single-quote --prose-wrap always openbanking-us.yaml
6 changes: 3 additions & 3 deletions .github/workflows/redoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
uses: actions/checkout@v3
- name: Generate Redoc static HTML
run: |
npx @redocly/cli build-docs finicity.yaml --output finicity.html
npx @redocly/cli build-docs openbanking-us.yaml --output openbanking-us.html
- name: Create artifact
uses: actions/upload-artifact@v3
with:
name: finicity.html
path: ./finicity.html
name: openbanking-us.html
path: ./openbanking-us.html
2 changes: 1 addition & 1 deletion .github/workflows/swagger-editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- name: Validate OpenAPI definition
uses: char0n/[email protected]
with:
definition-file: finicity.yaml
definition-file: openbanking-us.yaml
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# finicity-openapi
[![](./res/logo.png)](https://www.finicity.com/#gh-light-mode-only)
[![](./res/logo-dark.png)](https://www.finicity.com/#gh-dark-mode-only)
# open-banking-us-openapi
[![](./res/logo.png)](https://developer.mastercard.com/product/open-banking/#gh-light-mode-only)
[![](./res/logo-dark.png)](https://developer.mastercard.com/product/open-banking/#gh-dark-mode-only)

## Overview

The OpenAPI specification for [Finicity APIs](https://docs.finicity.com/) (🇺🇸), along with a suite of [tests](./tests/src/test/java/com/mastercard/finicity/client/api) using a generated API client and the [Finicity Test Drive](https://signup.finicity.com/).
The OpenAPI specification for [Open Banking APIs](https://developer.mastercard.com/open-banking-us/documentation) (🇺🇸), along with a suite of [tests](./tests/src/test/java/com/mastercard/openbanking/client/api) using a generated API client and the Test Drive plan.

## Workflows

The following workflows ensure the API specification stays in good shape and can be used to consume the Finicity APIs from your application:
The following workflows ensure the API specification stays in good shape and can be used to consume the Open Banking APIs from your application:

[![](https://github.com/Mastercard/finicity-openapi/actions/workflows/prettier.yml/badge.svg)](https://github.com/Mastercard/finicity-openapi/actions/workflows/prettier.yml)
[![](https://github.com/Mastercard/finicity-openapi/actions/workflows/swagger-editor.yml/badge.svg)](https://github.com/Mastercard/finicity-openapi/actions/workflows/swagger-editor.yml)
[![](https://github.com/Mastercard/finicity-openapi/actions/workflows/redoc.yml/badge.svg)](https://github.com/Mastercard/finicity-openapi/actions/workflows/redoc.yml)
[![](https://github.com/Mastercard/finicity-openapi/actions/workflows/openapi-generator.yml/badge.svg)](https://github.com/Mastercard/finicity-openapi/actions/workflows/openapi-generator.yml)
[![](https://github.com/Mastercard/finicity-openapi/actions/workflows/tests.yml/badge.svg)](https://github.com/Mastercard/finicity-openapi/actions/workflows/tests.yml)
[![](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/prettier.yml/badge.svg)](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/prettier.yml)
[![](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/swagger-editor.yml/badge.svg)](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/swagger-editor.yml)
[![](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/redoc.yml/badge.svg)](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/redoc.yml)
[![](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/openapi-generator.yml/badge.svg)](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/openapi-generator.yml)
[![](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/tests.yml/badge.svg)](https://github.com/Mastercard/open-banking-us-openapi/actions/workflows/tests.yml)

## Specification
[YAML ⤓](./finicity.yaml) | [Swagger Editor ⬈](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FMastercard%2Ffinicity-openapi%2Fmain%2Ffinicity.yaml) | [Redoc ⬈](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/Mastercard/finicity-openapi/main/finicity.yaml&nocors)
[YAML ⤓](./openbanking-us.yaml) | [Swagger Editor ⬈](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FMastercard%2Fopen-banking-us-openapi%2Fmain%2Fopenbanking-us.yaml) | [Redoc ⬈](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/Mastercard/open-banking-us-openapi/main/openbanking-us.yaml&nocors)

## Tests
### Things to Know :point_down:

* The [test project](./tests) generates an API client library from the API specification like you would do in a real application (OpenAPI Generator is used for that)
* A [free Open Banking account](https://signup.finicity.com/) is required to obtain your **Partner ID**, **Partner Secret** and **App Key**:
* A [free Open Banking account](https://developer.mastercard.com/product/open-banking) is required to obtain your **Partner ID**, **Partner Secret** and **App Key**:

![project](https://user-images.githubusercontent.com/3964455/221236073-5661d083-0a04-4d46-9710-3c0c8c9e9a6a.gif)

* Before running the tests, you need a **Customer ID**. For that, follow [Welcome Your First Customer](https://mstr.cd/3Z5de0Q) or run the [setup script](./bin/). This script will call:
* `addTestingCustomer`
* `generateConnectUrl` ([Finicity Connect](https://docs.finicity.com/)). Simply open the URL, search for "FinBank Profiles - A" and add to your test customer all accounts from [`profile_03`](https://docs.finicity.com/test-the-apis/#bank-account-profiles).
* `generateConnectUrl` ([Connect Application](https://developer.mastercard.com/open-banking-us/documentation/connect/)). Simply open the URL, search for "FinBank Profiles - A" and add to your test customer all accounts from [`profile_03`](https://developer.mastercard.com/open-banking-us/documentation/test-the-apis/#bank-account-profiles).
* `refreshCustomerAccounts`

<p align="center">
Expand All @@ -45,26 +45,26 @@ The following workflows ensure the API specification stays in good shape and can

### Run Tests in GitHub

1. [Fork this repository](https://github.com/Mastercard/finicity-openapi/fork)
1. [Fork this repository](https://github.com/Mastercard/open-banking-us-openapi/fork)
2. Go to _Settings_ > _Secrets_ > _Actions_
3. Create new repository secrets: `PARTNER_ID`, `PARTNER_SECRET` and `APP_KEY`
4. Enable workflows in the _Actions_ tab
5. Click _Run workflow_ under _API Client Tests_. Expected result: :heavy_check_mark:

## What's Next?

The [Finicity API specification](./finicity.yaml) and a [generated API client](./tests) are the only things you need to call Finicity from your application.
The [Open Banking API specification](./openbanking-us.yaml) and a [generated API client](./tests) are the only things you need to call Open Banking APIs from your application.

* For other software development frameworks and languages, see: OpenAPI Generator > [Generators List](https://openapi-generator.tech/docs/generators).
* You may also be interested in trying our [Postman collection](https://github.com/Mastercard/finicity-postman).
* You may also be interested in trying our [Postman collection](https://github.com/Mastercard/open-banking-us-postman).

## Guidelines

When updating the Finicity API specification:
1. Ensure it can be rendered without errors in [Swagger Editor](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FFY-Dev-Relations%2Ffinicity-openapi%2Fmain%2Ffinicity.yaml) or [Redoc](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/Mastercard/finicity-openapi/main/finicity.yaml&nocors)
When updating the Open Banking API specification:
1. Ensure it can be rendered without errors in [Swagger Editor](https://editor.swagger.io/?url=https%3A%2F%2Fraw.githubusercontent.com%2FMastercard%2Fopen-banking-us-openapi%2Fmain%2Fopenbanking-us.yaml) or [Redoc](https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/Mastercard/open-banking-us-openapi/main/openbanking-us.yaml&nocors)
2. Ensure an API client can be generated using [OpenAPI Generator](https://openapi-generator.tech/)
3. Prettify the YAML using `npx prettier --write --single-quote --prose-wrap always finicity.yaml`
3. Prettify the YAML using `npx prettier --write --single-quote --prose-wrap always openbanking-us.yaml`
4. Update and/or add tests to the [test project](./tests)
* Generate new tests by using `true` for `generateApiTests` in the [POM file](./tests/pom.xml)
* Move the generated classes from `/target/generated-sources/openapi/src/test/` to [`/src`](./tests/src/test/java/com/mastercard/finicity/client/api)
* Move the generated classes from `/target/generated-sources/openapi/src/test/` to [`/src`](./tests/src/test/java/com/mastercard/openbanking/client/api)
* Update the generated test methods
10 changes: 5 additions & 5 deletions bin/setup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ Write-Output "PARTNER_ID: $PartnerId"
Write-Output "PARTNER_SECRET: $PartnerSecret"

Write-Host "`r`nTo run the API client tests:`r`n" -ForegroundColor Yellow
Write-Output "git clone https://github.com/Mastercard/finicity-openapi"
Write-Output "cd finicity-openapi/tests"
Write-Output "git clone https://github.com/Mastercard/open-banking-us-openapi"
Write-Output "cd open-banking-us-openapi-openapi/tests"
Write-Output "mvn clean test -DpartnerId=$PartnerId -DpartnerSecret=$PartnerSecret -DappKey=$AppKey -DcustomerId=$CustomerId"

Write-Host "`r`nTo run the Postman Collection:`r`n" -ForegroundColor Yellow
Write-Output "git clone https://github.com/Mastercard/finicity-postman"
Write-Output "cd finicity-postman"
Write-Output "npx newman run finicity.postman_collection.json --env-var partnerId=$PartnerId --env-var partnerSecret=$PartnerSecret --env-var appKey=$AppKey --env-var customerId=$CustomerId --folder 'All APIs'"
Write-Output "git clone https://github.com/Mastercard/open-banking-us-postman"
Write-Output "cd open-banking-us-postman"
Write-Output "npx newman run openbanking-us.postman_collection.json --env-var partnerId=$PartnerId --env-var partnerSecret=$PartnerSecret --env-var appKey=$AppKey --env-var customerId=$CustomerId --folder 'All APIs'"
EnterToExit
10 changes: 5 additions & 5 deletions bin/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ echo ""

echo "To run the API client tests:"
echo ""
echo "git clone https://github.com/Mastercard/finicity-openapi"
echo "cd finicity-openapi/tests"
echo "git clone https://github.com/Mastercard/open-banking-us-openapi"
echo "cd open-banking-us-openapi/tests"
echo "mvn clean test -DpartnerId="$1" -DpartnerSecret="$2" -DappKey="$3" -DcustomerId="$customer_id""
echo ""

echo "To run the Postman Collection:"
echo ""
echo "git clone https://github.com/Mastercard/finicity-postman"
echo "cd finicity-postman"
echo "npx newman run finicity.postman_collection.json --env-var partnerId="$1" --env-var partnerSecret="$2" --env-var appKey="$3" --env-var customerId="$customer_id" --folder 'All APIs'"
echo "git clone https://github.com/Mastercard/open-banking-us-postman"
echo "cd open-banking-us-postman"
echo "npx newman run openbanking-us.postman_collection.json --env-var partnerId="$1" --env-var partnerSecret="$2" --env-var appKey="$3" --env-var customerId="$customer_id" --folder 'All APIs'"
echo ""

enter_to_exit
File renamed without changes.
12 changes: 6 additions & 6 deletions tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.mastercard</groupId>
<artifactId>finicity-tests</artifactId>
<artifactId>openbanking-tests</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
Expand Down Expand Up @@ -102,16 +102,16 @@
<version>6.6.0</version>
<executions>
<execution>
<id>finicity-client-generation</id>
<id>openbanking-client-generation</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>${project.basedir}/../finicity.yaml</inputSpec>
<inputSpec>${project.basedir}/../openbanking-us.yaml</inputSpec>
<generatorName>java</generatorName>
<artifactId>com.mastercard.finicity.client</artifactId>
<apiPackage>com.mastercard.finicity.client.api</apiPackage>
<modelPackage>com.mastercard.finicity.client.model</modelPackage>
<artifactId>com.mastercard.openbanking.client</artifactId>
<apiPackage>com.mastercard.openbanking.client.api</apiPackage>
<modelPackage>com.mastercard.openbanking.client.model</modelPackage>
<generateModelTests>false</generateModelTests>
<generateApiTests>false</generateApiTests>
<configOptions>
Expand Down
10 changes: 5 additions & 5 deletions tests/src/main/java/client/api/CustomBalanceAnalyticsApi.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package client.api;

import com.google.gson.reflect.TypeToken;
import com.mastercard.finicity.client.ApiClient;
import com.mastercard.finicity.client.ApiException;
import com.mastercard.finicity.client.ApiResponse;
import com.mastercard.finicity.client.api.BalanceAnalyticsApi;
import com.mastercard.finicity.client.model.ObbAnalyticsReport;
import com.mastercard.openbanking.client.ApiClient;
import com.mastercard.openbanking.client.ApiException;
import com.mastercard.openbanking.client.ApiResponse;
import com.mastercard.openbanking.client.api.BalanceAnalyticsApi;
import com.mastercard.openbanking.client.model.ObbAnalyticsReport;
import okhttp3.Call;
import okhttp3.Request;

Expand Down
10 changes: 5 additions & 5 deletions tests/src/main/java/client/api/CustomCashFlowAnalyticsApi.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package client.api;

import com.google.gson.reflect.TypeToken;
import com.mastercard.finicity.client.ApiClient;
import com.mastercard.finicity.client.ApiException;
import com.mastercard.finicity.client.ApiResponse;
import com.mastercard.finicity.client.api.CashFlowAnalyticsApi;
import com.mastercard.finicity.client.model.ObbAnalyticsReport;
import com.mastercard.openbanking.client.ApiClient;
import com.mastercard.openbanking.client.ApiException;
import com.mastercard.openbanking.client.ApiResponse;
import com.mastercard.openbanking.client.api.CashFlowAnalyticsApi;
import com.mastercard.openbanking.client.model.ObbAnalyticsReport;
import okhttp3.Call;
import okhttp3.Request;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.mastercard.finicity.client.api;
package com.mastercard.openbanking.client.api;

import com.mastercard.finicity.client.ApiException;
import com.mastercard.finicity.client.model.MicroDepositVerification;
import com.mastercard.finicity.client.test.BaseTest;
import com.mastercard.finicity.client.test.ModelFactory;
import com.mastercard.openbanking.client.ApiException;
import com.mastercard.openbanking.client.model.MicroDepositVerification;
import com.mastercard.openbanking.client.test.BaseTest;
import com.mastercard.openbanking.client.test.ModelFactory;
import org.junit.jupiter.api.Test;

import java.util.Arrays;
Expand Down
Loading

0 comments on commit c34983b

Please sign in to comment.