Skip to content

The OpenAPI specification for Mastercard Open Banking APIs (๐Ÿ‡บ๐Ÿ‡ธ), along with a suite of tests using a generated API client and the Test Drive sandbox.

License

Notifications You must be signed in to change notification settings

Mastercard/open-banking-us-openapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

open-banking-us-openapi

Overview

The OpenAPI specification for Open Banking APIs (๐Ÿ‡บ๐Ÿ‡ธ), along with a suite of tests 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 Open Banking APIs from your application:

Specification

YAML โค“ | Swagger Editor โฌˆ | Redoc โฌˆ

Tests

Things to Know ๐Ÿ‘‡

  • The test project 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 Mastercard Developers account is required to obtain your Partner ID, Partner Secret and App Key:

project

  • Before running the tests, you need a Customer ID. For that, follow Welcome Your First Customer or run the setup script. This script will call:
    • addTestingCustomer
    • generateConnectUrl (Connect Application). Simply open the URL, search for "FinBank Profiles - A" and add to your test customer all accounts from profile_03.
    • refreshCustomerAccounts

Run Tests Locally

  1. Clone this repository
  2. Run cd tests && mvn clean test -DpartnerId=*** -DpartnerSecret=*** -DappKey=*** -DcustomerId=***

Run Tests in GitHub

  1. Fork this repository
  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: โœ”๏ธ

What's Next?

The Open Banking API specification and a generated API client are the only things you need to call Open Banking APIs from your application.

Guidelines

When updating the Open Banking API specification:

  1. Ensure it can be rendered without errors in Swagger Editor or Redoc
  2. Ensure an API client can be generated using OpenAPI Generator
  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
    • Generate new tests by using true for generateApiTests in the POM file
    • Move the generated classes from /target/generated-sources/openapi/src/test/ to /src
    • Update the generated test methods

About

The OpenAPI specification for Mastercard Open Banking APIs (๐Ÿ‡บ๐Ÿ‡ธ), along with a suite of tests using a generated API client and the Test Drive sandbox.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published