Skip to content

Commit b73da52

Browse files
authored
docs: split contribution and usage (#423)
1 parent 265b3cb commit b73da52

26 files changed

+474
-472
lines changed

.github/.cache_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.0.9
1+
8.0.9.0.8

README.md

Lines changed: 7 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -10,44 +10,18 @@ nvm use && yarn
1010

1111
## Setup dev environment
1212

13-
You can also execute docker commands one by one, see [Docker commands](#docker)
14-
1513
```bash
1614
yarn docker:setup
1715
```
1816

19-
### Docker
20-
21-
#### Build
22-
23-
Build docker image from [Dockerfile](./Dockerfile)
24-
25-
[How to add a new client](https://api-clients-automation.netlify.app/docs/addNewClient) | [How to add a new language](https://api-clients-automation.netlify.app/docs/addNewLanguage) | [Common Test Suite](https://api-clients-automation.netlify.app/docs/commonTestSuite) | [Run the playground](https://api-clients-automation.netlify.app/docs/playground)
26-
27-
```bash
28-
yarn docker:build
29-
```
30-
31-
#### Mount
32-
33-
Mount docker image on `dev` container
34-
35-
```bash
36-
yarn docker:mount
37-
```
38-
39-
#### Clean
40-
41-
Stops `dev` container and clean the built image
42-
43-
```bash
44-
yarn docker:clean
45-
```
17+
[Read more on our documentation](https://api-clients-automation.netlify.app/docs/automation/setupRepository)
4618

4719
## Contributing
4820

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

23+
[Specs CLI commands](https://api-clients-automation.netlify.app/docs/automation/CLI/specsCommands)[Clients CLI commands](https://api-clients-automation.netlify.app/docs/automation/CLI/clientsCommands)[CTS CLI commands](https://api-clients-automation.netlify.app/docs/automation/CLI/ctsCommands)
24+
5125
### Build and validate specs
5226

5327
#### Usage
@@ -56,32 +30,7 @@ You can make changes locally and run commands through the docker container.
5630
yarn docker build specs <client | all>
5731
```
5832

59-
#### Build all specs
60-
61-
```bash
62-
yarn docker build specs
63-
```
64-
65-
#### Build specific spec
66-
67-
```bash
68-
yarn docker build specs recommend
69-
```
70-
71-
#### Fix the specs format
72-
73-
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:
74-
75-
```bash
76-
yarn specs:fix
77-
```
78-
79-
If you just want to check the format (not override the files), run:
80-
81-
```bash
82-
yarn specs:lint <client>
83-
yarn specs:lint search
84-
```
33+
[Read more on our documentation](https://api-clients-automation.netlify.app/docs/automation/addNewApiClient)
8534

8635
### Generate clients based on the [`specs`](./specs/)
8736

@@ -91,47 +40,11 @@ yarn specs:lint search
9140
yarn docker generate <language | all> <client | all>
9241
```
9342

94-
#### Generate all clients
95-
96-
```bash
97-
yarn docker generate
98-
```
99-
100-
### Generate specific client for specific language
101-
102-
#### Usage
103-
104-
```bash
105-
yarn docker build clients <language | all> <client | all>
106-
```
107-
108-
### Build specific client for specific language
109-
110-
```bash
111-
yarn docker build clients java recommend
112-
```
113-
114-
### Verbose command
115-
116-
You can add `-v` to almost every command to have a more verbose output.
117-
118-
### Interactive command
119-
120-
If you want to choose the language and client from a list you can add the `--interactive` option, or `-i`.
43+
[Read more on our documentation](https://api-clients-automation.netlify.app/docs/automation/addNewLanguage)
12144

12245
## Testing clients
12346

12447
You can test our generated clients by running:
12548

126-
- The playground [`playground`](./playground) ([Playground README](./docs/playground.md))
127-
- Tests with our [`Common Test Suite`](./tests/) ([CTS README](./docs/commonTestSuite.md)).
128-
129-
# Troubleshooting
130-
131-
> `Error: The operation couldn't be completed. Unable to locate a Java Runtime.`
132-
133-
Java is not located in your PATH, either source the right `.bash_profile`, `.zshrc`, etc. file or do the following command in this repository:
134-
135-
```bash
136-
echo 'export PATH="/usr/local/opt/openjdk/bin:$PATH"' > .bash_profile && source .bash_profile
137-
```
49+
- The playground [`playground`](./playground) ([Playground](https://api-clients-automation.netlify.app/docs/automation/testing/playground.md))
50+
- Tests with our [`Common Test Suite`](./tests/) ([Common Test Suite](https://api-clients-automation.netlify.app/docs/automation/testing/commonTestSuite.md)).

clients/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This folder hosts the generated clients.
44

5+
[Read more on our documentation](https://api-clients-automation.netlify.app/docs/clients/introduction)
6+
57
## Generated clients
68

79
### Java

clients/algoliasearch-client-javascript/README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,7 @@
1616
</p>
1717

1818
<p align="center">
19-
<a href="https://www.algolia.com/doc/api-client/getting-started/install/javascript/" target="_blank">Documentation</a> •
20-
<a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/" target="_blank">InstantSearch</a> •
21-
<a href="https://discourse.algolia.com" target="_blank">Community Forum</a> •
22-
<a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> •
23-
<a href="https://github.com/algolia/algoliasearch-client-javascript/issues" target="_blank">Report a bug</a> •
24-
<a href="https://www.algolia.com/doc/api-client/troubleshooting/faq/javascript/" target="_blank">FAQ</a> •
25-
<a href="https://www.algolia.com/support" target="_blank">Support</a>
19+
<a href="https://api-clients-automation.netlify.app/docs/clients/introduction" target="_blank">Documentation</a>
2620
</p>
2721

2822
# Contributing to this repository

docs/submodules.md

Lines changed: 0 additions & 77 deletions
This file was deleted.

netlify.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[build]
22
command="yarn website:build"
33
publish="website/build"
4-
ignore="git diff --quiet $COMMIT_REF $CACHED_COMMIT_REF -- website/ specs/bundled/"
4+
ignore="git diff --quiet origin/main -- website/"
55

66
[build.environment]
77
YARN_VERSION = "3.1.1"

scripts/ci/setRunVariables.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ const VARIABLES_TO_CHECK = [
4040
},
4141
{
4242
name: 'JS_CLIENT_CHANGED',
43-
path: [JS_CLIENT_FOLDER, `:!${JS_CLIENT_FOLDER}/.github`],
43+
path: [
44+
JS_CLIENT_FOLDER,
45+
`:!${JS_CLIENT_FOLDER}/.github`,
46+
`:!${JS_CLIENT_FOLDER}/README.md`,
47+
],
4448
},
4549
{
4650
name: 'JS_ALGOLIASEARCH_CHANGED',

specs/bundled/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ This folder hosts the bundled specs used to:
99
- Generate clients.
1010
- Generate documentation.
1111
- Share single readable spec file for a specific client.
12+
13+
[Read more on our documentation](https://api-clients-automation.netlify.app/docs/automation/introduction)

website/docs/addNewClient.md

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)