Skip to content

Commit 314ce53

Browse files
authoredNov 5, 2021
Fixes minor typos in modeling guide
1 parent 83d3d16 commit 314ce53

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed
 

‎docs/modeling-guide.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The goal of the specification is to be used by different languages, from dynamically typed to statically typed.
44
To achieve this goal the specification contains a series of custom types that do not have a meaning
5-
for the target language, but they should be translated to the most approriate construct.
5+
for the target language, but they should be translated to the most appropriate construct.
66

77
The specification is written in [TypeScript](https://www.typescriptlang.org/), you can find all
88
the basic types [here](https://www.typescriptlang.org/docs/handbook/basic-types.html),
@@ -108,8 +108,8 @@ property: UserDefinedValue
108108

109109
### Numbers
110110

111-
The numeric type in TypeScript is `number`, but given that this specification target mutliple languages,
112-
it offers a bunch of alias that represents the type that should be used if the language supports it:
111+
The numeric type in TypeScript is `number`, but given that this specification targets mutliple languages,
112+
it offers a bunch of aliases that represent the type that should be used if the language supports it:
113113

114114
```ts
115115
type short = number
@@ -122,8 +122,8 @@ type double = number
122122
123123
### Strings
124124
125-
The string type in TypeScript is `string`. It's ok to use it in the spec, but to offer a more developer
126-
friendly specification, we do offer a set of aliases based on which string we do expect, for example:
125+
The string type in TypeScript is `string`. It's okay to use it in the spec, but to offer a more developer
126+
friendly specification, we do offer a set of aliases based on which string we expect, for example:
127127
128128
```ts
129129
type ScrollId = string
@@ -235,7 +235,7 @@ class Foo {
235235
```
236236

237237
If the variant type is internal you should configure the parent type with
238-
the `@variants` js doc tag. teh syntax is:
238+
the `@variants` js doc tag. The syntax is:
239239

240240
```ts
241241
/** @variants internal tag='<field-name>' */
@@ -315,8 +315,8 @@ or:
315315

316316
#### Container
317317

318-
The container variant is used for all the types that contains all the
319-
variants inside the defintion. An example is `QueryContainer`.
318+
The container variant is used for all the types that contain all the
319+
variants inside the definition. An example is `QueryContainer`.
320320

321321
The syntax is:
322322

@@ -335,7 +335,7 @@ class FooContainer {
335335
}
336336

337337
```
338-
Some containers have properties associated to the container that are not part of the list of variants,
338+
Some containers have properties associated with the container that are not part of the list of variants,
339339
for example `AggregationContainer` and its `aggs` and `meta` properties.
340340

341341
An annotation allows distinguishing these properties from container variants:
@@ -367,7 +367,7 @@ class AggregationContainer {
367367

368368
In many places Elasticsearch accepts a property value to be either a complete data structure or a single value, that value being a shortcut for a property in the data structure.
369369

370-
A typical example can be found in queries such as term query: `{"term": {"some_field": {"value": "some_text"}}}` can also be written as `{"term": {"some_field": "some_text"}}`.
370+
A typical example can be found in queries such as term query. `{"term": {"some_field": {"value": "some_text"}}}` can also be written as `{"term": {"some_field": "some_text"}}`.
371371

372372
This could be modelled as a union of `SomeClass | string`, but this notation doesn't capture the relation between the string variant and the corresponding field (`value` in the above example).
373373

@@ -388,7 +388,7 @@ Following you can find a list of the supported tags:
388388

389389
#### `@since`
390390

391-
Every API already has a `@since` tag, which describes when an API has been added.
391+
Every API already has a `@since` tag, which describes when an API was added.
392392
You can specify an additional `@since` tag for every property that has been added afterwards.
393393
If the tag is not defined, it's assumed that the property has been added with the API the first time
394394

@@ -472,7 +472,7 @@ class Request {
472472

473473
#### `@codegen_name`
474474

475-
A custom name that can be used to display the property. Useful in Enums an
475+
A custom name that can be used to display the property. Useful in Enums and
476476
for request bodies where the document is the entire body.
477477

478478
```ts
@@ -541,7 +541,7 @@ export interface Request extends RequestBase {
541541

542542
#### `@deprecated`
543543

544-
Use if an endpoint or property is deprecated, you should add the version as well.
544+
Use if an endpoint or property is deprecated; you should add the version as well.
545545

546546
```ts
547547
class Foo {

0 commit comments

Comments
 (0)
Please sign in to comment.