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/modeling-guide.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
The goal of the specification is to be used by different languages, from dynamically typed to statically typed.
4
4
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.
6
6
7
7
The specification is written in [TypeScript](https://www.typescriptlang.org/), you can find all
8
8
the basic types [here](https://www.typescriptlang.org/docs/handbook/basic-types.html),
@@ -108,8 +108,8 @@ property: UserDefinedValue
108
108
109
109
### Numbers
110
110
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:
113
113
114
114
```ts
115
115
typeshort=number
@@ -122,8 +122,8 @@ type double = number
122
122
123
123
### Strings
124
124
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:
127
127
128
128
```ts
129
129
typeScrollId=string
@@ -235,7 +235,7 @@ class Foo {
235
235
```
236
236
237
237
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:
239
239
240
240
```ts
241
241
/**@variants internal tag='<field-name>' */
@@ -315,8 +315,8 @@ or:
315
315
316
316
#### Container
317
317
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`.
320
320
321
321
The syntax is:
322
322
@@ -335,7 +335,7 @@ class FooContainer {
335
335
}
336
336
337
337
```
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,
339
339
for example `AggregationContainer` and its `aggs` and `meta` properties.
340
340
341
341
An annotation allows distinguishing these properties from container variants:
@@ -367,7 +367,7 @@ class AggregationContainer {
367
367
368
368
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.
369
369
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"}}`.
371
371
372
372
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).
373
373
@@ -388,7 +388,7 @@ Following you can find a list of the supported tags:
388
388
389
389
#### `@since`
390
390
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.
392
392
You can specify an additional `@since` tag for every property that has been added afterwards.
393
393
If the tag is not defined, it's assumed that the property has been added with the API the first time
394
394
@@ -472,7 +472,7 @@ class Request {
472
472
473
473
#### `@codegen_name`
474
474
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
476
476
for request bodies where the document is the entire body.
0 commit comments