$ brew install composer # Install composer
$ composer install # Install dependencies
To be able to run the tests we have to ensure that we have a generated auto-loader. To generate the auto-loader use:
$ composer dump-autoload
$ composer test
$ composer format
The SDK depends on Target Open API. It uses Open API and the Open API generator
to generate the low level HTTP client.
To be able to use Target Open API
for code generation, we are leveraging Git subtree.
To import Target Open API
as openapi
folder please use commands:
$ git subtree add --prefix openapi git@github.com:adobe/target-openapi.git main --squash
To refresh the imported subtree use this command:
$ git subtree pull --prefix openapi git@github.com:adobe/target-openapi.git main --squash
Open API generator
is a Java application hence the code generation process requires a few tools besides Composer
:
- Java 8+
- NPM 6+
NPM is required since we are relying on openapi-generator-cli
.
Once all the tools are installed, there is no need to invoke them directly, everything is wrapped in a Composer
script, which can be invoked by running:
$ composer codegen
On Mac you might have to disable IPv6 to make composer work. See https://www.maximumbuilders.my/news/trouble-shooting-on-composer-timeout
Github Workflows don't run on forked repositories by default. You must enable GitHub Actions in the Actions tab of the forked repository.
See more details at https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories
Contributions are welcomed! Read the Contributing Guide for more information.
This project is licensed under the Apache V2 License. See LICENSE for more information.