The Expedia Group Java SDK Foundations provides the core components and tools for building and maintaining our SDK libraries. These foundations enable developers to create consistent, high-quality Java SDKs that interact with the Expedia Group platform.
The following SDKs are built using the Expedia Group Java SDK Foundations, and are available for public use:
SDK | Maven | Documentation |
---|---|---|
Rapid SDK | Rapid SDK on Developer Hub | |
EWS XAP SDK | Developer Hub for XAP |
More SDKs will be added to this list as they are developed and released.
The foundations includes the following components:
- SDK Core: Core libraries and utilities shared across all Java SDKs
- SDK Generators: Tools for generating SDK code based on OpenAPI specifications (OAS3).
- SDK Tests: Shared testing frameworks and utilities for validating SDK functionality.
- GitHub Actions: Reusable workflows for SDK repositories to automate common tasks like building, testing, releasing, and publishing SDKs.
To generate a new SDK, ensure you have the following:
- OpenAPI Specification for the API you wish to generate an SDK for.
- Use the Spec Transformer if transformation is required. Learn more about the Spec Transformation process.
- Java Development Kit (JDK) version 8 or later.
- Maven version 3.8.0 or later. It's recommended to use the embedded Maven wrapper located in /.mvn/wrapper.
Follow these steps to generate an SDK:
-
Clone this repository:
git clone https://github.com/ExpediaGroup/expediagroup-java-sdk.git cd expediagroup-java-sdk
-
Build the SDK Generator:
cd generator/openapi mvn clean install
-
Run the SDK Generator:
../../mvnw exec:java
This will generate a sample SDK in the
target/sdk
directory. -
Build the generated SDK:
cd target/sdk ../../../mvnw clean install
Refer to the SDK Generator documentation for more details on how to generate an SDK, customize the generation process, and generate SDK documentation.
The generated SDKs will be placed in the specified output directory. You can integrate them into your Java application by adding the SDK as a dependency.
Add the following to your pom.xml
:
<dependency>
<groupId>com.expediagroup</groupId>
<artifactId>your-sdk-name</artifactId>
<version>x.y.z</version>
</dependency>
Add the following to your build.gradle
file:
implementation 'com.expediagroup:your-sdk-name:x.y.z'
Replace your-sdk-name
and x.y.z
with the appropriate SDK name and version.
Leverage the provided self-serve GitHub Actions workflows to automate the process of generating, releasing, and publishing SDKs to:
- A GitHub repository
- Maven Central for public availability
The toolkit currently supports generating SDKs targeting Java 8 and later versions.
- Toolkit Issues: For problems specific to the SDK toolkit, please open an issue in this repository.
- SDK-Specific Questions: For issues related to specific SDKs, refer to the respective repository for support and documentation.
We welcome contributions to improve this toolkit! Please review our CONTRIBUTING guidelines before submitting issues or pull requests.
This project is licensed under the Apache License 2.0. For more details, see the LICENSE file.