This repo contains the API clients for MITx Online.
To generate clients locally for testing, run ./scripts/local-generate.sh. Optionally, provide BRANCH_NAME and GENERATOR_VERSION env vars.
To generate and package a client from a specific MITx Online branch, run:
./scripts/generate_branch_client.sh <branch-name>This will:
- Check out (or create) a matching branch in this repo
- Generate clients from the specified MITx Online branch via
local-generate.sh - Run
yarn installandyarn packto producepackage.tgz - Commit the generated client files (including
package.tgz) and optionally push the branch
Once pushed, the package is installable directly from GitHub:
yarn up @mitodl/mitxonline-api-axios@https://github.com/mitodl/mitxonline-api-clients/raw/refs/heads/<branch-name>/src/typescript/mitxonline-api-axios/package.tgzFor production, clients are generated in ol-infrastructure.