Skip to content

algolia/api-clients-automation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

How to add a new client | How to add a new language | Common Test Suite | Run the playground

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

Fix the specs format

This is used by the build script and should not need to be called manually but if you want to format all specs file do:

yarn specs:fix

If you just want to check the format (not override the files), run:

yarn specs:lint <client> yarn specs:lint search

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

Verbose command

You can add -v to almost every command to have a more verbose output.

Interactive command

If you want to choose the language and client from a list you can add the --interactive option, or -i.

Testing clients

You can test our generated clients by running:

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 68