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
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -397,6 +397,20 @@ export class TermQuery extends QueryBase {
397
397
}
398
398
```
399
399
400
+
### Tracking Elasticsearch quirks
401
+
402
+
There are a few places where Elasticsearch has an uncommon behavior that does not deserve a specific feature in the API specification metamodel. These quirks still have to be captured so that code generators can act on them. The `eq_quirk` jsdoc tag is meant for that, and can be used on type definitions and properties.
403
+
404
+
```ts
405
+
/**
406
+
* @es_quirk This enum is a boolean that evolved into a tri-state enum. True and False have
407
+
* to be (de)serialized as JSON booleans.
408
+
*/
409
+
enumFoo { true, false, bar }
410
+
```
411
+
412
+
Code generators should track the `es_quirk` they implement and fail if a new unhandled quirk is present on a type or a property. This behavior allows code generators to be updated whenever a new quirk is identified in the API specification.
413
+
400
414
### Additional information
401
415
402
416
If needed, you can specify additional information on each type with the approariate JSDoc tag.
0 commit comments