Skip to content

algolia/api-clients-automation

Repository files navigation

api-clients-automation

Make sure to have Docker installed so you don't have to install the tooling for every API clients.

Setup repository tooling

nvm use && yarn

Setup dev environment

You can also execute docker commands one by one, see Docker commands

yarn docker:setup

Docker

Build

Build docker image from Dockerfile

yarn docker:build

Mount

Mount docker image on dev container

yarn docker:mount

Clean

Stops dev container and clean the built image

yarn docker:clean

Contributing

You can make changes locally and run commands through the docker container.

Build and validate specs

Usage

yarn docker build:specs <client | all>

Build all specs

yarn docker build:specs

Build specific spec

yarn docker build:specs recommend

Generate clients based on the specs

Usage

yarn docker generate <language | all> <client | all>

Generate all clients

yarn docker generate

Generate specific client for specific language

Usage

yarn docker build:clients <language | all> <client | all>

Build specific client for specific language

yarn docker build:clients java recommend

Testing clients

The clients can be tested inside the playground folder

Usage

yarn docker playground:<language>:<client>

JavaScript

yarn docker playground:js:search

Java

yarn docker playground:java:search

Troubleshooting

Error: The operation couldn't be completed. Unable to locate a Java Runtime.

Java is not located in your PATH, either source the right .bash_profile, .zshrc, etc. file or do the following command in this repository:

echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' > .bash_profile && source .bash_profile

About

🤖 Monorepo of the Algolia API specs and their auto-generated clients and documentation

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 69