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.
Note
Previous versions of the SDK core modules are available in maintenance mode in the legacy branch.
- Pluggable Architecture: Modular design with interchangeable HTTP transports and authentication mechanisms
- Async & Sync Support: Built-in CompletableFuture-based async transport alongside traditional synchronous APIs
- Auth Support: Different authentication models (OAuth 2.0, Basic Auth) with automatic token management
- Observability: Logging, request/response masking, and custom pipeline steps for monitoring or custom authentication models
- Type-Safe Code Generation: Automatic SDK generation from OpenAPI specifications and GraphQL schemas
Module | Purpose | Key Features |
---|---|---|
expediagroup-sdk-core | SDK foundation and utilities | HTTP abstractions, authentication, logging, pipeline architecture |
expediagroup-sdk-rest | REST API client framework | Request/response handling, operation patterns, REST-specific utilities |
expediagroup-sdk-graphql | GraphQL client framework | Apollo integration, type-safe operations |
expediagroup-sdk-transport-okhttp | HTTP transport layer | OkHttp-based transport, supporting both sync and async executions |
expediagroup-sdk-openapi-plugin | Code generation plugin | Gradle plugin for generating SDKs from OpenAPI specifications |
exemplar | Complete reference implementation | Full-featured demo with server, generated SDKs, and usage examples |
This repository provides the foundational modules to build Product SDKs for REST/GraphQL APIs in EG. Once you have initiailized a new SDK project for your API, you can add dependency on these foundational modules.
All product SDKs projects have to use Gradle as the main build tool. Most of the generation tasks are built for Gradle.
Add the core SDK modules to your project:
dependencies {
implementation 'com.expediagroup:expediagroup-sdk-rest:{latest-version}' // For REST SDK
implementation 'com.expediagroup:expediagroup-sdk-graphql:{latest-version}' // For GraphQL SDK
// HTTP transport (OkHttp-based)
implementation 'com.expediagroup:expediagroup-sdk-transport-okhttp:{latest-version}'
}
- Choose your API type: REST or GraphQL
- Review the exemplar: Complete working examples with server and client implementations
- Follow module guides: Each module contains detailed setup and usage instructions
- Explore demos: Check out the playground examples for practical patterns
Swap HTTP implementations without code changes - see transport documentation for details.
Currently, only OkHttp transport is supported. You may implement your own Transport interface using a different HTTP client. See exemplar-playground-java for custom transport examples.
Extensible request/response processing with custom steps - explore pipeline examples.
Use the OpenAPI plugin to generate type-safe REST clients from your API specifications.
Integrate with GraphQL module and Apollo Kotlin for type-safe GraphQL operations and schema-first development.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.