Skip to content

Commit ecd53b4

Browse files
Fix a few minor typos from contrib docs
1 parent 3e527a8 commit ecd53b4

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

docs/add-new-api.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
It might happen that a new API in Elasticsearch is not yet defined
44
in this repository, or we do have an endpoint definition in [`/specification/_json_spec`](../specification/_json_spec)
55
but we don't have a type definition for it.
6-
In this document you will see how to add a new endpopint and how to add a new endpoint definition.
6+
In this document you will see how to add a new endpoint and how to add a new endpoint definition.
77

88
## How to add a new endpoint
99

10-
Add a new endpoint is straightforward, you only need to copy-paste the json rest-api-spec defintion
10+
Add a new endpoint is straightforward, you only need to copy-paste the json rest-api-spec definition
1111
from the Elasticsearch repository inside [`/specification/_json_spec`](../specification/_json_spec)
1212
and you are good to go.
1313

@@ -17,10 +17,10 @@ or [here](https://github.com/elastic/elasticsearch/tree/7.x/x-pack/plugin/src/te
1717
## How to add the definition of an endpoint
1818

1919
Once you have added a new endpoint definition, the next step is to add its type definition.
20-
First of all, you should find the most approariate place inside [`/specification`](../specification)
20+
First of all, you should find the most appropriate place inside [`/specification`](../specification)
2121
where to put the new definition. The content of [`/specification`](../specification)
22-
tryied to mimic the Elasticsearch online documentation, so you can use it as inspiration.
23-
For example, the index document defintion can be found in [`/specification/_global/index`](../specification/_global/index).
22+
tried to mimic the Elasticsearch online documentation, so you can use it as inspiration.
23+
For example, the index document definition can be found in [`/specification/_global/index`](../specification/_global/index).
2424

2525
Once you have found the best place for the new definition, you should create a new file for it.
2626
The filename should be the same of the type definition you are writing, for example:
@@ -40,16 +40,16 @@ you can define it in the same file where it's used, unless is a commonly used ty
4040

4141
### Add the endpoint request definition
4242

43-
Request definitions are slighly different from other definitions.
43+
Request definitions are slightly different from other definitions.
4444
It is required that the request definition is named `Request`.
45-
A request definition is an interface and should contains three top level keys:
45+
A request definition is an interface and should contain these top level keys:
4646

4747
- `urls`: the URL paths templates and allowed HTTP methods
4848
- `path_parts`: the path parameters (eg: `indices`, `id`...)
4949
- `query_parameters`: the query parameters (eg: `timeout`, `pipeline`...)
5050
- `body`: the body parameters (eg: `query` or user defined entities)
5151

52-
Furthermore, every request definition **must** contain three JS Doc tags:
52+
Furthermore, every request definition **must** contain these JS Doc tags:
5353

5454
- `@rest_spec_name`: the API name (eg: `search`, `indices.create`...).
5555
- `@availability` Which flavor of Elasticsearch is this API available for? (eg `stack` or `serverless`)
@@ -130,7 +130,7 @@ class Response {
130130
```
131131

132132
As you can see, for responses there are no custom top level keys, as the
133-
response definition represents the body of a succesful response.
133+
response definition represents the body of a successful response.
134134

135135
#### Generics
136136

@@ -172,7 +172,7 @@ class Response {
172172
Add an `examples` folder and `request` and `xxx_response` subfolders (where `xxx` is the relevant response code). The file names within these folders should be unique (for example,`DownsampleRequestExample1.yaml` not `RequestExample1.yaml`).
173173

174174
These examples are for use in the API documentation and must adhere to the [OpenAPI 3.0 Example object specification](https://spec.openapis.org/oas/v3.0.3#example-object). They must have a `value` field that contains the request or response body.
175-
If there are multiple examples for the endpoint, they must each have a brief `summary` field, which is used as the label for the example. You can also optionaly provide an explanation in a `description` field.
175+
If there are multiple examples for the endpoint, they must each have a brief `summary` field, which is used as the label for the example. You can also optionally provide an explanation in a `description` field.
176176

177177
For example:
178178

@@ -196,5 +196,5 @@ value: |-
196196
```
197197
198198
NOTE: A good example covers a very common use case or demonstrates a more complex but critical use case.
199-
It involves realistic data sets ( rather than generic "hello world" values).
199+
It involves realistic data sets (rather than generic "hello world" values).
200200
If it requires detailed setup or explanations, however, it is more appropriate for coverage in longer-form narrative documentation.

docs/modeling-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ property: UserDefinedValue
148148

149149
### Numbers
150150

151-
The numeric type in TypeScript is `number`, but given that this specification targets mutliple languages,
151+
The numeric type in TypeScript is `number`, but given that this specification targets multiple languages,
152152
it offers a bunch of aliases that represent the type that should be used if the language supports it:
153153

154154
```ts
@@ -502,7 +502,7 @@ Code generators should track the `es_quirk` they implement and fail if a new unh
502502
503503
### Additional information
504504
505-
If needed, you can specify additional information on each type with the approariate JSDoc tag.
505+
If needed, you can specify additional information on each type with the appropriate JSDoc tag.
506506
Following you can find a list of the supported tags:
507507
508508
#### `@availability`

docs/specification-structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Specification structure
22

33
The [`/specification`](../specification) folders follows a set of rules to
4-
keep the defintion easy to access and contribute, while maintaing
4+
keep the definition easy to access and contribute, while maintaining
55
the generated schema consistent and useful for language generators.
66

77
## Rules
@@ -29,7 +29,7 @@ end with `Request` or `Response`.
2929

3030
### Request and Response definitions
3131

32-
Request and Reponse definitions should be placed by structly following
32+
Request and Response definitions should be placed by strictly following
3333
the rest-api-spec structure.
3434
For example, the request and response definition for `indices.put_mapping`
3535
should go in [`/specification/indices/put_mapping`](../specification/indices/put_mapping).

0 commit comments

Comments
 (0)