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
@@ -399,6 +399,20 @@ export class TermQuery extends QueryBase {
399
399
}
400
400
```
401
401
402
+
### Tracking Elasticsearch quirks
403
+
404
+
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.
405
+
406
+
```ts
407
+
/**
408
+
* @es_quirk This enum is a boolean that evolved into a tri-state enum. True and False have
409
+
* to be (de)serialized as JSON booleans.
410
+
*/
411
+
enumFoo { true, false, bar }
412
+
```
413
+
414
+
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.
415
+
402
416
### Additional information
403
417
404
418
If needed, you can specify additional information on each type with the approariate JSDoc tag.
0 commit comments