Skip to content

Commit 64b536f

Browse files
committed
review
1 parent 90f2ca2 commit 64b536f

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

website/docs/contributing/add-new-api-client.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ Make sure to first [setup the repository tooling](/docs/contributing/setup-repos
88

99
:::
1010

11-
# Add a new API client
12-
1311
Adding a new API client requires some manual steps in order to have a properly working client:
1412

1513
1. [Writing specs](#1-writing-specs)
@@ -40,34 +38,34 @@ We recommend to have a look at [existing spec files](https://github.com/algolia/
4038

4139
> Example with the [search client spec](https://github.com/algolia/api-clients-automation/blob/main/specs/search/)
4240
43-
#### `spec.yml` file
41+
#### **`spec.yml` file**
4442

4543
The `spec.yml` file is the entry point of the client spec, it contains `servers`, `paths` and other specific information of the API. We recommend to copy an existing [`spec.yml` file](https://github.com/algolia/api-clients-automation/blob/main/specs/search/spec.yml) to get started.
4644

47-
#### `<clientName>`/common folder
45+
#### **`<clientName>`/common folder**
4846

4947
Same as [the `common` folder](#common-spec-folder) but only related to the current client.
5048

51-
#### `<clientName>`/paths folder
49+
#### **`<clientName>`/paths folder**
5250

5351
Path definition of the paths defined in the [spec file](#specyml-file). See [guidelines](#guidelines).
5452

5553
### Troubleshooting
5654

57-
#### Force the name of a `requestBody`
55+
#### **Force the name of a `requestBody`**
5856

5957
> [Detailed issue](https://github.com/algolia/api-clients-automation/issues/891)
6058
61-
In some cases, you can encounter wrongly named `requestBody` from the specs, which is due to:
59+
In some cases, you can encounter wrongly named `requestBody` from the specs, which could be due to:
6260

6361
- The type is too complex/too broad to be generated. (e.g. [An object with `additionalProperties`](https://github.com/algolia/api-clients-automation/tree/main/specs/search/paths/objects/partialUpdate.yml#L24-L33))
64-
- The body is an alias of its sub type (e.g. [A list of sub models](https://github.com/algolia/api-clients-automation/tree/main/specs/search/paths/rules/saveRules.yml#L12-L20))
62+
- The type is an alias of its model (e.g. [A list of `model`](https://github.com/algolia/api-clients-automation/tree/main/specs/search/paths/rules/saveRules.yml#L12-L20))
6563

66-
The `x-codegen-request-body-name` property can be added at the root of the spec, to force the name of the generated `requestBody` property.
64+
The [`x-codegen-request-body-name`](https://openapi-generator.tech/docs/swagger-codegen-migration/#body-parameter-name) property can be added at the root of the spec, to force the name of the generated `requestBody` property.
6765

6866
You can find an example of this implementation [on this PR](https://github.com/algolia/api-clients-automation/pull/896).
6967

70-
#### Send additional options to the template
68+
#### **Send additional options to the template**
7169

7270
You might want to send additional information to the generators. To do so, you can add parameters starting with an `x-` at the root level of your spec, which will be available in the `mustache` template under the `vendorExtensions` object.
7371

@@ -77,11 +75,11 @@ You might want to send additional information to the generators. To do so, you c
7775

7876
> The generator follows its own configuration file named `config/openapitools.json`
7977
80-
### Generation config
78+
### Configs
8179

8280
[`config/openapitools.json`](https://github.com/algolia/api-clients-automation/blob/main/config/openapitools.json) and [`config/clients.config.json`](https://github.com/algolia/api-clients-automation/blob/main/config/clients.config.json) hosts the configuration of all of the generated clients with their available languages and extra information.
8381

84-
#### `generators`
82+
#### Settings
8583

8684
Generators are referenced by key with the following pattern `<languageName>-<clientName>`. You can copy an existing object of a client and replace the `<clientName>` value with the one you'd like to generate.
8785

website/docs/contributing/add-new-language.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Support a new language
33
---
44

5-
# Support a new language
6-
75
:::info
86

97
Make sure to first [setup the repository tooling](/docs/contributing/setup-repository) to ease your journey!

0 commit comments

Comments
 (0)