Skip to content

Commit c4f6ff4

Browse files
committed
reapply manual fixes
1 parent 5243c0c commit c4f6ff4

File tree

12 files changed

+67
-68
lines changed

12 files changed

+67
-68
lines changed

specification/_global/reindex/examples/request/ReindexRequestExample9.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ alternatives:
9595
)
9696
.script(s -> s
9797
.source(so -> so
98-
.scriptString("ctx._source.tag = ctx._source.remove("flag")")
98+
.scriptString("ctx._source.tag = ctx._source.remove(\"flag\")")
9999
)
100100
)
101101
.source(so -> so

specification/eql/search/examples/request/EqlSearchRequestExample1.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ alternatives:
4848
- language: java
4949
code: |
5050
client.eql().search(s -> s
51-
.index("my-data-stream")
52-
.query("
53-
process where (process.name == "cmd.exe" and process.pid != 2013)
54-
")
51+
.index("my-data-stream")
52+
.query(" process where (process.name == \"cmd.exe\" and process.pid != 2013) ")
5553
);

specification/eql/search/examples/request/EqlSearchRequestExample2.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ alternatives:
5353
- language: java
5454
code: |
5555
client.eql().search(s -> s
56-
.index("my-data-stream")
57-
.query("
58-
sequence by process.pid
59-
[ file where file.name == "cmd.exe" and process.pid != 2013 ]
60-
[ process where stringContains(process.executable, "regsvr32") ]
56+
.index("my-data-stream")
57+
.query(" sequence by process.pid [ file where file.name == \"cmd.exe\" and process.pid != 2013 ][ process where stringContains(process.executable, \"regsvr32\") ] ")
6158
")
6259
);

specification/esql/query/examples/request/QueryRequestExample1.yaml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,7 @@ alternatives:
5151
- language: java
5252
code: |
5353
client.esql().query(q -> q
54-
.includeCcsMetadata(true)
55-
.query("
56-
FROM library,remote-*:library
57-
| EVAL year = DATE_TRUNC(1 YEARS, release_date)
58-
| STATS MAX(page_count) BY year
59-
| SORT year
60-
| LIMIT 5
54+
.includeCcsMetadata(true)
55+
.query(" FROM library,remote-*:library | EVAL year = DATE_TRUNC(1 YEARS, release_date) | STATS MAX(page_count) BY year | SORT year | LIMIT 5 ")
6156
")
6257
);

specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ alternatives:
162162
.toolCalls(t -> t
163163
.id("call_KcAjWtAww20AihPHphUh46Gd")
164164
.function(f -> f
165-
.arguments("{"location":"Boston, MA"}")
165+
.arguments("{\"location\":\"Boston, MA\"}")
166166
.name("get_current_weather")
167167
)
168168
.type("function")

specification/inference/chat_completion_unified/examples/request/PostChatCompletionRequestExample3.yaml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,9 @@ alternatives:
221221
.inferenceId("openai-completion")
222222
.chatCompletionRequest(ch -> ch
223223
.messages(m -> m
224-
.content(co -> co
225-
.object(o -> o
226-
.text("What's the price of a scarf?")
227-
.type("text")
228-
)
229-
)
224+
.content(co -> co
225+
.string("What's the price of a scarf?")
226+
)
230227
.role("user")
231228
)
232229
.toolChoice(t -> t

specification/ml/infer_trained_model/examples/request/MlInferTrainedModelExample1.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ alternatives:
5757
- language: java
5858
code: |
5959
client.ml().inferTrainedModel(i -> i
60-
.docs("text", JsonData.fromJson("\"The fool doth think he is wise, but the wise man knows himself to be a fool.\""))
61-
.modelId("lang_ident_model_1")
60+
.docs(Map.of("text", JsonData.fromJson("\"The fool doth think he is wise, but the wise man knows himself to be a fool.\"")))
61+
.modelId("lang_ident_model_1")
6262
);

specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample4.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,16 @@ alternatives:
128128
- language: java
129129
code: |
130130
client.security().putRoleMapping(p -> p
131-
.enabled(true)
132-
.name("mapping4")
133-
.roles("superuser")
134-
.rules(r -> r
135-
.any(List.of(RoleMappingRule.of(ro -> ro
136-
.field(NamedValue.of("username",List.of(FieldValue.of("esadmin"))
137-
)),RoleMappingRule.of(rol -> rol
138-
.field(NamedValue.of("groups",List.of(FieldValue.of("cn=admins,dc=example,dc=com"))
139-
))))
140-
)
131+
.enabled(true)
132+
.name("mapping4")
133+
.roles("superuser")
134+
.rules(r -> r
135+
.any(List.of(RoleMappingRule.of(ro -> ro
136+
.field(NamedValue.of("username",List.of(FieldValue.of("esadmin"))
137+
))), RoleMappingRule.of(rol -> rol
138+
.field(NamedValue.of("groups",List.of(FieldValue.of("cn=admins,dc=example,dc=com"))
139+
)))
140+
)
141+
)
142+
)
141143
);

specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample7.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,16 @@ alternatives:
117117
- language: java
118118
code: |
119119
client.security().putRoleMapping(p -> p
120-
.enabled(true)
121-
.name("mapping7")
122-
.roles("ldap-example-user")
123-
.rules(r -> r
124-
.all(List.of(RoleMappingRule.of(ro -> ro
125-
.field(NamedValue.of("dn",List.of(FieldValue.of("*,ou=subtree,dc=example,dc=com"))
126-
)),RoleMappingRule.of(rol -> rol
127-
.field(NamedValue.of("realm.name",List.of(FieldValue.of("ldap1"))
128-
))))
129-
)
120+
.enabled(true)
121+
.name("mapping7")
122+
.roles("ldap-example-user")
123+
.rules(r -> r
124+
.all(List.of(RoleMappingRule.of(ro -> ro
125+
.field(NamedValue.of("dn",List.of(FieldValue.of("*,ou=subtree,dc=example,dc=com"))
126+
))), RoleMappingRule.of(rol -> rol
127+
.field(NamedValue.of("realm.name",List.of(FieldValue.of("ldap1"))
128+
)))
129+
)
130+
)
131+
)
130132
);

specification/security/put_role_mapping/examples/request/SecurityPutRoleMappingRequestExample8.yaml

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -218,22 +218,30 @@ alternatives:
218218
- language: java
219219
code: |
220220
client.security().putRoleMapping(p -> p
221-
.enabled(true)
222-
.name("mapping8")
223-
.roles("superuser")
224-
.rules(r -> r
225-
.all(List.of(RoleMappingRule.of(ro -> ro
226-
.any(List.of(RoleMappingRule.of(rol -> rol
227-
.field(NamedValue.of("dn",List.of(FieldValue.of("*,ou=admin,dc=example,dc=com"))
228-
)),RoleMappingRule.of(role -> role
229-
.field(NamedValue.of("username",List.of(FieldValue.of("es-admin"),FieldValue.of("es-system"))
230-
)))
231-
)),RoleMappingRule.of(roleM -> roleM
232-
.field(NamedValue.of("groups",List.of(FieldValue.of("cn=people,dc=example,dc=com"))
233-
)),RoleMappingRule.of(roleMa -> roleMa
234-
.except(e -> e
235-
.field(NamedValue.of("metadata.terminated_date",List.of(FieldValue.of(null))
236-
)
237-
))))
238-
)
221+
.enabled(true)
222+
.name("mapping8")
223+
.roles("superuser")
224+
.rules(r -> r
225+
.all(List.of(RoleMappingRule.of(ro -> ro
226+
.any(List.of(RoleMappingRule.of(rol -> rol
227+
.field(NamedValue.of("dn", List.of(FieldValue.of("*,ou=admin," +
228+
"dc=example,dc=com"))
229+
))
230+
), RoleMappingRule.of(role -> role
231+
.field(NamedValue.of("username", List.of(FieldValue.of("es-admin"),
232+
FieldValue.of("es-system"))
233+
)))), RoleMappingRule.of(roleM -> roleM
234+
.field(NamedValue.of("groups", List.of(FieldValue.of("cn=people," +
235+
"dc=example,dc=com"))
236+
)), RoleMappingRule.of(roleMa -> roleMa
237+
.except(e -> e
238+
.field(NamedValue.of("metadata.terminated_date",
239+
List.of(FieldValue.of(null))
240+
)
241+
))))
242+
)
243+
)
244+
)
245+
)
246+
)
239247
);

0 commit comments

Comments
 (0)