You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/addNewClient.md
+32-24Lines changed: 32 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,33 @@ Adding a client requires a few manual steps in order to setup the tooling, gener
4
4
5
5
> See [README](../README.md) to `setup the repository tooling` and `setup dev environment`.
6
6
7
-
## Configuring the environment
7
+
## 1. Writing specs
8
8
9
-
After setting up the dev environment from [README](../README.md), you need to update the configuration files to properly generate clients that are maintainable.
9
+
We recommend to have a look at [existing spec files](../specs/). The `bundled` folder is automatically generated, manual changes shouldn't be done in these files.
10
+
11
+
### [common spec folder](../specs/common/)
12
+
13
+
Properties that are common to Algolia or used in multiple clients.
14
+
15
+
### <clientName> spec folder
16
+
17
+
> Example with the [search client spec](../specs/search/)
18
+
19
+
#### `spec.yml` file
20
+
21
+
This file is the entry point of the client spec, it contains `servers`, `paths` and other specific imformations of the API. We recommend to copy an existing [`spec.yml` file](../specs/search/spec.yml) to get started.
22
+
23
+
#### <clientName>/common folder
24
+
25
+
Properties that are common to the client.
26
+
27
+
#### <clientName>/paths folder
28
+
29
+
Path definition of the paths defined in the [spec file](#specyml-file)
30
+
31
+
## 2. Configuring the environment
32
+
33
+
After setting up the dev environment from [README](../README.md) and [writing your spec files](#1-writing-specs), you need to update the configuration files to properly generate clients that are maintainable.
10
34
11
35
### Generation config
12
36
@@ -36,7 +60,7 @@ You can copy an existing object of a client and replace the `<clientName>` value
36
60
37
61
### GitHub actions
38
62
39
-
The built clients are cached with the [Cache GitHub Action](../.github/actions/cache/action.yml) to avoid useless CI tasks.
63
+
The built clients are cached with the [Cache GitHub Action](../.github/actions/cache/action.yml) to avoid unnecessary CI tasks.
40
64
41
65
> TODO: Automate this step
42
66
@@ -51,26 +75,10 @@ You can copy [an existing client caching step](../.github/actions/cache/action.y
We recommend to have a look at [existing spec files](../specs/). The `bundled` folder is automatically generated, manual changes shouldn't be done in these files.
57
-
58
-
### [common spec folder](../specs/common/)
59
-
60
-
Properties that are common to Algolia or used in multiple clients.
61
-
62
-
### [clientName spec folder](../specs/search)
78
+
## 3. Generate new client
63
79
64
-
#### [spec file](../specs/search/spec.yml)
80
+
> You can find more commands in the [README](../README.md#generate-all-clients).
65
81
66
-
We recommend to copy an of existing [spec file](../specs/search/spec.yml) and edit the `paths` and `servers
67
-
68
-
This file is the entry point of the spec, it contains `servers` and `paths` of the API spec.
69
-
70
-
#### [spec common folder](../specs/search/common)
71
-
72
-
Properties that are common to the client.
73
-
74
-
#### [paths folder](../specs/search/paths)
75
-
76
-
Path definition of the paths defined in the [spec file](../specs/search/spec.yml)
0 commit comments