avioconsulting / mule-deploy-library

BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Enhancement: Manage API Contracts #44

Open TimGonz-AVIO opened 1 year ago

TimGonz-AVIO commented 1 year ago

We should add a Feature to the mule-deploy-library that can create contracts between our published application and any applications it may need to call. This should be managed in a stand-alone (not attached to a deployment plane such as cloudHubDeployment) block that looks like the following:

contracts {
    clientApplicationName "my-new-api-client"
    exchangeIdsToContractWith ([
            "my-cool-api",
            "the-problem-api"
    ] as LinkedList)
}

We should discuss if clientApplicationName will automatically receive an environment specific suffix or will need to be passed with the appropriate suffix (such as using string interpolation to populate the environment).

@TimGonz-AVIO has already done some work around this, he can get you a copy of a customer fork of this repo that has the code he wrote to accomplish this task.

TimGonz-AVIO commented 1 year ago

This effort will be blocked until Mulesoft fixes one of the API calls due client credential auth always throwing an unauthorized error.

Get all contracts (either endpoint):