This repository is a sample project that demonstrates how to publish a TypeScript SDK to a git repository using the APIMatic CLI. It serves as a source of truth for API specifications and publishes the generated SDK to the apimatic/sample-customized-typescript-sdk repository.
src/- Source code organization:sdk-source-tree/- SDK customizationsspec/- Specification configuration
.github/workflows/sdk-publish.yaml- SDK publish workflow
The Sdk Publish workflow publishes TypeScript SDK to a git repository using the APIMatic CLI. It is triggered manually from GitHub Actions with a version input.
The following secrets have been configured in the repository settings to enable the workflow:
- Type: APIMatic API Key
- Purpose: Authenticates with the APIMatic CLI to access SDK publish services
- Setup: Obtain from your APIMatic account dashboard
The following customizations have been applied to the generated SDK in the apimatic/sample-customized-typescript-sdk repository:
- Add a new GitHub workflow to save customizations: Adds a GitHub Actions workflow to save SDK customizations across regenerations.
- Add unit tests for API calls: Adds unit tests to validate the behavior of API calls in the SDK.
- Add a new flow to chain API calls: Introduces a reusable flow that chains multiple API calls.
- Implement custom authentication: Implements a custom authentication mechanism to support non-standard auth schemes.
- Add custom signature verifier to webhook manager: Adds a custom signature verifier to the webhook manager for enhanced security.
- Add API lifecycle hooks: Introduces lifecycle hooks to intercept and customize API request and response handling.