Skip to content

Commit 7856fed

Browse files
Merge remote-tracking branch 'origin/main' into openshift-ai-integration
# Conflicts: # output/schema/schema.json
2 parents aee4525 + 8f7c9e2 commit 7856fed

File tree

502 files changed

+3413
-1738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

502 files changed

+3413
-1738
lines changed

compiler/src/model/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,11 @@ function hoistPropertyAnnotations (property: model.Property, jsDocs: JSDoc[]): v
877877
assert(jsDocs, Array.isArray(value), 'The default value should be an array')
878878
property.serverDefault = value
879879
} else {
880+
// JSDoc prevents literal @ in values, but the at sign can be escaped
881+
if (value.startsWith('\\@')) {
882+
value = value.replace('\\@', '@')
883+
}
884+
880885
switch (property.type.type.name) {
881886
case 'boolean':
882887
assert(jsDocs, value === 'true' || value === 'false', `The default value for ${property.name} should be a boolean`)

docs/modeling-guide.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,18 @@ class Foo {
601601
}
602602
```
603603
604+
If you need an `@` sign, you can escape it:
605+
606+
```ts
607+
class Foo {
608+
/**
609+
* Field containing event timestamp.
610+
* @server_default \@timestamp
611+
*/
612+
timestamp_field?: Field
613+
}
614+
```
615+
604616
#### `@doc_id`
605617
606618
An identifier that can be used for generating the doc url in clients.

output/openapi/elasticsearch-openapi.json

Lines changed: 29 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 27 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)